ENH: Add _MotorPlots Inheritance to Motor Plots Classes by MateusStano · Pull Request #456 · RocketPy-Team/RocketPy
Pull request type
- Code changes (bugfix, features)
- Code maintenance (refactoring, formatting, tests)
- ReadMe, Docs and GitHub updates
- Other (please describe):
Checklist
- Tests for the changes have been added (if needed)
- Docs have been reviewed and added / updated
- Lint (
black rocketpy/ tests/) has passed locally - All tests (
pytest --runslow) have passed locally
Current behavior
A lot of repeated code in the motors' plots classes
New behavior
_SolidMotorPlots, _HybridMotorPlots and _LiquidMotorPlots now inherit _MotorPlots
Breaking change
- Yes
- No
Additional information
There are a lot of repeated code in _SolidMotorPlots and _HybridMotorPlots I could not find a good solution for it. I tried using multiple inheritance in _HybridMotorPlots but it went south really fast
Also, this is really useful for Motor Draws #436