Showing 18 of 20 total issues
Function to_csdfixed
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def to_csdfixed(dec_val, nnz=4, debug=False):
"""Convert the argument to CSD Format."""
if debug:
print(
- 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 to_csd
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def to_csd(dec_val, places=0, debug=False):
"""
Convert the argument `dec_val` to a string in CSD Format.
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 __call__
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, x: Arr, Spsq: float):
"""[summary]
Arguments:
x (Arr): coefficients of autocorrelation
- 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 cutting_plane_q
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_q(Omega, S, t, options=Options()):
"""Cutting-plane method for solving convex discrete optimization problem
Arguments:
Omega ([type]): perform assessment on x0
- 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 to_decimal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def to_decimal(csd_str, debug=False):
"""Convert the CSD string to a decimal"""
if debug:
print("Converting: ", csd_str)
- 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 factor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def factor(self, getA: Callable[[int, int], float]) -> bool:
"""Perform Cholesky Factorization (square-root free version)
Arguments:
getA (callable): function to access symmetric matrix
- 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 cycle_bits
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cycle_bits(i):
global indent_
indent_ += 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 corr_bspline
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def corr_bspline(Y, s, m, oracle, corr_core):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, Ap: Arr, As: Arr, Anr: Arr, Lpsq, Upsq):
Function corr_poly
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def corr_poly(Y, s, m, oracle, corr_core):
Function cutting_plane_feas
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_feas(Omega: Callable[[Any], Any], S, options=Options()) -> CInfo:
"""Find a point in a convex set (defined through a cutting-plane oracle).
Description:
A function f(x) is *convex* if there always exist a g(x)
- 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 cutting_plane_dc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cutting_plane_dc(
Omega: Callable[[Any, Any], Any], S, t, options=Options()
) -> Tuple[Any, Any, CInfo]:
"""Cutting-plane method for solving convex optimization problem
- 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 update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update(self, cut):
"""Update ellipsoid core function using the cut
g' * (x - xc) + beta <= 0
Arguments:
- 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 CUTStatus.success
Avoid too many return
statements within this function. Open
return (g, f), Spsq
Avoid too many return
statements within this function. Open
return (g, f), None
Avoid too many return
statements within this function. Open
return (g, f), None
Function bsearch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def bsearch(
Omega: Callable[[Any], bool], Interval: Tuple, options=Options()
) -> Tuple[Any, CInfo]:
"""[summary]
- 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"