Showing 85 of 713 total issues
Function __init__
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function _define_cluster_group
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _define_cluster_group(self):
self.universe.atoms.pack_into_box()
self.cluster_group = self.universe.atoms[:0] # empty
if (self.cluster_cut is not None):
cluster_cut = float(self.cluster_cut[0])
- Read upRead up
- Create a ticketCreate a ticket
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 _atom_coverage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _atom_coverage(self, index):
# derivation follows http://freesasa.github.io/doxygen/Geometry.html
group = self.sasa_group
box = group.universe.dimensions[:3]
R = group.radii[index]
- Read upRead up
- Create a ticketCreate a ticket
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 patchTrajectory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def patchTrajectory(trajectory, interface):
""" Patch the MDAnalysis trajectory class
this patch makes the layer assignement being automatically
called whenever a new frame is loaded.
- Read upRead up
- Create a ticketCreate a ticket
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 surface.py
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
from __future__ import print_function
from abc import ABCMeta, abstractproperty
- Create a ticketCreate a ticket
Function __init__
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function __init__
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function centerbox
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def centerbox(universe,
x=None,
y=None,
z=None,
vector=None,
- Read upRead up
- Create a ticketCreate a ticket
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 _check_missing_attribute
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _check_missing_attribute(interface, name, classname, group, value):
""" Add an attribute, which is necessary for pytim but
missing from the present topology.
An example of how the code below would expand is:
- Read upRead up
- Create a ticketCreate a ticket
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 _writepdb
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _writepdb(interface,
filename='layers.pdb',
centered='no',
group='all',
multiframe=True,
- Read upRead up
- Create a ticketCreate a ticket
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 sample
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def sample(self, group, **kargs):
# TODO: implement progressive averaging to handle very long trajs
# TODO: implement memory cleanup
if not isinstance(group, AtomGroup):
raise TypeError("The first argument passed to "
- Read upRead up
- Create a ticketCreate a ticket
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 _vdwradii_gmx
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _vdwradii_gmx(self, filename):
with open(filename) as f:
input_type = 'sigeps'
content = f.read()
if re.match('.*name.*c6 *c12.*', content.replace('\n', ' ')):
- Read upRead up
- Create a ticketCreate a ticket
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 sample
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def sample(self):
""" samples the profile of a droplet, stores
the current atomic coordinates of the liquid surface
not in contact with the substrate in the reference
frame of the droplet, and optionally the coordinates
- Read upRead up
- Create a ticketCreate a ticket
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 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function __init__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
universe,
group=None,
alpha=1.5,
symmetry='generic',
- Read upRead up
- Create a ticketCreate a ticket
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 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, inter, substrate, periodic=None, hcut=0.0, hcut_upper=None,
- Create a ticketCreate a ticket
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function assign_radii
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def assign_radii(self, radii_dict=None):
if radii_dict is not None:
self.interface.radii_dict = radii_dict.copy()
else:
- Read upRead up
- Create a ticketCreate a ticket
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 _fit_ellipse
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _fit_ellipse(x, y, nonlinear=True, off=0.0, points_density=25, verbose=False):
""" fit an ellipse through the points (x,y)
:param list x : list of arrays with coordinates x
:param list y : list of arrays with coordinates y
- Read upRead up
- Create a ticketCreate a ticket
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"