Showing 254 of 254 total issues
File _collapse_ring.py
has 862 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
This is the ring collapsing code.
File _victor_utils.py
has 510 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
########################################################################################################################
__doc__ = \
"""
File fritz.py
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
See GitHub documentation
Function collapse_ring
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def collapse_ring(self, mol: Chem.Mol) -> Chem.Mol:
"""
Collapses a ring(s) into a single dummy atom(s).
Stores data as JSON in the atom.
- 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
File m_rmsd.py
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
from collections import defaultdict
########################################################################################################################
__doc__ = \
Function harmonize_warheads
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def harmonize_warheads(self, hits, warhead_harmonisation, covalent_form=True):
"""
Harmonises and marks the atoms with `_Warhead` Prop.
:param hits:
- 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
File unmerge_mapper.py
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
Unmerge mapper (not inherited) but inherits `positional_mapping.GPM`
File _communal.py
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
This is inherited by all three parents of the place/combine/other group
"""
Function parse
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def parse(self, block:str) -> None:
# ---- parse -----------------------------------------
if block.find('\n') == -1:
raise ValueError(f'No newline found in block: Is {block} a filename?')
def starts_with(xrow, name): return xrow.find(name) == 0
- 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
_MonsterRing
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class _MonsterRing(_MonsterJoinNeigh):
def collapse_mols(self, mols: List[Chem.Mol]):
mols = [self.collapse_ring(mol) for mol in mols]
[self.offset(mol) for mol in mols]
Function mmff_minimize
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def mmff_minimize(self,
mol: Optional[Chem.Mol] = None,
neighborhood: Union[Chem.Mol, None] = None,
ff_max_displacement: float = 0.,
ff_constraint: int = 10,
- 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
File _victor_common.py
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
from ._victor_igor import _VictorIgor
from .minimalPDB import MinimalPDBParser
import os, re
from typing import *
from rdkit import Chem
Function place_from_map
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def place_from_map(self,
target_mol: Chem.Mol,
template_mol: Chem.Mol,
atom_map: Optional[Dict] = None,
random_seed=None) -> Chem.Mol:
- 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 partially_blend_hits
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def partially_blend_hits(self, hits: Optional[List[Chem.Mol]] = None) -> List[Chem.Mol]:
"""
This is the partial merge algorithm, wherein the hits are attempted to be combined.
If the combination is bad. It will not be combined.
Returning a list of possible options.
- 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 from_other_annotated_mols
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def from_other_annotated_mols(cls,
followup: Chem.Mol,
hits: Sequence[Chem.Mol],
annotated: Chem.Mol,
) -> mRMSD:
- 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_mols
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def extract_mols(cls,
folder: str,
smilesdex: Dict[str, str],
ligand_resn: str = 'LIG',
regex_name: Optional[str]= 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
File _igor_min.py
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
Minimisers
Function make_coordinate_constraints_for_placement
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def make_coordinate_constraints_for_placement(self,
mol: Optional[Chem.Mol] = None,
origins: Optional[List[List[str]]] = None,
std: Optional[List[float]] = None,
mx: Optional[List[float]] = None) -> 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 fix_hits
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def fix_hits(self, hits: List[Chem.Mol]) -> List[Chem.Mol]:
"""
Adds the ``_Name`` Prop if needed
asserts everything is a Chem.Mol
calls ``store_positions``
- 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 __call__
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, row: pd.Series):
with contextlib.suppress(cli_default_settings['supressed_exceptions']):
if not isinstance(row.minimized_mol, Chem.Mol) or isinstance(row.hit_names, float):
return float('nan'), float('nan')
present_tally = 0
- 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"