From 0f8efb9d07f1c313d5dfaedb61b12908ca398f1f Mon Sep 17 00:00:00 2001 From: Julio Machado Date: Mon, 17 Jun 2024 18:13:35 -0300 Subject: [PATCH] MNTBUG: RailButtons does not have rocket_radius attribute #606. Running black to format files. --- rocketpy/rocket/aero_surface.py | 9 +++++++-- rocketpy/rocket/rocket.py | 7 ++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/rocketpy/rocket/aero_surface.py b/rocketpy/rocket/aero_surface.py index 7d7be25a6..0c6ac41d6 100644 --- a/rocketpy/rocket/aero_surface.py +++ b/rocketpy/rocket/aero_surface.py @@ -1806,8 +1806,13 @@ class RailButtons(AeroSurface): relative to one of the other principal axis. """ - def __init__(self, rocket_radius, buttons_distance, - angular_position=45, name="Rail Buttons",): + def __init__( + self, + rocket_radius, + buttons_distance, + angular_position=45, + name="Rail Buttons", + ): """Initializes RailButtons Class. Parameters diff --git a/rocketpy/rocket/rocket.py b/rocketpy/rocket/rocket.py index 641b2085f..3f33e082c 100644 --- a/rocketpy/rocket/rocket.py +++ b/rocketpy/rocket/rocket.py @@ -1495,9 +1495,10 @@ def set_rail_buttons( RailButtons object created """ buttons_distance = abs(upper_button_position - lower_button_position) - rail_buttons = RailButtons(rocket_radius=self.radius, - buttons_distance=buttons_distance, - angular_position=angular_position + rail_buttons = RailButtons( + rocket_radius=self.radius, + buttons_distance=buttons_distance, + angular_position=angular_position, ) self.rail_buttons.add(rail_buttons, lower_button_position) return rail_buttons