Showing 85 of 713 total issues
Function _fit_circle
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _fit_circle(hr, hh, nonlinear=True):
""" fit an arc through the profile h(r) sampled by the class
:param list hr: list of arrays with the radial coordinates
:param list hh: list of arrays with the elevations
- 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 _center
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _center(group, direction, halfbox_shift=False):
"""
Centers the liquid slab in the simulation box.
The algorithm tries to avoid problems with the definition
- 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 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function __init__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
direction=None,
observable=None,
interface=None,
symmetry='default',
- 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 center_system
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def center_system(symmetry, group, direction, planar_to_origin=False):
if symmetry == 'planar':
utilities.centerbox(group.universe, center_direction=direction)
Interface._center(group, direction, halfbox_shift=True)
utilities.centerbox(group.universe, center_direction=direction)
- 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 assign_universe
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def assign_universe(self, universe, analysis_group):
""" Assign the universe and the analysis_group
"""
self.interface._mode = self._check_universe(universe)
if self.interface._mode 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 patchMDTRAJ
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def patchMDTRAJ(trajectory, universe):
""" Patch the mdtraj Trajectory class
automates the data exchange between MDAnalysis and mdtraj classes
- 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 select_direction
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def select_direction(self, arg):
_dirs = {'x': 0, 'y': 1, 'z': 2}
def _inarg(string, inp):
return np.any([string in e for e in inp])
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def compute(self, inp, kargs=None):
""" Compute the local reference frame
:param AtomGroup inp: the group of atoms that define the surface
:returns: a (len(inp),3,3) set of coordinates defining
- 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 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function centerbox
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def centerbox(universe,
- Create a ticketCreate a ticket
Function _assign_one_side
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _assign_one_side(self,
- Create a ticketCreate a ticket
Function write_file
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_file(filename,
- Create a ticketCreate a ticket
Function _compute_local_coords
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _compute_local_coords(self, box):
local_coords = []
for i, patch in enumerate(self.patches):
p = self.tree.data[patch].copy()
p = self.remove_pbc(p, box)
- 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 assign_cluster_params
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def assign_cluster_params(self,
cluster_cut,
cluster_threshold_density,
extra_cluster_groups):
elements = 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 _fit_ellipse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fit_ellipse(x, y, nonlinear=True, off=0.0, points_density=25, verbose=False):
- Create a ticketCreate a ticket
Function _fit_ellipsoid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _fit_ellipsoid(x, y, z, nonlinear=True, off=0.0, points_density=25):
""" fit an ellipsoid through the points (x,y,z)
: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"
Further reading
Function _fit_ellipsoid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fit_ellipsoid(x, y, z, nonlinear=True, off=0.0, points_density=25):
- Create a ticketCreate a ticket
Function dont_skip_any_doctests
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def dont_skip_any_doctests(app, what, name, obj, skip, options):
- Create a ticketCreate a ticket
Function _remove_COM
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _remove_COM(self, group, inter, alpha, box):
def group_size(g, direction):
p = g.atoms.positions[:, direction]
return np.abs(np.max(p) - np.min(p))
- 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"