Showing 96 of 96 total issues
Avoid too many return
statements within this function. Open
return obj.Self
Avoid too many return
statements within this function. Open
return base64.b64decode(bytes(obj))
Avoid too many return
statements within this function. Open
return data
Avoid too many return
statements within this function. Open
return s
Avoid too many return
statements within this function. Open
return base64.b64decode(obj)
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 then.strftime(_today + "%H:%M:%S.%f")
Avoid too many return
statements within this function. Open
return wraps(func)(my_fn)
Avoid too many return
statements within this function. Open
return obj._asdict()
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]
Function _exclude_fn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _exclude_fn(cls: type[Self], exclude) -> Callable[str, bool]:
if exclude is None or exclude is False:
return lambda s: False
if isinstance(exclude, str):
return lambda s: s == exclude
- 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 build_traceback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_traceback(self: Self, e: BaseException) -> Sequence[Frame]:
tb = []
current = None
tbe = traceback.TracebackException.from_exception(e)
last, repeats = None, 0
- 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 hash_digest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def hash_digest(
self: Self,
data: SupportsBytes | str,
algorithm: HashAlgorithm,
*,
- 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 get_list_as
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_list_as(self: Self, items: str, as_type: type[T], default: list[T] | None = None) -> list[T]:
"""
Gets list values from an *optional* key.
"""
try:
- 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 write
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def write(
self: Self,
data: Any,
path: PathLike,
*,
- 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 sanitize_nodes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sanitize_nodes(
self: Self,
bits: Sequence[PurePath | str],
*,
is_file: bool | None = None,
- 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"