Showing 153 of 245 total issues
Avoid too many return
statements within this function. Open
Open
return True
Avoid too many return
statements within this function. Open
Open
return [lft not in rgt_lst]
Avoid too many return
statements within this function. Open
Open
return [lft and rgt]
Avoid too many return
statements within this function. Open
Open
return [int(lft) // int(rgt)]
Avoid too many return
statements within this function. Open
Open
return [int(lft) - int(rgt)]
Avoid too many return
statements within this function. Open
Open
return _error_401(self, 'Invalid username or password')
Avoid too many return
statements within this function. Open
Open
return 5
Avoid too many return
statements within this function. Open
Open
return default_rows, default_cols
Avoid too many return
statements within this function. Open
Open
return [0]
Avoid too many return
statements within this function. Open
Open
return [int(lft) * int(rgt)]
Avoid too many return
statements within this function. Open
Open
return '%d actions total (all failed)' % total
Avoid too many return
statements within this function. Open
Open
return [int(lft) >= int(rgt)]
Avoid too many return
statements within this function. Open
Open
return [int(lft) < int(rgt)]
Avoid too many return
statements within this function. Open
Open
return 3
Avoid too many return
statements within this function. Open
Open
return [int(lft) % int(rgt)]
Avoid too many return
statements within this function. Open
Open
return _error_401(self, 'Incorrect realm')
Avoid too many return
statements within this function. Open
Open
return [lft != rgt]
Avoid too many return
statements within this function. Open
Open
return [lft in rgt_lst]
Avoid too many return
statements within this function. Open
Open
return [int(lft) > int(rgt)]
Function _get_next
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def _get_next(self, pop=True):
# We need to leave sleeping items in the queue because else we
# would not know their original position after they wake up.
# So we need to temporarily remove sleeping items from the top of
# the queue here.
- 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"