Showing 26 of 395 total issues
Function _transmit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _transmit(self, node):
"""
Where the magic happens. This function prepares the request
:param node: Kitty template
:type node: object
- 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
Avoid too many return
statements within this function. Open
return bytes(data_in)
Function chop_fuzz_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def chop_fuzz_value(self, original_fuzz_value, fuzz_value):
"""
Prepares fuzz parameter for pycurl removing elements if necessary
:param original_fuzz_value: original value of the filed
:param fuzz_value: value modified in the previous run
- 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 get_readme
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_readme():
readme = list()
with open(os.path.join(here, "README.md"), "r") as f:
skip_lines = True
for line in f.read().splitlines():
- 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 post_test
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def post_test(self, test_num):
"""Called after a test is completed, perform cleanup etc."""
if self.report.get("report") is None:
self.report.add("reason", self.report.get_status())
super(ServerTarget, self).post_test(test_num) # pylint: disable=E1003
- 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 compile_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compile_template(self):
_url = Static(name="url", value=self.url)
_method = Static(name="method", value=self.method)
template = Template(name=self.name, fields=[_url, _method])
for name, field in self.field_to_param.items():
- 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"