Showing 153 of 153 total issues

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

    def inverse_dynamics(
Severity: Minor
Found in bionc/bionc_numpy/natural_segment.py - About 35 mins to fix

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

    def from_cartesian_inertial_parameters(
Severity: Minor
Found in bionc/bionc_casadi/natural_inertial_parameters.py - About 35 mins to fix

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

def drop_the_pendulum(
Severity: Minor
Found in examples/forward_dynamics/n_link_pendulum.py - About 35 mins to fix

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

def compute_transformation_matrix(
Severity: Minor
Found in bionc/bionc_numpy/transformation_matrix.py - About 35 mins to fix

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

        def __init__(
Severity: Minor
Found in bionc/bionc_numpy/joints_with_ground.py - About 35 mins to fix

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

    def constraints_jacobian(self, Q: NaturalCoordinates) -> MX:
        """
        This function returns the joint constraints of all joints, denoted K_k
        as a function of the natural coordinates Q.

Severity: Minor
Found in bionc/bionc_casadi/biomechanical_model_joints.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 constraints_jacobian_derivative has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def constraints_jacobian_derivative(self, Qdot: NaturalVelocities) -> MX:
        """
        This function returns the derivative of the Jacobian matrix of the joint constraints denoted K_k_dot

        Parameters
Severity: Minor
Found in bionc/bionc_casadi/biomechanical_model_joints.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 __new__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def __new__(cls, input_array: MX | np.ndarray | list | tuple):
        """
        Create a new instance of the class.
        """

Severity: Minor
Found in bionc/bionc_casadi/natural_vector.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 check_format_experimental_heatmaps has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def check_format_experimental_heatmaps(experimental_heatmaps: dict):
    """
    Checks that the experimental heatmaps are correctly formatted

    Parameters
Severity: Minor
Found in bionc/utils/heatmap_helpers.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 constraints_jacobian has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def constraints_jacobian(self, Q: NaturalCoordinates) -> np.ndarray:
        """
        This function returns the Jacobian matrix the joint constraints, denoted K_k
        as a function of the natural coordinates Q.

Severity: Minor
Found in bionc/bionc_numpy/biomechanical_model_joints.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 compute_transformation_matrix has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def compute_transformation_matrix(
    matrix_type: TransformationMatrixType, length: float, alpha: float, beta: float, gamma: float
):
    """
    Create a transformation matrix from a TransformationMatrixType
Severity: Minor
Found in bionc/bionc_numpy/transformation_matrix.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 __new__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def __new__(cls, input_array: MX | np.ndarray | list | tuple):
        """
        Create a new instance of the class.
        """

Severity: Minor
Found in bionc/bionc_casadi/natural_vector.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 compute_transformation_matrix has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def compute_transformation_matrix(
    matrix_type: TransformationMatrixType, length: float, alpha: float, beta: float, gamma: float
):
    """
    Create a transformation matrix from a TransformationMatrixType
Severity: Minor
Found in bionc/bionc_casadi/transformation_matrix.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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        def __init__(
            self,
            name: str,
            child: NaturalSegment,
            parent_axis: tuple[CartesianAxis] | list[CartesianAxis],
Severity: Minor
Found in bionc/bionc_numpy/joints_with_ground.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 _add_joint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def _add_joint(self, joint: dict, segments: GenericBiomechanicalModelSegments):
        """
        This function adds a joint to the biomechanical model. It is not recommended to use this function directly.

        Parameters
Severity: Minor
Found in bionc/protocols/biomechanical_model_joints.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 __new__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def __new__(cls, input_array: MX | np.ndarray | list | tuple):
        """
        Create a new instance of the class.
        """

Severity: Minor
Found in bionc/bionc_casadi/cartesian_vector.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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        def __init__(
            self,
            name: str,
            child: NaturalSegment,
            parent_axis: tuple[CartesianAxis] | list[CartesianAxis],
Severity: Minor
Found in bionc/bionc_casadi/joints_with_ground.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 constraints_jacobian_derivative has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def constraints_jacobian_derivative(self, Qdot: NaturalVelocities) -> np.ndarray:
        """
        This function returns the derivative of the Jacobian matrix of the joint constraints denoted K_k_dot

        Parameters
Severity: Minor
Found in bionc/bionc_numpy/biomechanical_model_joints.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

Avoid too many return statements within this function.
Open

        return _transformation_matrix_Bwv(length, alpha, beta, gamma)
Severity: Major
Found in bionc/bionc_casadi/transformation_matrix.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return _transformation_matrix_Bwv(length, alpha, beta, gamma)
Severity: Major
Found in bionc/bionc_numpy/transformation_matrix.py - About 30 mins to fix
Severity
Category
Status
Source
Language