Showing 31 of 31 total issues
Function currier
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def currier(arity, acc, fn, *args, **kw):
Function whilst
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def whilst(coro, coro_test, assert_coro=None, *args, **kw):
Function filter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def filter(coro, iterable, assert_fn=None, limit=0, loop=None):
Function until
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def until(coro, coro_test, assert_coro=None, *args, **kw):
Function _run_sequentially
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _run_sequentially(self):
# Store futures in two queues
done, pending = [], []
# Run until the pool is empty
- 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 dropwhile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def dropwhile(coro, iterable, loop=None):
"""
Make an iterator that drops elements from the iterable as long as the
predicate is true; afterwards, returns every element.
- 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 generator_consumer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def generator_consumer(coro): # pragma: no cover
"""
Decorator wrapper that consumes sync/async generators provided as
interable input argument.
- 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 overload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def overload(fn):
"""
Overload a given callable object to be used with ``|`` operator
overloading.
- 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 some
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def some(coro, iterable, limit=0, timeout=None, loop=None):
"""
Returns `True` if at least one element in the iterable satisfies the
asynchronous coroutine test. If any iteratee call returns `True`,
iteration stops and `True` will be returned.
- 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 every
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def every(coro, iterable, limit=1, loop=None):
"""
Returns `True` if every element in a given iterable satisfies the coroutine
asynchronous test.
- 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 filter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def filter(coro, iterable, assert_fn=None, limit=0, loop=None):
"""
Returns a list of all the values in coll which pass an asynchronous truth
test coroutine.
- 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"