bionc/protocols/biomechanical_model.py
GenericBiomechanicalModel
has 70 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class GenericBiomechanicalModel(ABC):
"""
This is an abstract base class that provides the basic structure and methods for all biomechanical models.
It contains the segments and the joints of the model. The implemented methods are not specific to numpy or casadi.
- Create a ticketCreate a ticket
File biomechanical_model.py
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from abc import ABC, abstractmethod
from typing import Union, Any
import dill as pickle
import numpy as np
- Create a ticketCreate a ticket
Function set_ground_segment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def set_ground_segment(self, name: str):
"""
This function sets the ground segment of the model
Parameters
- Read upRead up
- Create a ticketCreate a ticket
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"