-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MNT: making simple refactors in the Flight class #442
Conversation
- useless return drift - use format string with interpolation
- safely opening file using 'with' context - specify utf-8 encoding - reduce code lines by using functions - more pythonic for loops
- add docstring to the class and its methods - avoid using mutable default arguments - simple display_warning method - add method: use early returns to increase readability - add method: more if comprehensions, more readability - add highlights to warning messages
Copying the commentary here in case we need it in the future:
|
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyCurrent behavior
The Flight class is one of the most complicated to be read. Regardless the sophisticated u_dot, some functions/methos were added a long time ago and needs an update.
The subclass
FlightPhases
is barely documented, and its error messages looks like each other too much.New behavior
Something important:
Breaking change
Additional information