Showing 84 of 573 total issues
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 16 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 _assign_one_side
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def _assign_one_side(self,
uplow,
sorted_atoms,
_x,
_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 __init__
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function __init__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
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 __init__
has 11 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,
- Create a ticketCreate a ticket
Function _assign_one_side
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _assign_one_side(self, side):
""" Calculate the interfacial molecules on one side of the box.
"""
# TODO add successive layers
box = self.universe.dimensions[: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 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
Function sample
has 9 arguments (exceeds 4 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):
- Create a ticketCreate a ticket
Function __init__
has a Cognitive Complexity of 10 (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 _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 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 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"