Showing 494 of 703 total issues
File distro.py
has 342 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 compute_row
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def compute_row(self):
"""
Computation of one row which covers most of combinations
:return: new solution row
- 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_tap_result
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def _get_tap_result(stdout):
parser = TapParser(io.StringIO(stdout.decode()))
result = ""
fail_reason = None
for event in parser.parse():
- 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 computeNull
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def computeNull(self):
self.nullable = {} # pylint: disable=W0201
tbd = []
for rulelist in self.rules.values():
- 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 tags.py
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import stat
import unittest
from avocado.core import resolver, tags
File runtime.py
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
import itertools
import os
from enum import Enum
from avocado.core.dispatcher import TestPostDispatcher, TestPreDispatcher
Function _skip_method_decorator
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def _skip_method_decorator(function, message, condition, negate):
"""Creates a skip decorator for a method."""
@wraps(function)
def wrapper(obj, *args, **kwargs): # pylint: disable=W0613
- 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 install_distro_packages
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def install_distro_packages(distro_pkg_map, interactive=False):
"""
Installs packages for the currently running distribution
This utility function checks if the currently running distro is a
- 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 loaded_module_info
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def loaded_module_info(module_name):
"""
Get loaded module details: Size and Submodules.
:param module_name: Name of module to search for
- 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 _run_test
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def _run_test(self):
"""
Auxiliary method to run setup and test method.
"""
self._tag_start()
- 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 safeloader_core.py
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import sys
import unittest
import unittest.mock
from collections import OrderedDict
File runner_nrunner.py
has 321 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.
#
Cpu
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Cpu(Test):
@staticmethod
def _get_file_mock(content):
file_mock = unittest.mock.Mock()
file_mock.__enter__ = unittest.mock.Mock(return_value=io.BytesIO(content))
Runnable
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Runnable:
"""
Describes an entity that be executed in the context of a task
A instance of :class:`BaseRunner` is the entity that will actually
File mux.py
has 317 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 _valid_variant
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def _valid_variant(variant):
"""
Check the variant for validity of internal filters
:return: whether the variant is valid or should be ignored/filtered
- 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 resolve
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def resolve(references, hint=None, ignore_missing=True, config=None):
resolutions = []
hint_references = {}
if hint:
- 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_family
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def get_family():
"""Get family name of the cpu like Broadwell, Haswell, power8, power9."""
family = None
arch = get_arch()
if arch == "x86_64" or arch == "i386":
- 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 sysinfo.py
has 315 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.
#
GenericParser
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class GenericParser:
#
# An Earley parser, as per J. Earley, "An Efficient Context-Free
# Parsing Algorithm", CACM 13(2), pp. 94-102. Also J. C. Earley,
# "An Efficient Context-Free Parsing Algorithm", Ph.D. thesis,