Showing 147 of 149 total issues
Function create_knee_model
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_knee_model() -> BiomechanicalModel:
"""
This function creates a biomechanical model of a knee with a parallel mechanism.
Data from
- Create a ticketCreate a ticket
Function euler_axes_from_rotation_matrices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def euler_axes_from_rotation_matrices(
R_0_parent: MX,
R_0_child: MX,
sequence: EulerSequence,
axes_source_frame: str = "mixed",
- 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"
Further reading
Function holonomic_constraints
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def holonomic_constraints(self, Q: NaturalCoordinates) -> MX:
"""
This function returns the holonomic constraints of the system, denoted Phi_h
as a function of the natural coordinates Q. They are organized as follow, for each segment:
[Phi_k_0, Phi_r_0, Phi_k_1, Phi_r_1, ..., Phi_k_n, Phi_r_n]
- 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"
Further reading
Function euler_axes_from_rotation_matrices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def euler_axes_from_rotation_matrices(
R_0_parent: np.ndarray,
R_0_child: np.ndarray,
sequence: EulerSequence,
axes_source_frame: str = "mixed",
- 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"
Further reading
Function holonomic_constraints
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def holonomic_constraints(self, Q: NaturalCoordinates) -> np.ndarray:
"""
This function returns the holonomic constraints of the system, denoted Phi_h
as a function of the natural coordinates Q. They are organized as follow, for each segment:
[Phi_k_0, Phi_r_0, Phi_k_1, Phi_r_1, ..., Phi_k_n, Phi_r_n]
- 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"
Further reading
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function from_data
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_data(
- Create a ticketCreate a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function from_data
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_data(
- Create a ticketCreate a ticket
Function from_data
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_data(
- Create a ticketCreate a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def main(initial_pose: str = "hanged", show_results: bool = True):
model = build_two_link_segment()
if initial_pose == "hanged":
Q0 = SegmentNaturalCoordinates([1, 0, 0, 0, 0, 0, 0, 0, -0.8, 0, -1, 0])
- 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"
Further reading
Function main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def main(initial_pose: str = "hanged", show_results: bool = True):
model = build_two_link_segment()
if initial_pose == "hanged":
Q0 = SegmentNaturalCoordinates([1, 0, 0, 0, 0, 0, 0, 0, -0.8, 0, -1, 0])
- 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"
Further reading
Function main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def main(mode: str = "x_revolute", show_structure: bool = False, show_results: bool = True):
# Let's create a model
model = BiomechanicalModel()
# fill the biomechanical model with the segment
model["pendulum"] = NaturalSegment.with_cartesian_inertial_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"
Further reading
Function set_ground_segment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. 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"
Further reading
Function add_natural_marker_from_segment_coordinates
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_natural_marker_from_segment_coordinates(
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket