Showing 494 of 703 total issues
File runnable.py
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
import collections
import copy
import json
import logging
Function compute_constraints
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
def compute_constraints(self):
for p in self.parameters:
if p.is_full:
array = [c for c in p.constraints if len(c) != 0]
con = list(itertools.product(*array))
- 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 main
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
def main(args): # pylint: disable=W0621
args.dict_tests = {
"static-checks": False,
"job-api": False,
- 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
File pci.py
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
File assets.py
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
File vmimage.py
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
import unittest.mock
from urllib.error import HTTPError
from avocado.utils import vmimage
from selftests.utils import setup_avocado_loggers
Function run
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def run(self, config):
def _get_name(test):
return str(test["id"])
def _get_name_no_id(test):
- 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
File tree.py
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
Function vg_ramdisk_cleanup
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def vg_ramdisk_cleanup(
ramdisk_filename=None,
vg_ramdisk_dir=None,
vg_name=None,
loop_device=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
File pmem.py
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
File podman.py
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import json
import logging
import os
import re
File statemachine.py
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
import asyncio
import collections
import logging
import multiprocessing
import time
Function parse
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def parse(file_object):
"""
Parsing of input file with parameters and constraints
:param file_object: input file for parsing
- 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 main
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def main():
exitcode = exit_codes.UTILITY_OK
parser = argparse.ArgumentParser(
"install|remove|check-installed|list-all|list-files|add-repo|"
"remove-repo|upgrade|what-provides|install-what-provides arguments"
- 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
File setup.py
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/bin/env python3
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
Function save
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def save(self, ipaddr, netmask):
"""Save current interface IP Address to the system configuration file.
If the ipaddr is valid (currently being used by the interface)
this will try to save the current settings into /etc/. This
- 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
File varianter_yaml_to_mux.py
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
File messages.py
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
Function filter_tags_on_runnables
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def filter_tags_on_runnables(
resolutions, filter_by_tags, include_empty=False, include_empty_key=False
):
"""
Filters out runnables that do not match the tags criteria given
- 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
File iso9660.py
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#