fragmenstein/victor/_victor_place.py
Function _
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _(self,
Function place
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def place(self,
Function _prepare_args_for_placement
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _prepare_args_for_placement(self,
Function _
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def _(self,
mol: Chem.Mol,
long_name: str = 'ligand',
merging_mode='expansion',
atomnames: Optional[Dict[int, 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
Function _assert_placement_inputs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def _assert_placement_inputs(self):
if '*' in self.smiles and (self.covalent_resi is None or self.covalent_resn is None):
raise ValueError(f'{self.long_name} - is covalent but without known covalent residues')
# TODO '*' in self.smiles is bad. user might start with a mol file.
elif '*' in self.smiles:
- 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"