Showing 10 of 13 total issues
Function report
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def report(self, breakdowns):
self.sheet.column_dimensions["A"].width = 25
for column in ["A", "B", "C", "D", "E", "F", "G", "H", "I"]:
- 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 launch
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def launch(
Function inject
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def inject(
Function report_breakdown
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def report_breakdown(self, breakdown):
printer = self.console
printer.print(f"\n[bold green]{breakdown.name}[/bold green]")
table = Table(show_header=True, header_style="bold magenta")
- 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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, criteria, detailed_builds, detailed_timing, emulate_velocity, console):
Function __process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __process(self, breakdown):
flattened = {"description": breakdown.name, "details": []}
sorted_by_total = sorted(
breakdown.details.items(), key=lambda kv: kv[1].count, reverse=True
- 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 __analyse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __analyse(self, builds):
count = 0
minutes = BuildMinutes(0, 0, 0)
successes = 0
failures = 0
- 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"