Showing 151 of 151 total issues
File entry_commands.py
has 1006 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Run searches and write files.
"""
from __future__ import annotations
File pubchem_data.py
has 920 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
PubChem data views and processors.
"""
from __future__ import annotations
File misc_commands.py
has 591 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Command-line interface for mandos.
"""
from __future__ import annotations
File pubchem_models.py
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
import enum
from dataclasses import dataclass
from datetime import date
File taxonomy.py
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
import enum
from collections import defaultdict
from dataclasses import dataclass
File plot_commands.py
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Command-line interface for mandos.
"""
from __future__ import annotations
File calc_commands.py
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Command-line interface for mandos.
"""
from __future__ import annotations
Taxonomy
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class Taxonomy:
"""
A taxonomic tree of organisms from UniProt.
Elements in the tree can be looked up by name or ID using ``__getitem__`` and ``get``.
"""
File querying_pubchem_api.py
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
PubChem querying API.
"""
from __future__ import annotations
File plots.py
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Plots.
"""
import enum
from dataclasses import dataclass
File chembl_target_graphs.py
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
import abc
import enum
from dataclasses import dataclass
Function adjust_filename
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def adjust_filename(
cls,
to: Optional[Path],
default: Union[str, Path],
replace: bool,
- 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 depositor_pubmed_articles
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def depositor_pubmed_articles(self) -> FrozenSet[PubmedEntry]:
def split_mesh_headings(s: str) -> FrozenSet[Codes.MeshHeading]:
# this is a nightmare
# these fields are comma-delimited strings, but there are commas within each
# all of the examples I've seen with this are for chem name cis/trans
- 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 parse
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def parse(
cls, lines: Sequence[str]
) -> Tup[Set[TargetEdgeReqs], Mapping[TargetEdgeReqs, Acceptance]]:
pat_type = r"(@?[a-z_]+)"
pat_rel = r"([<>~=.*])"
- 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 cached_from_url
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def cached_from_url(
cls,
path: Optional[Path],
url: Optional[str],
*,
- 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 _process
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _process(self, lookup: str, binding: BindingHit, target: NestedDotDict) -> Sequence[GoHit]:
terms = set()
if target.get("target_components") is not None:
for comp in target["target_components"]:
if comp.get("target_component_xrefs") is not 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
Function run
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function plot_tau
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_tau(
Function plot_enrichment
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_enrichment(
Function run
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(