Showing 131 of 436 total issues
Function __getitem__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __getitem__(self, item) -> AVArtifact:
if isinstance(item, int):
if item > self.__len__():
raise IndexError(item)
return AVArtifact(self.json[item])
- Read upRead up
- Create 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 validate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, value, param_name, exc=None, logger=None):
"""
:param value: value to validate
:param param_name: name of the value (for logging purpose)
:param exc: exception to raise (default is "ValidatorError")
- Read upRead up
- Create 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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def main(ctx, test, profile, verbose, quiet): # pylint: disable=too-many-locals
"""Init Sentry"""
# noinspection PyUnresolvedReferences
from emft.core.sentry import SENTRY
from emft.core.threadpool import register_sentry
- Read upRead up
- Create 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 word
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def word(self):
s = ''
if self.ch != '\n':
s = self.ch
while self.next_chr():
- Read upRead up
- Create 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 filterAcceptsRow
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def filterAcceptsRow(self, row: int, index: QModelIndex): # noqa: N802
if self._filter:
model = self.sourceModel()
for column, filter_ in enumerate(self._filter):
if filter_:
- Read upRead up
- Create 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 __getitem__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __getitem__(self, item) -> GHAsset:
if isinstance(item, int):
if item > self.__len__() - 1:
raise IndexError(item)
return GHAsset(self.json[item])
- Read upRead up
- Create 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 add_children
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def add_children(self, children: list):
for child in children:
params = {}
if isinstance(child, tuple):
params = child[1]
- Read upRead up
- Create 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 __getitem__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __getitem__(self, job_id) -> AVJob:
if isinstance(job_id, int):
if job_id > self.__len__() - 1:
raise IndexError(job_id)
else:
- Read upRead up
- Create 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 __init__
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, parent=None):
super(TabChildSkins, self).__init__(parent)
self.no_install_label = Label('No DSC installation found on this system')
self.no_install_label.set_text_color('red')
- Create a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mission_dict, l10n, coa_color, country_index, group_category, group_index, unit_index):
- Create a ticket
Function do
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(
- Create a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticket
Function queue_task
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def queue_task(self,
- Create a ticket
Function __run
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __run(self, cmd, args, kwargs, callback, err_call_back, err_args, err_kwargs, task_id):
- Create a ticket
Function print_all
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def print_all(self, indent=''):
for k in sorted((k for k in self.__class__.__dict__)):
if k.startswith('__'):
continue
else:
- Read upRead up
- Create 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 _parse_available_releases
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _parse_available_releases(self, event: EventData):
LOGGER.debug(f'from: {event.event.name}: parsing AV builds')
available_versions = set(self.av_builds.keys())
self.latest_version = self._spec.select_channel(available_versions, self._channel)
- Read upRead up
- Create 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 __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mission_dict, l10n, coa_color, country_index, group_category, group_index, unit_index):
- Create a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mission_dict, l10n, coa_color, country_index, group_category, group_index, unit_index):
- Create a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mission_dict, l10n, coa_color, country_index, group_category, group_index, unit_index):
- Create a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mission_dict, l10n, coa_color, country_index, group_category, group_index, unit_index):
- Create a ticket