Showing 134 of 263 total issues
Function combined
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def combined(self):
for device in self.devices:
if self.display == "combined_singles" and device not in self.drives:
continue
result = self.smart(device)
- 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
Avoid too many return
statements within this function. Open
return False
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "unknown"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return self._status
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return is_psl(module)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "Fully charged"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return ["clouds"]
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "update"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "n/a"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return state
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return ["clear"]
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "Pending charge"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "wheel-down"
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return ["sleet"]
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return int(float(match[self._match_number]))
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return "Pending discharge"
- Create a ticketCreate a ticket
Function __get_tool_temperatures
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __get_tool_temperatures(self):
tool_temperatures = []
printer_info, status_code = self.__get("printer")
if status_code == 200:
- 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 update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update(self):
widget = self.widget()
try:
widget.set("rtt-unreachable", False)
res = util.cli.execute(
- 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"