Showing 96 of 96 total issues
Function stream_cmd_call
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def stream_cmd_call(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function hash_digest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def hash_digest(
Function approx_time_wrt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def approx_time_wrt(
Function gen_list
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def gen_list(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _re_leaf
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _re_leaf(cls: type[Self], at: str, items: Mapping[str, Any]) -> Iterable[tuple[str, Any]]:
for k, v in items.items():
me = at + "." + k if len(at) > 0 else k
if hasattr(v, "items") and hasattr(v, "keys") and hasattr(v, "values"):
yield from cls._re_leaf(me, v)
- 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 status
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def status(level: int | str | CodeStatus, vr: str | None = "", msg: str | None = None) -> Callable[..., Any]:
"""
Annotate code quality. Emits a warning if bad code is called.
Args:
- 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 normalize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def normalize(self: Self) -> Self:
s = ""
if self.append:
s += "a"
elif self.safe:
- 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 _un_leaf
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _un_leaf(cls: type[Self], to: MutableMapping[str, Any], items: Mapping[str, Any]) -> None:
for k, v in items.items():
if "." not in k:
to[k] = v
else:
- 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 "⟨" + s + addr + "⟩"
Avoid too many return
statements within this function. Open
return obj._asdict()
Avoid too many return
statements within this function. Open
return data.tolist()
Avoid too many return
statements within this function. Open
return [self.prepare(e, inf_handling=inf_handling, nan_handling=nan_handling) for e in data]
Avoid too many return
statements within this function. Open
return str(data)
Avoid too many return
statements within this function. Open
return s
Avoid too many return
statements within this function. Open
return str(thing)
Avoid too many return
statements within this function. Open
return then.strftime(_today + "%H:%M:%S.%f")
Avoid too many return
statements within this function. Open
return then.strftime(_today + "%H:%M:%S")
Avoid too many return
statements within this function. Open
return obj.Self