Showing 147 of 149 total issues

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

    def add_natural_vector_from_segment_coordinates(
Severity: Minor
Found in bionc/bionc_numpy/natural_segment.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_casadi/transformation_matrix.py - About 35 mins to fix

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

def RK4(
Severity: Minor
Found in bionc/utils/ode_solver.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_casadi/joints_with_ground.py - About 35 mins to fix

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 __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

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

def drop_the_box(
Severity: Minor
Found in examples/forward_dynamics/drop_the_box.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_casadi/natural_marker.py - About 35 mins to fix

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

def forward_integration(
Severity: Minor
Found in bionc/utils/ode_solver.py - About 35 mins to fix

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

def forward_integration(
Severity: Minor
Found in examples/knee_parallel_mechanism/utils.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/double_pendulum_universal.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/pendulum_universal.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 __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

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

    def forward_dynamics(
Severity: Minor
Found in bionc/bionc_numpy/biomechanical_model.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 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 __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

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

Severity
Category
Status
Source
Language