robotpy / robotpy-wpilib-utilities

Useful utility functions/objects for RobotPy
BSD 3-Clause "New" or "Revised" License
11 stars 19 forks source link

Use Python 3.6 features in magicbot.state_machine #173

Closed auscompgeek closed 3 years ago

auscompgeek commented 4 years ago

Ok so I totally said that I was gonna pull the injection tests fixes out into a separate PR but instead I did this.

This should still accept state machines that were considered valid previously, especially with inheritance and overriding of first/default states.

This makes aliasing of states (i.e. assigning a state to a different name) and attempting to create magicbot states in any class but within a StateMachine errors.