Skip to content

Commit

Permalink
MNT: make black
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Prates committed Nov 5, 2024
1 parent ed2ae39 commit e532489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rocketpy/motors/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,9 @@ def structural_mass_ratio(self):
try:
return self.dry_mass / initial_total_mass
except ZeroDivisionError as e:
raise ValueError("Total motor mass (dry + propellant) cannot be zero") from e
raise ValueError(

Check warning on line 516 in rocketpy/motors/motor.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/motors/motor.py#L515-L516

Added lines #L515 - L516 were not covered by tests
"Total motor mass (dry + propellant) cannot be zero"
) from e

@funcify_method("Time (s)", "Motor center of mass (m)")
def center_of_mass(self):
Expand Down
4 changes: 3 additions & 1 deletion rocketpy/rocket/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ def evaluate_structural_mass_ratio(self):
self.dry_mass + self.motor.propellant_initial_mass
)
except ZeroDivisionError as e:
raise ValueError("Total rocket mass (dry + propellant) cannot be zero") from e
raise ValueError(

Check warning on line 456 in rocketpy/rocket/rocket.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/rocket/rocket.py#L455-L456

Added lines #L455 - L456 were not covered by tests
"Total rocket mass (dry + propellant) cannot be zero"
) from e
return self.structural_mass_ratio

def evaluate_center_of_mass(self):
Expand Down

0 comments on commit e532489

Please sign in to comment.