Showing 84 of 573 total issues
Function label_group
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def label_group(self,
- Create a ticketCreate a ticket
Function fit_arc_
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fit_arc_(z, r, rmin=None, rmax=None, use_points=False, p0=None):
- Create a ticketCreate a ticket
Function remove_COM
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove_COM(self, removeCOM, droplet, inter, alpha, box):
- Create a ticketCreate a ticket
Function arc_function
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def arc_function(self, r, rmin=0, rmax=None, use_points=False, base_cut=None):
- Create a ticketCreate a ticket
Function fit_points_ellipse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fit_points_ellipse(self, rmax=None, rmin=None, bins=None, yy=None, use_points=False):
- Create a ticketCreate a ticket
Function sample_theta_R
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sample_theta_R(self, bins, th_left, th_right, RR_left, RR_right):
- Create a ticketCreate a ticket
Function sample
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sample(self, bins=100, params=None, binning='theta', periodic=None, base_cut=0.0):
- Create a ticketCreate a ticket
Function sample_theta_R
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sample_theta_R(self, bins, theta, r, z, base_cut):
- Create a ticketCreate a ticket
Function writepdb
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def writepdb(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 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 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 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 __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
Function sample
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def sample(self, inter, bins=100, cut=3.5, alpha=2.5, pdbOut=None, binning='theta', periodic=None, removeCOM=None, base_cut=0.0):
""" compute the height profile z(r) of a droplet
:param int bins : number of slices along the z axis (across the whole box z-edge)
:param float cut : cut-off for the clustering algorithm that separates liquid from vapor
- 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
Avoid too many return
statements within this function. Open
return None
- Create a ticketCreate a ticket
Function assign_normal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assign_normal(self, normal):
interface = self.interface
if not (interface.symmetry == 'planar'):
raise ValueError(" wrong symmetry for normal assignement")
if interface.analysis_group is 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
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compute(self, inp, kargs=None):
"""Compute the observable.
:param ndarray inp: the input atom group. The length must be a multiple
of three
- 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"