Showing 9 of 9 total issues
Function generate
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate(
- Create a ticketCreate a ticket
Function parse_dockerfile
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def parse_dockerfile(dockerfile_path):
# Stages built from 'FROM <a> AS <b> statements
stages = {}
# copies built from 'COPY --from=<a> <source_path> <target_path>' statements
copies = {}
- Read upRead up
- Create a ticketCreate a ticket
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 main
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def main(
- Create a ticketCreate a ticket
Function post_file_removal
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def post_file_removal(request):
"""Preserve only files relevant to Project Type requested to Generate.
Delete files that are not relevant to the project type requested to
generate.
- Read upRead up
- Create a ticketCreate a ticket
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 extract_job_dependencies
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def extract_job_dependencies(config: ParsedYaml) -> t.Dict[str, JobsNeedsValue]:
"""Understand DAG of all Jobs"""
# DAG representation
# mapping of job names to their dependencies (previous steps in the dependency DAG)
- Read upRead up
- Create a ticketCreate a ticket
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 pre_main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def pre_main(request):
"""Do preparatory steps Generation process, by settings things as the Template Context.
Args:
**kwargs: Arbitrary keyword arguments.
- Read upRead up
- Create a ticketCreate a ticket
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 load
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def load(interface: Type[T], module: Optional[str] = None) -> List[Type[T]]:
"""Dynamically import all class objects that implement the given interface.
The classes (class objects) are discovered and imported in the namespace, by
searching within each module found inside the input 'dire' (path) directory.
- Read upRead up
- Create a ticketCreate a ticket
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 _take_care_of_logs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _take_care_of_logs(logs_file: Path):
"""Remove accidental App Log file, if found inside the Generated Project.
Ensures that only the Template Files are part of the Generated Projects by
removing any log file that might have been created during the Generation
- Read upRead up
- Create a ticketCreate a ticket
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_interpreters_from_yaml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_interpreters_from_yaml(config_file: str) -> t.Optional[GivenInterpreters]:
"""Parse the 'interpreters' variable out of the user's config yaml file.
Args:
config_file (str): path to the user's config yaml file
- Read upRead up
- Create a ticketCreate a ticket
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"