mezz64 / pyEight

Python library to interface with the Eight Sleep API
MIT License
59 stars 15 forks source link

Add typing and refactor code to simplify #27

Closed raman325 closed 2 years ago

raman325 commented 2 years ago

OK so there were a couple of functional changes I made:

Every other change was to reduce the code complexity, reuse code where possible, etc. You can see in the tests that the values don't change in spite of the refactoring which was why I added the tests first

Renamed variables and raising an Exception will require changes in the integration to support which we can address when we bump the dependency upstream.