From 7f29049a2b52dc53dcb7b6b66c1ec84c2b13e78a Mon Sep 17 00:00:00 2001 From: Lucas Prates Date: Sat, 14 Sep 2024 10:39:03 -0300 Subject: [PATCH] MNT: applying suggested review changes --- rocketpy/rocket/aero_surface/fins/fins.py | 5 ----- rocketpy/rocket/aero_surface/generic_surface.py | 16 ++++++++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/rocketpy/rocket/aero_surface/fins/fins.py b/rocketpy/rocket/aero_surface/fins/fins.py index 867f106b0..1efeed64f 100644 --- a/rocketpy/rocket/aero_surface/fins/fins.py +++ b/rocketpy/rocket/aero_surface/fins/fins.py @@ -378,11 +378,6 @@ def compute_forces_and_moments( ): # pylint: disable=arguments-differ """Computes the forces and moments acting on the aerodynamic surface. - Parameters - ---------- - stream_speed : int, float - Speed of the flow stream in the body frame. - """ R1, R2, R3, M1, M2, _ = super().compute_forces_and_moments( stream_velocity, diff --git a/rocketpy/rocket/aero_surface/generic_surface.py b/rocketpy/rocket/aero_surface/generic_surface.py index 48fd14f32..b7c803fa3 100644 --- a/rocketpy/rocket/aero_surface/generic_surface.py +++ b/rocketpy/rocket/aero_surface/generic_surface.py @@ -153,12 +153,12 @@ def _check_coefficients(self, input_coefficients, default_coefficients): ValueError Raises a value error if the input coefficient has an invalid key """ - for key in input_coefficients.keys(): - if key not in default_coefficients.keys(): - raise ValueError( - "Invalid coefficient name used in key! Check the " - + "documentation for valid names." - ) + invalid_keys = set(input_coefficients) - set(default_coefficients) + if invalid_keys: + raise ValueError( + f"Invalid coefficient name(s) used in key(s): {', '.join(invalid_keys)}. " + "Check the documentation for valid names." + ) def _compute_from_coefficients( self, @@ -256,10 +256,10 @@ def compute_forces_and_moments( Air density. cp : Vector Center of pressure coordinates in the body frame. + omega: tuple[float, float, float] + Tuple containing angular velocities around the x, y, z axes. reynolds : float Reynolds number. - omega: tuple of float - Tuple containing angular velocities around the x, y, z axes. Returns -------