Showing 1,005 of 1,471 total issues
Function exportChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exportChildren(self, outfile, level, namespace_='maec:', name_='Memory_Action_AttributesType', fromsubclass_=False):
if self.Start_Address is not None:
self.Start_Address.export(outfile, level, namespace_, name_='Start_Address')
if self.Source_Address is not None:
self.Source_Address.export(outfile, level, namespace_, name_='Source_Address')
- 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 buildAttributes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def buildAttributes(self, node, attrs, already_processed):
value = find_attr_value_('status', node)
if value is not None and 'status' not in already_processed:
already_processed.append('status')
self.status = value
- 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 exportChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exportChildren(self, outfile, level, namespace_='maec:', name_='File_System_Action_AttributesType', fromsubclass_=False):
if self.Existing_File_Name is not None:
showIndent(outfile, level)
outfile.write('<%sExisting_File_Name>%s</%sExisting_File_Name>\n' % (namespace_, self.gds_format_string(quote_xml(self.Existing_File_Name).encode(ExternalEncoding), input_name='Existing_File_Name'), namespace_))
if self.Destination_File_Name is not 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 exportChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exportChildren(self, outfile, level, namespace_='maec:', name_='Process_Action_AttributesType', fromsubclass_=False):
if self.Process_Base_Address is not None:
self.Process_Base_Address.export(outfile, level, namespace_, name_='Process_Base_Address')
if self.Thread_ID is not None:
showIndent(outfile, level)
- 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 exportLiteralChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exportLiteralChildren(self, outfile, level, name_):
if self.Start_Address is not None:
showIndent(outfile, level)
outfile.write('Start_Address=model_.xs_hexBinary(\n')
self.Start_Address.exportLiteral(outfile, level, name_='Start_Address')
- 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"