Function _sanitize_empty_depends
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Wontfix
def _sanitize_empty_depends(configuration, error_fn):
for name, component in configuration.items():
depends_keys = _get_depends_keys(component)
for depends_key in depends_keys:
for dep in component.get_list(depends_key):
- 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 _sanitize_legacy_depends
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _sanitize_legacy_depends(configuration, error_fn):
for name, component in configuration.items():
if "depends" in component:
if not _get_depends_keys(component):
error_fn("{} uses a deprecated key (depends)".format(name))
- 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 _check_implicit_depends
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_implicit_depends(component, depends_keys, key, error_fn):
val = component.get(key, raw=True)
match = _IMPLICIT_PATTERN.search(val)
if match:
dep = match.group(1)
- 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"