Showing 254 of 254 total issues
Function judge_n_move_on
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def judge_n_move_on(self, combined, combined_map, other, possible_map, others, disregarded):
Function _add_mol
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_mol(self, mol, name=None, carbon_color: Optional[str] = None, opacity=1., **kwargs):
Function __call__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self,
parameters: rdFMCS.MCSAtomCompareParameters,
hit: Chem.Mol,
hit_atom_idx: int,
followup: 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 _pre_fragment_pairs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _pre_fragment_pairs(self, scaffold: Chem.Mol, fragmentanda: Chem.Mol, A2B_mapping: Optional = None) \
-> Dict[int, List[Dict]]:
"""
Returns
- 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 place
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def place(self,
Function _perform_unmerge
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _perform_unmerge(self,
maps: Dict[str, List[Dict[int, int]]],
n_poisonous:int,
primary_name:Optional[str]=None) -> Unmerge:
"""
- 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 convert_to_sdf
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert_to_sdf(self,
Function _place_ops
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _place_ops(cls, analogs, pdbblock, n_cores, timeout, suffix, **settings) -> pd.DataFrame:
Avoid deeply nested control flow statements. Open
if rex is not None:
h = int(rex.group(1))
mapping.append((i, h))
mappings.append(mapping)
Function skip
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def skip(app, what, name, obj, would_skip, options):
Function _
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _(self,
Function place
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def place(self,
Function combine_subprocess
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def combine_subprocess(self, binary_hits: List[bytes]) -> dict:
"""
This is the combination subprocess. The placement subprocess is ``place_subprocess``.
They are very similar...
"""
- 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
Avoid deeply nested control flow statements. Open
if first is None:
first = warhead_name
new_hits.append(hit)
elif warhead_name == first:
new_hits.append(hit)
Function _prepare_args_for_placement
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _prepare_args_for_placement(self,
Avoid deeply nested control flow statements. Open
if xyz:
cls._set_xyz(tatom, xyz)
options.append(option)
Avoid deeply nested control flow statements. Open
if resType in self.water_resnames:
continue
self.step = 1
Function extract_mols
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def extract_mols(cls,
Avoid deeply nested control flow statements. Open
if resType not in self.to_preserve_heteroResname:
continue
if self.remove_water:
Function hits_check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def hits_check(mols_col: pd.Series) -> bool:
for mols in mols_col:
if not isinstance(mols, list):
return False
for mol in mols:
- 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"