Skip to content

Commit 5619b3a

Browse files
committed
STY: Apply ruff format to flight.py
1 parent 6d79d62 commit 5619b3a

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

rocketpy/simulation/flight.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,8 @@ def __simulate(self, verbose):
777777
lambda self, parachute_porosity=parachute.porosity: setattr(
778778
self, "parachute_porosity", parachute_porosity
779779
),
780-
lambda self, added_mass_coefficient=parachute.added_mass_coefficient: setattr(
780+
lambda self,
781+
added_mass_coefficient=parachute.added_mass_coefficient: setattr(
781782
self,
782783
"parachute_added_mass_coefficient",
783784
added_mass_coefficient,
@@ -999,7 +1000,8 @@ def __check_and_handle_parachute_triggers(
9991000
lambda self, parachute_porosity=parachute.porosity: setattr(
10001001
self, "parachute_porosity", parachute_porosity
10011002
),
1002-
lambda self, added_mass_coefficient=parachute.added_mass_coefficient: setattr(
1003+
lambda self,
1004+
added_mass_coefficient=parachute.added_mass_coefficient: setattr(
10031005
self,
10041006
"parachute_added_mass_coefficient",
10051007
added_mass_coefficient,
@@ -1405,7 +1407,8 @@ def __check_overshootable_parachute_triggers(
14051407
lambda self, parachute_porosity=parachute.porosity: setattr(
14061408
self, "parachute_porosity", parachute_porosity
14071409
),
1408-
lambda self, added_mass_coefficient=parachute.added_mass_coefficient: setattr(
1410+
lambda self,
1411+
added_mass_coefficient=parachute.added_mass_coefficient: setattr(
14091412
self,
14101413
"parachute_added_mass_coefficient",
14111414
added_mass_coefficient,
@@ -1988,9 +1991,7 @@ def udot_rail2(self, t, u, post_processing=False): # pragma: no cover
19881991
# Hey! We will finish this function later, now we just can use u_dot
19891992
return self.u_dot_generalized(t, u, post_processing=post_processing)
19901993

1991-
def u_dot(
1992-
self, t, u, post_processing=False
1993-
): # pylint: disable=too-many-locals,too-many-statements
1994+
def u_dot(self, t, u, post_processing=False): # pylint: disable=too-many-locals,too-many-statements
19941995
"""Calculates derivative of u state vector with respect to time
19951996
when rocket is flying in 6 DOF motion during ascent out of rail
19961997
and descent without parachute.
@@ -2536,9 +2537,7 @@ def u_dot_generalized_3dof(self, t, u, post_processing=False):
25362537

25372538
return u_dot
25382539

2539-
def u_dot_generalized(
2540-
self, t, u, post_processing=False
2541-
): # pylint: disable=too-many-locals,too-many-statements
2540+
def u_dot_generalized(self, t, u, post_processing=False): # pylint: disable=too-many-locals,too-many-statements
25422541
"""Calculates derivative of u state vector with respect to time when the
25432542
rocket is flying in 6 DOF motion in space and significant mass variation
25442543
effects exist. Typical flight phases include powered ascent after launch
@@ -4373,7 +4372,9 @@ def add(self, flight_phase, index=None): # TODO: quite complex method
43734372
new_index = (
43744373
index - 1
43754374
if flight_phase.t < previous_phase.t
4376-
else index + 1 if flight_phase.t > next_phase.t else index
4375+
else index + 1
4376+
if flight_phase.t > next_phase.t
4377+
else index
43774378
)
43784379
flight_phase.t += adjust
43794380
self.add(flight_phase, new_index)

0 commit comments

Comments
 (0)