Showing 9 of 40 total issues
Function _join_discrete_other_discrete
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _join_discrete_other_discrete(self, series, fun):
new_domain = self.domain.intersection(series.domain)
assert isinstance(series, DiscreteSeries)
- 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 intersection
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def intersection(self, y):
if self.start > y.start:
return y.intersection(self)
assert self.start <= y.start
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, series, domain=None, fun=lambda k, v: v, x=0, *args, **kwargs):
Function compose
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def compose(self):
"""
Return a DiscreteSet from multiple bunded series.
This does not lose accuracy.
- 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 __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, ser1, ser2, op, *args, **kwargs):
Function SCALAR_LINEAR_INTERPOLATOR
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def SCALAR_LINEAR_INTERPOLATOR(t0, v0, t1, v1, tt):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, data, domain=None,
Function extend_to_point
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def extend_to_point(self, p):
"""
Return a minimally extended interval required to grab point p
:param p: a point, float
:return: new Interval
- 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 __getargs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __getargs(self, args):
if len(args) == 1:
rs, = args
if isinstance(rs, Interval):
args = self.__fromrange(rs)
- 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"