Showing 56 of 172 total issues
Avoid too many return
statements within this function. Open
return s
Avoid too many return
statements within this function. Open
return r
Avoid too many return
statements within this function. Open
return r
Avoid too many return
statements within this function. Open
return api.abort(400)
Avoid too many return
statements within this function. Open
return self._pull_feed(filters), 200
Avoid too many return
statements within this function. Open
return api.abort(401)
Avoid too many return
statements within this function. Open
return api.abort(500)
Avoid too many return
statements within this function. Open
return s
Avoid too many return
statements within this function. Open
return csv, 200
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return api.abort(400)
Avoid too many return
statements within this function. Open
return
Function _log_search
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _log_search(self, t, data):
# don't log bulk searches
if isinstance(data, list) and len(data) > 1:
return
- 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 delete
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def delete(self, token, data=None):
if type(data) is not list:
data = [data]
ids = []
- 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 __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
self.uuid = kwargs.get('uuid')
self.indicator = kwargs.get('indicator')
self.group = kwargs.get('group', 'everyone')
- 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 _enabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _enabled(i):
if not ENABLED and not TOKEN:
return
if not i.is_ipv4():
- 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"