Showing 101 of 190 total issues
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function get_equivalent_species
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_equivalent_species(self, _id, max_distance, max_depth=float('inf')):
'''
Get equivalent species of species with tax_id _id,
given the max taxonomic distances, for instance, given three species
{'tax_id': 8, 'anc_id': [5,4,3,2,6,7]}
- 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 __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function get_metabolite_synonyms
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_metabolite_synonyms(self, compounds):
''' Find synonyms of a compound
Args:
compound (list): name(s) of the compound e.g. "ATP", ["ATP", "Oxygen", ...]
- 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 __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db='datanator',
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db=None,
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db='test',
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, server=None, username=None, password=None, verbose=False,
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, MongoDB=None, db=None, collection_str=None, username=None,
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, MongoDB=None, replicaSet=None, db='test',
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function get_canon_common_ancestor_fast
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_canon_common_ancestor_fast(self, org1, org2, org_format='tax_id'):
''' Get the closest common ancestor between
two organisms and their distances to the
said ancestor
Args:
- 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 flatten_json
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def flatten_json(self, nested_json):
'''
Flatten json object with nested keys into a single level.
e.g.
{a: b, {a: b,
- 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_info_by_entryid
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_info_by_entryid(self, entry_id, target_organism=None, size=10, last_id=0):
"""Find reactions by sabio entry id, return all information
Args:
entry_id (:obj:`int`): entry_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 get_conc_from_inchi
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_conc_from_inchi(self, inchi, inchi_key=False, consensus=False, projection={'_id': 0}):
''' Given inchi, find the metabolite's concentration
values.
Args:
- 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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, profile_name=None, credential_path=None,