Function simply_merge_hits
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def simply_merge_hits(self,
hits: Optional[List[Chem.Mol]] = None,
linked: bool = True,
) -> 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
File _merge.py
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
########################################################################################################################
__doc__ = \
"""
Combine => merge/join
Function _categorize
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _categorize(self, mol: Chem.Mol, uniques: set) -> Dict[str, Union[set, Dict]]:
"""
What do the novel atoms do in terms of connectivity.
Complicated dict output (called ``categories`` in the methods). Really ought to be SetProp of the atoms.
- 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 _merge_part
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _merge_part(self, scaffold: Chem.Mol, fragmentanda: Chem.Mol, anchor_index: int,
Function _prevent_two_bonds_on_dummy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _prevent_two_bonds_on_dummy(self, mol: Chem.RWMol):
"""
The case '*(C)C' is seen legitimately in some warheads... but in most cases these are not.
:param 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 _merge_part
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _merge_part(self, scaffold: Chem.Mol, fragmentanda: Chem.Mol, anchor_index: int,
attachment_details: List[Dict],
other_attachments: List[int],
other_attachment_details: List[List[Dict]]) -> 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"