Showing 3 of 3 total issues
Function copy_template_files
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def copy_template_files() -> None:
path_source_dir = get_path_template_dir_local()
path_target_dir = pathlib.Path(__file__).parent.resolve()
# copy CHANGES.rst template if not there
- 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 get_path_template_dir_local
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_path_template_dir_local() -> pathlib.Path:
path_current_dir = pathlib.Path(__file__).parent.resolve()
while True:
path_current_dir = path_current_dir.parent
path_current_subdirs = path_current_dir.glob('**/')
- 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 copy_project_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def copy_project_files() -> None:
"""
copy the template files to the current project on the local development machine
we dont overwrite some files, see code
"""
- 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"