Showing 126 of 222 total issues
Function _update_wrapper
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _update_wrapper(wrapper, wrapped,
assigned=functools.WRAPPER_ASSIGNMENTS,
updated=functools.WRAPPER_UPDATES):
for attr in assigned:
try:
- 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 deeply nested control flow statements. Open
Open
if access_response.status == 200:
if isinstance(access_response.data, list):
# Twitter returns the tweets as a JSON list.
response.write('Your 5 most recent tweets:')
for tweet in access_response.data:
Function init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
init : function (scope, libraries, method, options, response, /* internal */ nc) {
Avoid deeply nested control flow statements. Open
Open
if access_response.status == 200:
# Parse response.
statuses = access_response.data.get('feed').get('data')
error = access_response.data.get('error')
Avoid deeply nested control flow statements. Open
Open
if response.status == 200:
# Parse response.
statuses = response.data.get('feed').get('data')
error = response.data.get('error')
Avoid deeply nested control flow statements. Open
Open
if response.status == 200:
# Parse response.
statuses = response.data.get('feed').get('data')
error = response.data.get('error')
Avoid deeply nested control flow statements. Open
Open
if (this.settings.timer > 0) {
this.settings.$next_tip
.fadeIn(this.settings.tipAnimationFadeSpeed)
.show();
Avoid deeply nested control flow statements. Open
Open
if response.status == 200:
if isinstance(response.data, list):
# Twitter returns the tweets as a JSON list.
self.response.write(
'and these are your 5 most recent tweets:')
Function _x_user_parser
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _x_user_parser(user, data):
_user = data.get('query', {}).get('results', {}).get('profile', {})
user.id = _user.get('guid')
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, handler, session=None, secret=None,
Avoid deeply nested control flow statements. Open
Open
if v and isinstance(v, (list, tuple)):
ax_data[k] = v[0]
data['ax'] = ax_data
Avoid deeply nested control flow statements. Open
Open
if response.status == 200:
if isinstance(response.data, list):
# Twitter returns the tweets as a JSON list.
self.response.write(
'Your 5 most recent tweets:')
Avoid deeply nested control flow statements. Open
Open
if access_response.status == 200:
if isinstance(access_response.data, list):
# Twitter returns the tweets as a JSON list.
response.write('Your 5 most recent tweets:')
for tweet in access_response.data:
Function login
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def login(self, adapter, provider_name, callback=None,
Avoid deeply nested control flow statements. Open
Open
for kk, vv in v.__dict__.iteritems():
self.response.write(
' {0}: {1}<br />'.format(kk, vv))
Avoid deeply nested control flow statements. Open
Open
if access_response.status == 200:
# Parse response.
statuses = access_response.data.get('feed').get('data')
error = access_response.data.get('error')
Function create_signature
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_signature(self, method, base, params,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, adapter, secret, name='authomatic', max_age=600,
Function create_signature
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_signature(cls, method, base, params,
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __new__(cls, url, method, params, headers, body):