File core.py
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Build metadata dictionaries from Excel files."""
import logging
import base64
import hmac
from typing import List, Tuple, Union
Function prismify
has a Cognitive Complexity of 37 (exceeds 10 allowed). Consider refactoring. Open
def prismify(
xlsx: XlTemplateReader,
template: Template,
schema_root: str = SCHEMA_DIR,
debug: bool = False,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _set_val
has a Cognitive Complexity of 24 (exceeds 10 allowed). Consider refactoring. Open
def _set_val(
pointer: str,
val: object,
context: dict,
root: Union[dict, None] = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _set_val
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _set_val(
Function __jpointer_insert_next_thing
has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring. Open
def __jpointer_insert_next_thing(doc, jpoint, part, next_thing):
"""
Puts next_thing into a doc (that is being `jsonpointer.walk`ed)
by *part* "address". *jpoint* is Jsonpointer that is walked.
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"