Function _create_atoms
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def _create_atoms(helper, mydata, model, cgol, created):
child = False
for ch in helper.get_children():
if _create_atoms(ch, mydata, model, cgol, created):
child = True
- 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 _do_it
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _do_it(path):
fh = RMF.open_rmf_file_read_only(path)
mf = RMF.Molecule(fh)
cf = RMF.ChainFactory(fh)
- 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 _create_molecules
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _create_molecules(n, mf, cf, mydata, resolution, created):
if mf.get_is(n) or cf.get_is(n):
_create_molecule(n, mydata, resolution, created)
elif n.get_type() == RMF.BOND and mydata.bond_factory.get_is(n):
_handle_bond(n, created, mydata)
- 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 _handle_atom_coords
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _handle_atom_coords(helper, mydata, model, cgol, pd, at):
Function _create_molecules
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _create_molecules(n, mf, cf, mydata, resolution, created):
Function _handle_atom_element
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _handle_atom_element(helper, mydata, model, cgol, at):
Function _create_atoms
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _create_atoms(helper, mydata, model, cgol, created):
Error: Missing parentheses in call to 'print'. Did you mean print(print "color", name, c, ck # noqa: E999)? (<unknown>, line 40)</unknown> Open
- Read upRead up
- Exclude checks
We encountered an error attempting to analyze this line.