smok-serwis/firanka

View on GitHub

Showing 9 of 40 total issues

Function _join_discrete_other_discrete has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    def _join_discrete_other_discrete(self, series, fun):
        new_domain = self.domain.intersection(series.domain)

        assert isinstance(series, DiscreteSeries)

Severity: Minor
Found in firanka/series/base.py - About 1 hr 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 intersection has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def intersection(self, y):
        if self.start > y.start:
            return y.intersection(self)

        assert self.start <= y.start
Severity: Minor
Found in firanka/intervals.py - About 1 hr 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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, series, domain=None, fun=lambda k, v: v, x=0, *args, **kwargs):
Severity: Minor
Found in firanka/series/base.py - About 45 mins to fix

    Function compose has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def compose(self):
            """
            Return a DiscreteSet from multiple bunded series.
            This does not lose accuracy.
    
    
    Severity: Minor
    Found in firanka/series/bundle.py - About 45 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 __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, ser1, ser2, op, *args, **kwargs):
    Severity: Minor
    Found in firanka/series/base.py - About 35 mins to fix

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

      def SCALAR_LINEAR_INTERPOLATOR(t0, v0, t1, v1, tt):
      Severity: Minor
      Found in firanka/series/interpolations.py - About 35 mins to fix

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

            def __init__(self, data, domain=None,
        Severity: Minor
        Found in firanka/series/interpolations.py - About 35 mins to fix

          Function extend_to_point has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def extend_to_point(self, p):
                  """
                  Return a minimally extended interval required to grab point p
                  :param p: a point, float
                  :return: new Interval
          Severity: Minor
          Found in firanka/intervals.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 __getargs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def __getargs(self, args):
                  if len(args) == 1:
                      rs, = args
                      if isinstance(rs, Interval):
                          args = self.__fromrange(rs)
          Severity: Minor
          Found in firanka/intervals.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