pygae/galgebra

View on GitHub

Showing 899 of 899 total issues

Avoid too many return statements within this function.
Open

            return selfxA.blade_rep()
Severity: Major
Found in galgebra/mv.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return s
    Severity: Major
    Found in galgebra/mv.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return 0
      Severity: Major
      Found in galgebra/mv.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return self.Mul(er, blade, mode=mode)
        Severity: Major
        Found in galgebra/ga.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return selfxA.blade_rep()
          Severity: Major
          Found in galgebra/mv.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return self.right_contract(A, B)
            Severity: Major
            Found in galgebra/ga.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return self.Mul(blade, er, mode=mode)
              Severity: Major
              Found in galgebra/ga.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return -expr
                Severity: Major
                Found in galgebra/metric.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return 0
                  Severity: Major
                  Found in galgebra/ga.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return tex % (self._print(expr.base),
                    Severity: Major
                    Found in galgebra/printer.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return mv.Mv(root, *args, **kwargs)
                      Severity: Major
                      Found in galgebra/ga.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                            return tmp
                        Severity: Major
                        Found in galgebra/mv.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return sgn * result * self._ga.indexes_to_blades_dict[tuple(index)]
                          Severity: Major
                          Found in galgebra/ga.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return Mv(self.Ga.mul(self.obj, A.obj), ga=self.Ga)
                            Severity: Major
                            Found in galgebra/mv.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return +expr
                              Severity: Major
                              Found in galgebra/metric.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return r"\frac{%s}{%s}" % \
                                Severity: Major
                                Found in galgebra/printer.py - About 30 mins to fix

                                  Function base_expansion_dict has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def base_expansion_dict(self) -> OrderedDict[Symbol, Expr]:
                                          """ dictionary expanding base basis in terms of blade basis """
                                          base_expansion_dict = OrderedDict()
                                  
                                          for base, blade, index in zip(self.bases.flat, self.blades.flat, self.indexes.flat):
                                  Severity: Minor
                                  Found in galgebra/ga.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 grades has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def grades(self, A: Expr) -> List[int]:  # Return list of grades present in A
                                          A = self.base_to_blade_rep(A)
                                          A = expand(A)
                                          blades = set()
                                          if isinstance(A, Add):
                                  Severity: Minor
                                  Found in galgebra/ga.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 parse_line has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def parse_line(line: str, op_order: List[str]) -> str:
                                      line = line.replace(' ', '')
                                      level_lst = _parse_paren(line)
                                      ilevel = 0
                                      for level in level_lst:
                                  Severity: Minor
                                  Found in galgebra/_utils/parser.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 blade_expansion_dict has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def blade_expansion_dict(self) -> OrderedDict[Symbol, Expr]:
                                          """ dictionary expanding blade basis in terms of base basis """
                                  
                                          blade_expansion_dict = OrderedDict()
                                  
                                  
                                  Severity: Minor
                                  Found in galgebra/ga.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