Showing 157 of 157 total issues
Function separate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def separate(pred: Func, seq: Seq, consume: bool = False) -> (Seq, Seq):
"""
Split sequence it two. The first consists of items that pass the
predicate and the second of those items that don't.
- 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 keywords
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def keywords(self, how="short") -> Dict[str, type]:
"""
Return a dictionary with signatures of function keyword parameters.
"""
keywords = {}
- 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 impure
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def impure(name, tt, ns, *, arity=None, flip=False):
Function casedispatch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def casedispatch(typ):
"""
Decorator that declares a method that participates in a case dispatch.
Example::
- 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 lazy
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def lazy( # type: ignore
Function retry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def retry(n: int, func: Func, *, error: Catchable = Exception, sleep=None) -> fn:
Function indexed
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def indexed(transform, func: Callable, seq: Seq, *, start=0) -> Seq:
Function do
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(func, x, /, *args, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, children=(), *, parent=None, leaf_class=None, **kwargs):
Function _create_fn_functions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _create_fn_functions(mod, ns, arities=None, flipped=(), blacklist=()):
Function chunks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def chunks(
Function flip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def flip(self, x, y, /, *args, **kwargs):
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(mcs, name, bases, ns, use_invalid=False, **kwargs):
Function function
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def function(sub, st, *, start=0, end=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function unique
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def unique(seq: Seq, *, key: Func = None, exclude: Seq = (), slow=False) -> Iter:
Function join
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def join(leftkey: Func, leftseq: Seq, rightkey: Func, rightseq: Seq, **kwargs) -> Iter:
Function from_semigroup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_semigroup(cls, semigroup, unit=None, unit_factory=None, *, inv):
Function throttle
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def throttle(
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(mcs, name, bases, ns, *, type=None):