Showing 303 of 336 total issues
Function repr_dict
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def repr_dict(dct, indent):
"""Return a debug representation of a dict or OrderedDict."""
# pprint represents OrderedDict objects using the tuple init syntax,
# which is not very readable. Therefore, dictionaries are iterated over.
if dct is 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
Avoid deeply nested control flow statements. Open
Open
if mgr_obj.auto_update_enabled():
mgr_obj.auto_update_trigger_pull()
elif action == 'remove':
Avoid deeply nested control flow statements. Open
Open
for dc in domain_configs:
if dc['access-mode'] == 'control-usage':
used_adapter_domains.append(dc['domain-index'])
used_domains.update(used_adapter_domains)
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function check_set_noninput
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_set_noninput(method, uri, properties, prop_name, prop_value):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function check_partition_status
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_partition_status(method, uri, partition, valid_statuses=None,
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(cls, method, hmc, uri, uri_parms, logon_required):