Showing 488 of 901 total issues
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.
#
Function _examine_class
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def _examine_class(
target_module, target_class, determine_match, path, class_name, match
):
"""
Examine a class from a given 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
File distro.py
has 389 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 merge
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def merge(self, other):
"""
Merges `other` node into this one without checking the name of the
other node. New values are appended, existing values overwritten
and unaffected ones are kept. Then all other node children are
- 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 diff.py
has 377 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 output_check.py
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
import json
import os
import unittest
from avocado.core import exit_codes
File core.py
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
import ast
import collections
import sys
from importlib.machinery import PathFinder
Function factory
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
var factory = function( $, DataTable ) {
"use strict";
/* Set the defaults for DataTables initialisation */
Function reconfigure
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def reconfigure(args):
"""
Adjust logging handlers accordingly to app args and re-log messages.
"""
- 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 memory.py
has 364 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.
#
ArchiveTest
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class ArchiveTest(unittest.TestCase):
def setUp(self):
prefix = temp_dir_prefix(self)
self.basedir = tempfile.TemporaryDirectory(prefix=prefix)
self.compressdir = tempfile.mkdtemp(dir=self.basedir.name)
Function makeState
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def makeState(self, state, sym):
assert sym is not None
#
# Compute \epsilon-kernel state's core and see if
# it exists already.
- 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 plugin_interfaces.py
has 357 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 job.py
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
import tempfile
import unittest.mock
TapParserTests
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class TapParserTests(unittest.TestCase):
def assert_test(self, events, **kwargs):
if "explanation" not in kwargs:
kwargs["explanation"] = None
self.assertEqual(next(events), TapParser.Test(**kwargs))
File multipath.py
has 353 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 simplify_constraints
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def simplify_constraints(self):
items_to_remove = set()
copy = list(self.constraints.copy())
for i in range(len(copy)):
is_brake = 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
Function clean_hash_table
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def clean_hash_table(self, combination_matrix, t_value):
for constraint in self.constraints:
if len(constraint) > t_value:
continue
parameters_in_constraint = []
- 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 makeSet
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def makeSet(self, token, sets, i):
cur, next_item = sets[i], sets[i + 1]
ttype = ( # pylint: disable=R1709
token is not None and self.typestring(token) or 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 compare_matrices
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def compare_matrices(matrix1, matrix2, threshold=0.05):
"""
Compare 2 matrices nxm and return a matrix nxm with comparison data and
stats. When the first columns match, they are considered as header and
included in the results intact.
- 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"