Showing 10 of 10 total issues
Function _profiles_changed
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def _profiles_changed(config, cache_mtime):
default_config = config.get("DEFAULT")
profile_list = default_config.get_list("dp.profile_name")
if profile_list:
if os.path.isdir(
- 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
Avoid deeply nested control flow statements. Open
if os.path.isfile(profile_path):
if cache_mtime < os.path.getmtime(profile_path):
return True
else:
Function _check_specific_override
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _check_specific_override(
Function _append_prepend_helper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _append_prepend_helper(config, key, key_suffix, helper_fn, value):
Function _check_single_key
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _check_single_key(key, config):
found_keys = []
for key_suffix in _KEY_SUFFIXES:
match = key_suffix[0].search(key)
if match:
- 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 _overrides_changed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _overrides_changed(config, cache_mtime):
default_config = config.get("DEFAULT")
override_list = default_config.get_list("dp.overrides")
for component_name, component_config in config.items():
applied_overrides = component_config.get_list("dp.applied_overrides")
- 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_specific_override
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_specific_override(
override_name, applied_overrides, component_config, component_name, cache_mtime
):
override_path = devpipeline_configure.overrides.get_override_path(
component_config, override_name, component_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 apply_config_modifiers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def apply_config_modifiers(modifier_config, component_config):
for modifier_section in _CONFIG_SECTIONS:
if modifier_config.has_section(modifier_section[0]):
for key, value in modifier_config[modifier_section[0]].items():
modifier_section[1](component_config, key, value)
- 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 _apply_single_profile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _apply_single_profile(component_config, profile):
for profile_key, profile_value in profile.items():
for key_suffix in _KEY_SUFFIXES:
match = key_suffix[0].search(profile_key)
if match:
- 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 _consolidate_envs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _consolidate_envs(cache):
for name, config in cache.items():
del name
env_list = config.get_list("dp.env_list")
if env_list:
- 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"