Showing 151 of 151 total issues
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function _create_hit
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _create_hit(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function run
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function download
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def download(self, force: bool = False) -> None:
if self.ligands is None or self.interactions is None or force:
# always download both together -- we don't want them non-synced
exists = self.ligands_path.exists() and self.interactions_path.exists()
if exists and not force:
- 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 main
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def main(self) -> None:
try:
self._mandos = MandosCli.as_cli()
self._mandos.cli()
_err("Done! Exited successfully.")
- 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 find
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find(self, inchikey: str) -> Sequence[TrialHit]:
data = self.api.fetch_data(inchikey)
hits = []
# {std_status}:phase{std_phase}
for dd in data.drug_and_medication_information.clinical_trials:
- 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 _strip_by_key_in_place
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _strip_by_key_in_place(self, data: Union[dict, list], bad_key: str) -> None:
if isinstance(data, list):
for x in data:
self._strip_by_key_in_place(x, bad_key)
elif isinstance(data, dict):
- 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_value_and_unit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _extract_value_and_unit(
self, dot: NestedDotDict
) -> Tup[Union[None, int, str, float, bool], str]:
value, unit = None, None
if "Number" in dot and len(["Number"]) == 1:
- 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 export_db
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def export_db(
Consider simplifying this complex logical expression. Open
if path is not None and url is None and query is None:
return cls.from_path(path)
elif path is None and url is not None and query is not None:
return cls.from_query(url, query, query_args)
elif path is not None and url is not None and query is not None:
Function _run
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _run(
Function plot_projection
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_projection(