Showing 105 of 105 total issues
Function adapt_dynamics
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def adapt_dynamics(phase: dict, dynamics: str) -> None:
control_names = DefaultVariablesConfig.dynamics_control.values()
control = DefaultVariablesConfig.dynamics_control[dynamics]
for argument in objective_key_arguments_iterator(phase):
- 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 objective_key_arguments_iterator
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def objective_key_arguments_iterator(phase: dict) -> dict:
"""
Iterates over the arguments of the objectives of the given phase
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 get_dofs_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_dofs_name(nb_q):
# vanilla, with vision, with spine, with spine and vision
straight_nb_q = [10, 14, 22, 26]
pike_nb_q = [16, 20, 28, 32]
tuck_nb_q = [17, 21, 29, 33]
- 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 register_put_nb_somersaults
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def register_put_nb_somersaults(self):
@self.router.put("/nb_somersaults", response_model=NbSomersaultsResponse)
def update_nb_somersaults(nb_somersaults: NbSomersaultsRequest):
"""
Append or pop the half_twists list
- 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 var_bounds_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def var_bounds_list(data: dict, variable_name: str, var_type: BioptimVariable) -> list[dict]:
"""
Return the list of all phases bounds (min and max) and interpolation type for the given variable
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 var_initial_guess_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def var_initial_guess_list(data: dict, variable_name: str, var_type: BioptimVariable) -> list[dict]:
"""
Return the list of all phases initial guess and interpolation type for the given variable
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
File not formatted according to black style guide Open
super().__init__(data, "state_variables")
- Exclude checks
File not formatted according to black style guide Open
return ret
- Exclude checks
File not formatted according to black style guide Open
return constraints
- Exclude checks
File not formatted according to black style guide Open
return objectives
- Exclude checks
File not formatted according to black style guide Open
pass # disable
- Exclude checks
File not formatted according to black style guide Open
return x_bounds
- Exclude checks
File not formatted according to black style guide Open
main()
- Exclude checks
File not formatted according to black style guide Open
return objective
- Exclude checks
File not formatted according to black style guide Open
]
- Exclude checks
File not formatted according to black style guide Open
router.include_router(code_generation_router)
- Exclude checks
File not formatted according to black style guide Open
return constraints
- Exclude checks
File not formatted according to black style guide Open
)
- Exclude checks
File not formatted according to black style guide Open
)
- Exclude checks
File not formatted according to black style guide Open
return ret
- Exclude checks