Showing 126 of 222 total issues
Function events
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
$(this.scope)
.on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
Function css
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
css : function (dropdown, target) {
if (dropdown.parent()[0] === $('body')[0]) {
var position = target.offset();
} else {
var position = target.position();
Function pos_phone
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
pos_phone : function (init) {
var tip_height = this.outerHeight(this.settings.$next_tip),
tip_offset = this.settings.$next_tip.offset(),
target_height = this.outerHeight(this.settings.$target),
$nub = $('.joyride-nub', this.settings.$next_tip),
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, settings, adapter, provider_name, session=None,
Function _fetch
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fetch(self, url, method='GET', params=None, headers=None,
Function create_request_elements
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_request_elements(
Function access
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def access(self, url, params=None, method='GET', headers=None,
Function cookie
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
Function login
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def login(self, adapter, provider_name, callback=None,
session=None, session_saver=None, **kwargs):
"""
If :data:`provider_name` specified, launches the login procedure for
corresponding :doc:`provider </reference/providers>` and returns
- 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
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def post(self, provider_name):
self.response.write('<a href="..">Home</a>')
# Retrieve the message from POST parameters and the values from
# cookies.
- 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 add_metaclass
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def add_metaclass(metaclass):
"""Class decorator for creating a class with a metaclass."""
def wrapper(cls):
orig_vars = cls.__dict__.copy()
slots = orig_vars.get('__slots__')
- 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 _x_user_parser
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _x_user_parser(user, data):
_users = data.get('users', [])
if _users and _users[0]:
_user = _users[0]
user.id = _user.get('id')
- 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 refresh_custom_select
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh_custom_select : function ($select) {
var self = this;
var maxWidth = 0,
$customSelect = $select.next(),
$options = $select.find('option');
Function init
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function (scope, method, options) {
var self = this;
this.scope = scope || this.scope;
if (typeof method === 'object') {
Function events
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
$(this.scope)
.on('click.fndtn.section', '[data-section] .title', function (e) {
Function access
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def access(self, credentials, url, params=None, method='GET',
Function request_elements
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def request_elements(
Function index
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def index():
if fa.result:
if fa.result.error:
return fa.result.error.message
elif fa.result.user:
- 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 create_request_elements
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_request_elements(self, request_type, credentials,
Function get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(cls, key, default=None):
"""
Resembles the :meth:`dict.get` method.
:returns:
- 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"