Showing 283 of 1,132 total issues
Function show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Tour.prototype.show = function(key) {
var next;
if (key == null) {
key = 0;
}
Function show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Tour.prototype.show = function(key) {
var next;
if (key == null) {
key = 0;
}
Function find_security_policies
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_security_policies(self, repo_base, repo=None, table=None,
Function find_security_policies
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_security_policies(
Function find_security_policies
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_security_policies(repo_base, repo=None, table=None,
Function match_type
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def match_type(types_a, types_b):
if len(types_a) != len(types_b):
return False
for i in range(len(types_a)):
- 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 user_data_path
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def user_data_path(repo_base, repo='', file_name='', file_format=None):
"""
Returns an absolute path to a file or repo in a user's data folder.
user_data_path('foo') => '/user_data/foo'
- 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 migrate_datahub_accounts
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def migrate_datahub_accounts(*args, **kwargs):
old_users = DataHubLegacyUser.objects.all()
apps = App.objects.exclude(legacy_user=None)
users = User.objects.all()
print("Old model users: {0} New model users: {1}".format(
- 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 find_security_policies
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find_security_policies(repo_base, repo=None, table=None,
policy_id=None, policy=None, policy_type=None,
grantee=None, grantor=None, safe=True):
'''
Looks for security policies matching what the user specified in
- 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 get_numeric_stats
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_numeric_stats(self, c):
ndistinct = self.get_distinct_count(c)
if ndistinct == 0:
return []
if ndistinct == 1:
- 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 execute_query
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def execute_query(self, query, current_page=1,
rows_per_page=1000, repo=None,
rows_only=False):
result = None
- 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 update_card
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update_card(self, repo, card_name, new_query=None,
new_name=None, public=None):
"""
Updates a card's name, query, and/or public visibility.
- 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 program
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
exports.template = template;function program(container, i, fn, data, declaredBlockParams, blockParams, depths) {
Function ii
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function ii(a, b, c, d, x, s, t) {
Function gg
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function gg(a, b, c, d, x, s, t) {
Function ff
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function ff(a, b, c, d, x, s, t) {
Function ff
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function ff(a, b, c, d, x, s, t) {
Function ii
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function ii(a, b, c, d, x, s, t) {
Function hh
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function hh(a, b, c, d, x, s, t) {
Function hh
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function hh(a, b, c, d, x, s, t) {