Showing 83 of 571 total issues
File interface.py
has 561 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 abc import ABCMeta, abstractmethod
import numpy as np
from .properties import _create_property
- Create a ticketCreate a ticket
Function sample
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def sample(self, bins=100, params=None, binning='theta', periodic=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)
"""
- 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 _set_default_values
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def _set_default_values(self, generalized_coordinate, max_distance, nbins):
self.dimensions = np.asarray(self.coords_in).shape[0]
self.dimensions_out = np.asarray(self.coords_out).shape[0]
self.generalized_coordinate = generalized_coordinate
- 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
File contactangle.py
has 402 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
""" Module: ContactAngle
====================
"""
- Create a ticketCreate a ticket
File itim.py
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
""" Module: itim
============
- Create a ticketCreate a ticket
File correlator.py
has 302 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
""" Module: Correlator
==================
"""
- Create a ticketCreate a ticket
File profile.py
has 299 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
""" Module: Profile
===============
"""
- Create a ticketCreate a ticket
Function _assign_layers
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def _assign_layers(self):
""" Determine the ITIM layers.
Note that the multiproc option is mainly for debugging purposes:
>>> import MDAnalysis as mda
- 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
File gitim.py
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
""" Module: gitim
=============
- Create a ticketCreate a ticket
File rdf.py
has 269 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
""" Module: RDF
===========
"""
- Create a ticketCreate a ticket
File basic_observables.py
has 268 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
""" Module: basic_observables
=========================
"""
- Create a ticketCreate a ticket
File __init__.py
has 262 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
""" Location of data files for Pytim examples and tests
====================================================
- Create a ticketCreate a ticket
Function compute_sasa
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def compute_sasa(self, group):
box = group.universe.dimensions[:3]
self.Rmax = np.max(group.radii)
self.tree = cKDTree(group.positions, boxsize=box)
self.sasa_group = group
- 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 17 (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 __init__
has 18 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- Create a ticketCreate a ticket
File distributionfunction.py
has 257 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
""" Module: DistributionFunction
============================
"""
- Create a ticketCreate a ticket
Function patchTrajectory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def patchTrajectory(trajectory, interface):
""" Patch the MDAnalysis trajectory class
this patch makes the layer assignement being automatically
called whenever a new frame is loaded.
- 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 _atom_coverage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _atom_coverage(self, index):
# derivation follows http://freesasa.github.io/doxygen/Geometry.html
group = self.sasa_group
box = group.universe.dimensions[:3]
R = group.radii[index]
- 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 _define_cluster_group
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _define_cluster_group(self):
self.universe.atoms.pack_into_box()
self.cluster_group = self.universe.atoms[:0] # empty
if (self.cluster_cut is not None):
cluster_cut = float(self.cluster_cut[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
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