Showing 32 of 84 total issues
Function generate_report
has a Cognitive Complexity of 65 (exceeds 6 allowed). Consider refactoring. Open
def generate_report(path, results, with_charts=False, small_file=False):
"""
Generate html report from results
:param path: Path to the output html file
- 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 _recalculate
has a Cognitive Complexity of 18 (exceeds 6 allowed). Consider refactoring. Open
def _recalculate(self):
"""Recalculate this result status"""
if not self.agg_weights:
if not self.error:
self._score = -100
- 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 create_metadata
has a Cognitive Complexity of 15 (exceeds 6 allowed). Consider refactoring. Open
def create_metadata(output_dir, args):
"""
Generate RUNPERF_METADATA in this directory
"""
def mask_arguments(cmd, 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 iter_tabular_output
has a Cognitive Complexity of 15 (exceeds 6 allowed). Consider refactoring. Open
def iter_tabular_output(matrix, header=None):
"""
Generator for a pretty, aligned string representation of a nxm matrix.
This representation can be used to print any tabular data, such as
- 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 record_result
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def record_result(self, test_name, src, dst, primary=False, grouped=False,
Function identify
has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring. Open
def identify(self, data):
"""
Identify model based on data
:param data: dict of {result: [value, value, 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 identify
has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring. Open
def identify(self, data):
"""
Identify model based on data
:param data: dict of {result: [value, value, 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 process
has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring. Open
def process(path_glob, variant, out, average):
"""Process single variant"""
safe_variant = variant.replace('-', '')
out.write(CHART1 % (variant, variant, safe_variant, variant, safe_variant,
safe_variant))
- 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 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, host, name, distro, base_image, smp, mem,
Function get_merged_name
has a Cognitive Complexity of 11 (exceeds 6 allowed). Consider refactoring. Open
def get_merged_name(self, merge):
"""
Report full test name but replace parts specified in "merge" wiht '*'
"""
if not merge:
- 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__(self, log, tolerance, stddev_tolerance, models,
Function write_file
has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring. Open
def write_file(path, content, mode='w'):
"""
Write content to path, create the necessary upper dirs
"""
if not os.path.exists(path):
- 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 ssh_copy_id
has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring. Open
def ssh_copy_id(log, addr, passwords, hop=None):
"""
Use "ssh-copy-id" to copy ssh id, try passwords if asked for.
"""
session = None
- 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 add_bad
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_bad(self, suffix, name, details, difference, weight, src=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, parent_log, name, addr, distro, args, hop=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, log, mean_tolerance, stddev_tolerance, models,
Function for_each_host_retry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def for_each_host_retry(self, attempts, hosts, method, args=tuple(),
Function check_result
has a Cognitive Complexity of 9 (exceeds 6 allowed). Consider refactoring. Open
def check_result(self, test_name, src, dst):
model = self.model.get(test_name)
if model is None:
return []
equation = model["equation"]
- 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 _image_up_to_date
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _image_up_to_date(self, session, pubkey, image, setup_script,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, distro, arch, pub_key, base_path, session,