Showing 64 of 136 total issues
Avoid too many return
statements within this function. Open
return self.C[jc] + lsp[ic]
Avoid too many return
statements within this function. Open
return 9.81
Avoid too many return
statements within this function. Open
return self._calc()
Avoid too many return
statements within this function. Open
return 0.0
Avoid too many return
statements within this function. Open
return 8.38
Avoid too many return
statements within this function. Open
return np.log(An.sum() + 1)
Avoid too many return
statements within this function. Open
return 25.30
Avoid too many return
statements within this function. Open
return 19.21
Avoid too many return
statements within this function. Open
return rdMolDescriptors.CalcNumHeteroatoms(self.mol)
Avoid too many return
statements within this function. Open
return 32.09
Function _serial
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _serial(self, mols, nmols, quiet, ipynb, id):
with self._progress(quiet, nmols, ipynb) as bar:
for m in mols:
with Capture() as capture:
r = self._wrap_result(
- 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 _import_all_descriptors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _import_all_descriptors():
import os
from importlib import import_module
from .._base.descriptor import is_descriptor_class
- 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 calculate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calculate(self):
chain = []
path = []
path_cluster = []
cluster = []
- 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 get_descriptors_from_module
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_descriptors_from_module(mdl, submodule=False):
r"""[DEPRECATED] Get descriptors from module.
Parameters:
mdl(module): module to search
- 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 parallel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parallel(calc, mols, nproc, nmols, quiet, ipynb, id):
with MolPool(calc, nproc) as pool, calc._progress(quiet, nmols, ipynb) as bar:
for mol, (r, err) in pool.map(mols, id):
for e in err:
e = e.rstrip()
- 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 description
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def description(self):
if self._type == "any":
t = ""
elif self._type == "X":
t = " on halogen 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 __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, type="any", averaged=False, _eps=1e-10):
self._orig_type = self._type = type
self._averaged = averaged
self._eps = _eps
- 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 _search
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _search(self, u):
if self.timeout_at < time.time():
raise Timeout()
self.visited.add(u)
- 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 calculate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calculate(self):
if self._type == "X":
return self._calc_X()
elif self._type in ["Atom", "HeavyAtom"]:
return self._calc_all()
- 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 _dfs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _dfs(self, u):
neighbors = self.neighbors[u]
self.visited.add(u)
self.degrees.add(len(neighbors))
- 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"