Showing 132 of 200 total issues
Function prepare_ocp
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def prepare_ocp(
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function plot
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
def plot(self, starting_location: str = None, show_rehastim=False):
"""
Plot the muscle stimulation angle of a cycling motion
Parameters
----------
- Read upRead up
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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(
self,
fes_parameters: dict = None,
ivp_parameters: dict = None,
):
Function muscles_joint_torque
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def muscles_joint_torque(
Function _set_objective
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _set_objective(
Function prepare_nmpc
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prepare_nmpc(self):
(pulse_event, pulse_duration, pulse_intensity, objective) = OcpFes._fill_dict(
self.pulse_event, self.pulse_duration, self.pulse_intensity, self.objective
)
Function prepare_ocp
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prepare_ocp(
model: FesModel = None,
n_stim: int = None,
n_shooting: int = None,
final_time: int | float = None,
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dynamics(
Function system_dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def system_dynamics(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dynamics(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dynamics(
Function muscle_dynamic
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def muscle_dynamic(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dynamics(
Function prepare_ocp
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def prepare_ocp(
Function dynamics
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def dynamics(
time: MX,
states: MX,
controls: MX,
parameters: MX,
- Read upRead up
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 dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dynamics(
Function system_dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def system_dynamics(