Showing 132 of 200 total issues
Function f_dot_fun
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f_dot_fun(
Function f_dot_fun
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f_dot_fun(
Avoid deeply nested control flow statements. Open
Open
for k in range(1, len(time[j])):
if counter == 9:
counter = 0
else:
remove_list.append(k)
Function system_dynamics
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def system_dynamics(
Function system_dynamics
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def system_dynamics(
Avoid deeply nested control flow statements. Open
Open
for k in range(1, len(sliced_time[j])):
if counter == 9:
counter = 0
else:
remove_list.append(k)
Function inverse_kinematics_cycling
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def inverse_kinematics_cycling(
Avoid deeply nested control flow statements. Open
Open
if isinstance(fixed_pulse_intensity, list):
parameters_bounds.add(
parameter_name,
min_bound=np.array(fixed_pulse_intensity),
max_bound=np.array(fixed_pulse_intensity),
Avoid deeply nested control flow statements. Open
Open
for k in range(len(sliced_data)):
remove_list = []
counter = 0
for m in range(1, len(sliced_data[k][j])):
if counter == 9:
Avoid deeply nested control flow statements. Open
Open
if saving_pickle_path_list[:-4] == ".pkl":
save_pickle_path = saving_pickle_path_list[:-4] + "_" + str(i) + ".pkl"
else:
save_pickle_path = saving_pickle_path_list[0] + "_" + str(i) + ".pkl"
else:
Function muscles_joint_torque
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def muscles_joint_torque(
time: MX | SX,
states: MX | SX,
controls: MX | SX,
parameters: MX | SX,
- 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
Avoid deeply nested control flow statements. Open
Open
for k in range(len(peaks)):
plt.plot(time[peaks[k]], filtered_6d_force[0][peaks[k]], "x")
if down_sample:
Avoid deeply nested control flow statements. Open
Open
if down_sample:
for k in range(len(sliced_time)):
plt.plot(temp_time[k], temp_data[0][k])
plt.show()
Avoid deeply nested control flow statements. Open
Open
for k in range(len(filtered_6d_force)):
remove_list = []
counter = 0
for m in range(1, len(filtered_6d_force[k][j])):
if counter == 9:
Avoid deeply nested control flow statements. Open
Open
for k in range(len(sliced_time)):
plt.plot(sliced_time[k], sliced_data[0][k])
for k in range(len(peaks)):
Avoid deeply nested control flow statements. Open
Open
if k == 0:
force = result["F"][0][-1]
calcium = result["Cn"][0][-1]
a = result["A"][0][-1]
km = result["Km"][0][-1]
Function get_muscle_force
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_muscle_force(self, local_torque_force_vector):
self.all_biceps_force_vector = []
for i in range(len(local_torque_force_vector)):
self.biceps_force_vector = []
for j in range(len(local_torque_force_vector[i][0])):
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function _set_objective
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _set_objective(model, n_stim, n_shooting, force_tracking, custom_objective, **kwargs):
Avoid deeply nested control flow statements. Open
Open
for l in remove_list:
sliced_time[j].pop(l)