Showing 200 of 200 total issues
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dynamics(
Function muscle_dynamic
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def muscle_dynamic(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dynamics(
Function prepare_ocp
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def prepare_ocp(
Function dynamics
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. 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
def dynamics(
Function system_dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def system_dynamics(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dynamics(
Function dynamics
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dynamics(
Function dynamics
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. 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 system_dynamics
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def system_dynamics(
Function force_model_identification
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def force_model_identification(self):
"""
Performs the force model identification.
Returns
- 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 _sanity_check_id
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _sanity_check_id(
model=None,
n_shooting=None,
final_time_phase=None,
force_tracking=None,
- 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 store_results
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def store_results(self, sol_time, sol_states, sol_parameters, index):
if self.cycle_to_keep == "middle":
# Get the middle phase index to keep
phase_to_keep = int(math.ceil(self.n_simultaneous_cycles / 2))
self.first_node_in_phase = self.n_stim * (phase_to_keep - 1)
- 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 force_model_identification
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def force_model_identification(self) -> dict[str, np.ndarray]:
"""
Performs the force model identification.
Returns
- 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 full_data_extraction
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def full_data_extraction(model_data_path):
"""
Extracts full data from the provided path.
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 _set_constraints
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _set_constraints(constraints, custom_constraint):
if custom_constraint:
for i in range(len(custom_constraint)):
if custom_constraint[i]:
for j in range(len(custom_constraint[i])):
- 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 _fill_dict
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _fill_dict(pulse_event, pulse_duration, pulse_intensity, objective):
"""
This method fills the provided dictionaries with default values if they are not set.
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 set_zero_level
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def set_zero_level(data: np.array, average_length: int = 1000, average_on: list[int, int] = None):
"""
Set the zero level of the data by averaging the first 1000 points
:param data: The data to set the zero level
:param average_length: The number of points to average
- 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 _nmpc_sanity_check
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _nmpc_sanity_check(self):
if not isinstance(self.n_total_cycles, int):
raise TypeError("n_total_cycles must be an integer")
if not isinstance(self.n_simultaneous_cycles, int):
raise TypeError("n_simultaneous_cycles must be an integer")
- 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"