Showing 121 of 349 total issues
Function deploy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def deploy(ctx, space=None, branch=None, login=None, yes=False):
Function generic_query_builder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generic_query_builder(q, type_, from_hit, hits_returned, **kwargs):
Function make_multi_sort_args
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_multi_sort_args(default=None, validator=None, default_hide_null=False, default_reverse_nulls=True,
Function filter_election
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def filter_election(query, kwargs, candidate_column, cycle_column=None, year_column=None):
Function mur_query_builder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def mur_query_builder(q, type_, from_hit, hits_returned, **kwargs):
Function fetch_subset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_subset(ctx, source, dest, fraction=DEFAULT_FRACTION, log=True):
Function build_test
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_test(ctx, source, dest, fraction=DEFAULT_FRACTION, log=True):
Function ao_query_builder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ao_query_builder(q, type_, from_hit, hits_returned, **kwargs):
Function parse_option
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse_option(option, model=None, aliases=None, join_columns=None, query=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cursor, per_page, index_column, sort_column=None, count=None):
Function make_sort_args
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_sort_args(default=None, validator=None, default_hide_null=False, default_reverse_nulls=True,
Function initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
initialize: function(options) {
options = options || {};
if(!options.highlightSizeThreshold) {
options.highlightSizeThreshold = 100000;
}
- 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 document_description
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def document_description(report_year, report_type=None, document_type=None, form_type=None):
if report_type:
clean = re.sub(r'\{[^)]*\}', '', report_type)
elif document_type:
clean = document_type
- 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 extract_summary_rows
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def extract_summary_rows(self, obj):
if obj.get('summary_lines'):
for key, value in obj.get('summary_lines').items():
#may be a way to pull these out using pandas?
if key == 'nan':
- 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 filter_match
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def filter_match(query, kwargs, fields):
for key, column in fields:
if kwargs.get(key) is not None:
if is_exclude_arg(kwargs[key]):
query = query.filter(sa.or_(column != parse_exclude_arg(kwargs[key]),
- 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 too many return
statements within this function. Open
return this.renderer.table(header, body);
Avoid too many return
statements within this function. Open
return this.renderer.blockquote(body);
Avoid too many return
statements within this function. Open
return this.renderer.listitem(body);
Avoid too many return
statements within this function. Open
return Handlebars.templates.param;
Avoid too many return
statements within this function. Open
return this.renderer.paragraph(this.inline.output(this.token.text));