Showing 85 of 713 total issues
Function label_group
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def label_group(self,
group,
beta=None,
layer=None,
cluster=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 _compute_observable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _compute_observable(self, ka1, ka2):
try:
fg1 = self.observable.compute(self.g1, ka1)
except:
fg1 = self.observable.compute(self.g1)
- 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 write_atomgroup
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def write_atomgroup(filename, group, color=None, radius=None):
""" write in a vtk file the positions of particles
:param string filename: the filename
:param AtomGroup group: the group, whose positions are to be written 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 correlate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def correlate(a1, a2=None, _normalize=True):
"""
correlate data series using numpy fft. The function calculates \
correlation or cross-correlation.
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _writepdb(interface,
- Create a ticketCreate a ticket
Function _compute_observable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _compute_observable(self, ka1, ka2):
try:
fg1 = self.observable.compute(self.g1, ka1)
except:
fg1 = self.observable.compute(self.g1)
- 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 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def writepdb(self,
- Create a ticketCreate a ticket
Function _remove_COM
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _remove_COM(self, group, inter, alpha, box):
- Create a ticketCreate a ticket
Function label_group
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def label_group(self,
- Create a ticketCreate a ticket
Function _check_missing_attribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _check_missing_attribute(interface, name, classname, group, value):
- Create a ticketCreate a ticket
Function _touched_lines
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _touched_lines(self, atom, _x, _y, _z, _radius):
- Create a ticketCreate a ticket
Function compute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compute(self, inp1, inp2, reference_frame=None):
# by adding a new axis we allow take the difference of positions
# of the N inp atoms to the M reference_group ones.
# pos here has dimension (N,M,3)
- 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 _contact_angles_from_ellipse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _contact_angles_from_ellipse(p, off=0.0):
""" compute the contact angle from the parameters of the polynomial representation
:parms array_like p: a sequence (list, tuple, ndarray) of parameters of the ellipse equation\
in general form:\
- 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 label_planar_sides
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def label_planar_sides(self):
""" Assign to all layers a label (the beta tempfactor)
that can be used in pdb files. Additionally, set
the new layers and sides.
"""
- 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 correlation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def correlation(self, normalized=True, continuous=True):
""" Calculate the autocorrelation from the sampled data
:parameter bool normalized: normalize the correlation function to:
its zero-time value for regular
- 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 guess_radii
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def guess_radii(interface, group=None):
# NOTE: this code depends on the assumption that not-set radii,
# have the value np.nan (see _missing_attributes() ), so don't change it
# let's test first which information is available
guessed = {}
- 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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
universe,
group=None,
alpha=2.0,
normal='guess',
- 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
Avoid too many return
statements within this function. Open
return None
- Create a ticketCreate a ticket
Function sample
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sample(self, g1=None, g2=None, kargs1=None, kargs2=None):
kargs1 = kargs1 or {}
kargs2 = kargs2 or {}
self.n_frames += 1
self.g2 = g2
- 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 compute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compute(self, inp):
try:
pos = inp.atoms.positions
pos = pos.flatten()
except AttributeError:
- 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"