Showing 899 of 899 total issues
Function abs_with_hint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def abs_with_hint(expr, hint: str = '0') -> Expr:
"""
Heuristics for simplifying the absolute value of an expression with hints.
"""
- 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 _consolidate_terms
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _consolidate_terms(terms):
"""
Remove zero coefs and consolidate coefs with repeated pdiffs.
"""
new_coefs = []
- 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 _repr_latex_
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _repr_latex_(self):
f = None
try:
# This isn't perfect, in principle there could be multiple
# active IPython's with different configurations.
- 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 Add
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def Add(sdop1, sdop2):
if isinstance(sdop1, Sdop) and isinstance(sdop2, Sdop):
return Sdop(_merge_terms(sdop1.terms, sdop2.terms))
else:
# convert values to multiplicative operators
- 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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, *args):
if len(args) == 1:
if isinstance(args[0], Symbol):
self.__init_from_symbol(*args)
elif isinstance(args[0], (list, tuple)):
- 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 _print_Derivative
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _print_Derivative(self, expr):
# Break the following to support both py 2 & 3
# function, *diff_args = expr.args
function = expr.args[0]
diff_args = expr.args[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
Avoid too many return
statements within this function. Open
return tmp
Avoid too many return
statements within this function. Open
return r"{%s}^{%s}" % (self._print(expr.base), self._print(expr.exp))
Avoid too many return
statements within this function. Open
return tex[1:].strip()
Avoid too many return
statements within this function. Open
return lt_M
Avoid too many return
statements within this function. Open
return tmp
Avoid too many return
statements within this function. Open
return (A, 0)
Avoid too many return
statements within this function. Open
return (0, A)
Avoid too many return
statements within this function. Open
return A
Avoid too many return
statements within this function. Open
return mv.Mv(lt_M, ga=self.Ga)
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return c
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return A > B
Avoid too many return
statements within this function. Open
return A