Showing 66 of 177 total issues
Function topological_sort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def topological_sort(digraph, nodes_sort=node_list_sort):
'''This algorithm is based upon a depth first search with 'making' some
special nodes.
The result is the topological sorted list of nodes.'''
# List of topological sorted nodes
- 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_tree
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_tree(self, topic_continuum_set):
# Create a new scrolled window, with scrollbars only if needed
scrolled_window = gtk.ScrolledWindow()
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
- 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 _check_list_of_strings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_list_of_strings(name, tbc):
'''Checks if the given variable is a list of strings or None.'''
if tbc is None:
tracer.debug("Ignoring non existent configuration for [%s]", tbc)
return
- 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 execute_cmds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def execute_cmds(config, input_mods, _mstdout, mstderr):
'''Checks are always done - to be sure that e.g. the dependencies
are correct.
Please note: there is no 'ONE' latest continuum any more
- but a list.'''
- 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 __connect_nodes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __connect_nodes(self):
'''Precondition: the depends_on must be set.
The method connect all the nodes based on this value.'''
for mod_name, mod in self.__tagtypes[InputModuleTypes.reqdeps].items():
for node in mod.depends_on:
- 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_solved_by_one_req_deps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __resolve_solved_by_one_req_deps(self, req):
content = req.brmo["Solved by"].get_content()
# If available, it must not empty
if not content:
logger.error(LogFormatter.format(
- 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"