Showing 376 of 791 total issues
Avoid too many return
statements within this function. Open
return (None, None, None, None, None)
Avoid too many return
statements within this function. Open
return (None, None, None, None, None)
Avoid too many return
statements within this function. Open
return ('k_cat', 25, value * float(f) if value else None, error * float(f) if error else None, 's^(-1)')
Avoid too many return
statements within this function. Open
return ('k_cat', 25, value, error, 's^(-1)')
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return "%s-%s%s%s-%s" % (major, minor, flag, flagver, flagproto)
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return None
Function replace_key_in_similar_compounds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def replace_key_in_similar_compounds(self):
query = {}
projection = {'similar_compounds': 1}
_, _, col = self.con_db('metabolites_meta')
docs = col.find(filter=query, projection=projection)
- 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 fill_meta
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_meta(self):
"""Fill exisiting metabolites with meta information.
"""
query = {'inchikey': {'$exists': False}}
count = self.collection.count_documents(query)
- 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 calc_inchi_formula_connectivity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calc_inchi_formula_connectivity(self, structure):
""" Calculate a searchable structures
* InChI format
* Core InChI 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 load_content
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_content(self):
""" Collects and Parses all data from Pax DB website and adds to MongoDB
"""
client, db_obj, collection = self.con_db(self.collection)
- 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"