Showing 31 of 31 total issues

Function collect has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def collect(coro, index, results,
Severity: Minor
Found in paco/concurrent.py - About 35 mins to fix

    Function race has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def race(iterable, loop=None, timeout=None, *args, **kw):
    Severity: Minor
    Found in paco/race.py - About 35 mins to fix

      Function repeat has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def repeat(coro, times=1, step=1, limit=1, loop=None):
      Severity: Minor
      Found in paco/repeat.py - About 35 mins to fix

        Function until has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def until(coro, coro_test, assert_coro=None, *args, **kw):
        Severity: Minor
        Found in paco/until.py - About 35 mins to fix

          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
          Severity: Minor
          Found in paco/concurrent.py - About 35 mins to fix

          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.
          
          
          Severity: Minor
          Found in paco/decorator.py - About 35 mins to fix

          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.
          
          
          Severity: Minor
          Found in paco/dropwhile.py - About 35 mins to fix

          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.
          
          
          Severity: Minor
          Found in paco/pipe.py - About 25 mins to fix

          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.
          
          
          Severity: Minor
          Found in paco/every.py - About 25 mins to fix

          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.
          Severity: Minor
          Found in paco/some.py - About 25 mins to fix

          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.
          
          
          Severity: Minor
          Found in paco/filter.py - About 25 mins to fix

          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

          Severity
          Category
          Status
          Source
          Language