Showing 85 of 713 total issues
File contactangle.py
has 918 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 interface.py
has 572 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 _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
ContactAngle
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class ContactAngle(object):
""" ContactAngle class implementation that uses interfacial atoms to compute\
droplet profiles and contact angles using different approaches.
:param PYTIM interface: Compute the contact angle for this interface
- Create a ticketCreate a ticket
Function _select_coords
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def _select_coords(self, use, bins):
# return lists of array with coordinates falling into the bins that partition the symmetric coordinate.
# The main idea is to use the instantaneous or stored cartesian coordinates (renamed so that z is always
# the surface normal and, in case of cylyndrical symmetry, y points along the cylinder axis.
# The cae of the histogram is different, because the relation, say (x,z) is not necessarily a function.
- 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 itim.py
has 318 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
File gitim.py
has 289 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
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
Function __init__
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
- 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
Function _assign_one_side
has a Cognitive Complexity of 18 (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
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 _ellipse_general_to_canonical
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _ellipse_general_to_canonical(coeffs, check_coeffs=True):
""" Convert general coefficients (a,b,c,d,e,f) to canonical ones.
:param list coeffs : general coefficients
:param bool check_coeffs : raise an error if the coefficients do not represent
- 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_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
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
Interface
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Interface(object):
""" The Interface metaclass. Classes for interfacial determination
(ITIM, GITIM,...) are derived from this one
"""
__metaclass__ = ABCMeta
- Create a ticketCreate a ticket