Showing 127 of 127 total issues
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return np.all(self.contains(x))
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return (
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return np.sum((x - self.center._x)**2, axis=1) > self.radius**2
Avoid too many return
statements within this function. Open
return np.sum((x - self.center._x)**2, axis=1) < self.radius**2
Avoid too many return
statements within this function. Open
return (-other).contains(-self)
Avoid too many return
statements within this function. Open
return np.logical_not(border.contains_points(np.atleast_2d(x)))
Avoid too many return
statements within this function. Open
return np.all(self.contains(x))
Avoid too many return
statements within this function. Open
return (
Avoid too many return
statements within this function. Open
return (-other).contains(-self)
Function rotate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rotate(self, theta, point=None, axis=None):
"""Rotates the Polygon around an axis which passes through a point by
theta radians."""
for v in self.vertices:
v.rotate(theta, point, axis)
- Read upRead up
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 plot_geometry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def plot_geometry(geometry, axis=None, alpha=None, c=None, z=0.0, t=0.0001):
"""Plot a :class:`.Entity` on the given axis.
Parameters
----------
- Read upRead up
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 ssim
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ssim(
img1,
img2,
sigma=1.2,
L=1,
- Read upRead up
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 _full_reference_input_check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _full_reference_input_check(img0, img1, sigma, nlevels, L):
"""Checks full reference quality measures for valid inputs."""
if nlevels <= 0:
raise ValueError('nlevels must be >= 1.')
if sigma < 1.2:
- Read upRead up
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 discrete_geometry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def discrete_geometry(geometry, psize, ratio=9):
"""Draw the geometry onto a patch the size of its bounding box.
Parameters
----------
- Read upRead up
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 msssim
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def msssim(
img0,
img1,
nlevels=5,
sigma=1.2,
- Read upRead up
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
Line too long (80 > 79 characters) Open
pairs = [(23, 12), (12, 19), (29, 11), (22, 5), (1, 3), (21, 9), (8, 2),
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.