summaryrefslogtreecommitdiff
path: root/examples/statemachine/libraryBookDemo.py
Commit message (Collapse)AuthorAgeFilesLines
* import and exception types cleanup in statemachine examplesptmcg2020-04-271-1/+1
|
* Blacken the project (#141)Jon Dufresne2019-10-311-6/+10
|
* Use pyupgrade to upgrade the code to use Python3 conventions (#138)Jon Dufresne2019-10-241-2/+2
| | | | | | | | | | | | The pyupgrade project is available at https://github.com/asottile/pyupgrade and can be installed through pip. The pyupgrade tool automatically upgrades syntax for newer versions of the language. As pyparsing is now Python 3 only, can apply some cleanups and simplifications. Ran the tool using the following command: $ find . -name \*.py -exec pyupgrade --py3-plus {} \; For now, pyparsing.py was skipped while it is refactored to a package.
* Fine tuning of statemachine example, moving InvalidStateTransition ↵Paul McGuire2019-05-271-1/+1
| | | | declaration inside generated class; added video state machine demo; added vending machine state machine demo showing how to using statemachine without importing a .pystate file
* Fix generated stateMixin class to properly implement overridable transition ↵Paul McGuire2019-04-171-2/+2
| | | | methods instead of messing with getattr; allows use of `super().transition_name()` in classes that subclass from the Mixin
* Refactor generated State code to use overridden transition methods instead ↵Paul McGuire2019-04-151-18/+10
| | | | of overriding getattr; add generation of state-managing mixin class to delegate to _state instance variable, and reworked demos to use mixin instead of replicating state code
* Add enumerated place holders for strings that invoke str.format(), for Py2 ↵ptmcg2019-01-091-2/+2
| | | | compatibility
* Add document signoff and library book state examples;ptmcg2018-12-311-0/+78