Showing 376 of 566 total issues
Function try_one_generator_really
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def try_one_generator_really (project, name, generator, target_type, properties, sources):
Avoid deeply nested control flow statements. Open
if client_param['lts_status'] == "-2":
printl("Failed to Execute %s" % echo.next_news['filepath'])
if client_param['lts_status'] != "0":
Function extend
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def extend (name, values):
""" Adds the given values to the given feature.
"""
name = add_grist (name)
__validate_feature (name)
- 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
if not f in explicit_features: # not explicitly-specified
if any(r.feature() == f for r in result):
raise FeatureConflict(
"expansions of composite features result in "
"conflicting values for '%s'\nvalues: '%s'\none contributing composite property was '%s'" %
Function viable_source_types_for_generator_real
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def viable_source_types_for_generator_real (generator):
""" Returns the list of source types, which, when passed to 'run'
method of 'generator', has some change of being eventually used
(probably after conversion by other generators)
"""
- 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
if not news['date'] or not news['date'].isdigit():
printl("Invalid date field not present or not a digit")
news = None
if not news['filepath'] or not os.path.exists(news['filepath']):
Function value_to_jam
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def value_to_jam(value, methods=False):
"""Makes a token to refer to a Python value inside Jam language code.
The token is merely a string that can be passed around in Jam code and
eventually passed back. For example, we might want to pass PropertySet
- 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
if client_param['lts_status'] == "-1":
printl("Executed %s" % echo.next_news['filepath'])
news = None
continue
if client_param['lts_status'] == "-2":
Function compress_subproperties
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def compress_subproperties (properties):
""" Combine all subproperties into their parent properties
Requires: for every subproperty, there is a parent property. All
features are explicitly expressed.
- 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 construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def construct (project, name, target_type, prop_set, sources, top_level=False):
Avoid deeply nested control flow statements. Open
if client_param['lts_status'] != "0":
printl("Failed to Send %s" % echo.next_news['filepath'])
if client_param['lts_status'] == "0":
Avoid deeply nested control flow statements. Open
if res_date == 1:
news = {'date': news_item[0], 'title': news_item[1], 'headline': news_item[2], 'content': news_item[3],
'type': news_item[4], 'filepath': news_item[5], 'imei': news_item[6], 'trials': news_item[7]}
else:
news_item[0] = ' '.join(news_item[0].split())
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__ (self, name, type, project, action = None, path=None, exact=False):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__ (self, name, project, shared, real_name, search, action):
Function cpu_flags
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def cpu_flags(toolset, variable, architecture, instruction_set, values, default=None):
Function install
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def install(name, package_name=None, requirements=[], binaries=[], libraries=[], headers=[]):
Function merge_xmls_task
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def merge_xmls_task( source_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file, tag ):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__ (self, manager, name, project_module, parent_project, requirements, default_build):
Function create_typed_metatarget
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_typed_metatarget(name, type, sources, requirements, default_build, usage_requirements):
Function create_metatarget
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_metatarget(klass, name, sources, requirements=[], default_build=[], usage_requirements=[]):