Showing 84 of 573 total issues
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 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 __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 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 centerbox
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def centerbox(universe,
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- 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 __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- 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 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 _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 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 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 _writepdb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _writepdb(interface,
- 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 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 _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