Showing 33 of 76 total issues
Function value
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def value(self):
value = self.__value
if len(value) == 0:
value = ''
else:
- Read upRead up
- Create a ticketCreate 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 __runInitializer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __runInitializer(self, configuration):
"""
This method is to pass through the passed in file
"""
self.__namespace_table[configuration.name] = dict()
- Read upRead up
- Create a ticketCreate 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 consume
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def consume(self, parsed_item=None):
parsed_item = list() if parsed_item is None else parsed_item
super(SettingKeyword, self).consume(parsed_item)
if parsed_item[0] != Constants._setting: # pylint: disable=protected-access
- Read upRead up
- Create a ticketCreate 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 readQuotedString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def readQuotedString(self):
status = True
while status is True:
status = self.readString('"')
if status is False:
- Read upRead up
- Create a ticketCreate 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 __gatherUserDefinedVariables
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __gatherUserDefinedVariables(self):
self.__user_defined_table = set()
snapshot_of_dict = list(self.__namespace_table.items())
for _configuration, values in snapshot_of_dict:
for keyword in values.values():
- Read upRead up
- Create a ticketCreate 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 shouldAppendConditionItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def shouldAppendConditionItem(condition):
result = False
for case in Switch(condition):
if case(''):
break
- Read upRead up
- Create a ticketCreate 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 gatherAllVariables
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def gatherAllVariables(dictionary):
settings_set = set()
snapshot_of_dict = list(dictionary.items())
for _configuration, values in snapshot_of_dict:
for keyword in values.values():
- Read upRead up
- Create a ticketCreate 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 serialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def serialize(self):
serialize_string = ''
if self.uses_for:
for key, value in self.configuration_values.items():
serialize_string += self.serializeForStatement(key, value)
- Read upRead up
- Create a ticketCreate 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 openOutputFileToWrite
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def openOutputFileToWrite(input_string):
"""
Takes a path to the output file as a string and returns an open
writeable file. The path will be expanded and parent directories
will be created if necessary.
- Read upRead up
- Create a ticketCreate 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 findKeyValueAssignmentOffset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def findKeyValueAssignmentOffset(cls, line, offset):
result_offset = -1
find_open_bracket = line.find('[')
find_equals = line.find('=')
new_offset = offset
- Read upRead up
- Create a ticketCreate 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 findPreviousDefinition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def findPreviousDefinition(kv_array, configuration, setting_key):
previous_definition_indexes = list()
for file_name, value in kv_array:
if file_name != configuration:
setting_values = list(value.keys())
- Read upRead up
- Create a ticketCreate 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 findDuplicates
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def findDuplicates(dictionary):
results = dict()
settings_set = set()
snapshot_of_dict = list(dictionary.items())
for configuration, values in snapshot_of_dict:
- Read upRead up
- Create a ticketCreate 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 WalkNodes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def WalkNodes(visited=None, nodes_with_children=None):
visited = set() if visited is None else visited
nodes_with_children = list() if nodes_with_children is None else nodes_with_children
child_nodes = list()
- Read upRead up
- Create a ticketCreate 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"