pygae/galgebra

View on GitHub

Showing 281 of 843 total issues

Refactor this function to reduce its Cognitive Complexity from 48 to the 15 allowed.
Open

    def _latex(self, print_obj: _LatexPrinter) -> str:
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed.
Open

def Fmt(obj, fmt=0):
Severity: Critical
Found in galgebra/printer.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
Open

    def even_odd(self, A: Expr, even: bool = True) -> Expr:  # Return even or odd part of A
Severity: Critical
Found in galgebra/ga.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
Open

    def Add(dop1, dop2):
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.
Open

    def signature(self):
Severity: Critical
Found in galgebra/metric.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 41 to the 15 allowed.
Open

    def _print_Pow(self, expr):
Severity: Critical
Found in galgebra/printer.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 46 to the 15 allowed.
Open

    def _sympystr(self, print_obj: printer.GaPrinter) -> str:
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Method "__init__" has 8 parameters, which is greater than the 7 authorized.
Open

    def __init__(self, __u, __coords, *, ga, norm=False, name=None, root='e', debug=False):
Severity: Major
Found in galgebra/ga.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
Open

def linear_expand(expr):
Severity: Critical
Found in galgebra/metric.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 57 to the 15 allowed.
Open

    def __init__(
Severity: Critical
Found in galgebra/metric.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.
Open

    def __init__(self, *args, ga, f=False, mode='g'):
Severity: Critical
Found in galgebra/lt.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.
Open

    def characterise_Mv(self) -> None:
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 44 to the 15 allowed.
Open

    def grad_sqr(self, A, grad_sqr_mode, mode, left):
Severity: Critical
Found in galgebra/ga.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
Open

    def __init__(self, f, Ga, nargs=None, fct=False):
Severity: Critical
Found in galgebra/lt.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
Open

def tex(paper=(14, 11), debug=False, prog=False, pt='10pt'):
Severity: Critical
Found in galgebra/printer.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
Open

    def grade_decomposition(self, A: _MaybeMv) -> Dict[int, _MaybeMv]:
Severity: Critical
Found in galgebra/ga.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.
Open

    def exp(self, hint: str = '-') -> 'Mv':  # Calculate exponential of multivector
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.
Open

    def Dop_mv_expand(self, modes=None) -> List[Tuple[Expr, Expr]]:
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 32 to the 15 allowed.
Open

    def _sympystr(self, print_obj: _StrPrinter) -> str:
Severity: Critical
Found in galgebra/mv.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Method "__init__" has 10 parameters, which is greater than the 7 authorized.
Open

        self, basis, *,
        g=None,
        coords=None,
        X=None,
        norm=False,
Severity: Major
Found in galgebra/metric.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...
Severity
Category
Status
Source
Language