-
Notifications
You must be signed in to change notification settings - Fork 4
Add typing to I2C bus #15
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @SebastienFauque!
One tweak to the type used for I2C.
I've also noticed that the original issue seems to have not listed all of the relavent lines of code with functions that can be typed.
If you're up to it, it'd be great to also add types for the function arguments and return types for:
- acceleration
- light
- buttons
- boop
If you're up for that but need help figuring out the proper types let me know I can assist with that.
If you'd rather not do those ones, it's okay as well once this one is good to go we can merge and I'll keep the issue open and update it with the rest of the lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a commit with one tweak to swap the order of the imports inside the try block so that the typing one comes first which will raise the exception when it runs on the microcontroller before it's imported anything else.
Latest version looks good to me. @SebastienFauque Thanks again for working on this and taking care of the other functions that weren't listed in the original issue!
Updating https://github.com/adafruit/Adafruit_CircuitPython_MONSTERM4SK to 0.3.14 from 0.3.13: > Merge pull request adafruit/Adafruit_CircuitPython_MONSTERM4SK#15 from SebastienFauque/main > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_OV to 1.0.11 from 1.0.10: > Merge pull request adafruit/Adafruit_CircuitPython_OV#17 from patenaud/type_annotations > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay to 1.4.7 from 1.4.6: > Merge pull request adafruit/Adafruit_CircuitPython_SharpMemoryDisplay#23 from SebastienFauque/main > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_hashlib to 1.4.11 from 1.4.10: > Merge pull request adafruit/Adafruit_CircuitPython_hashlib#22 from ChrisPappalardo/add-missing-type-annotations > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
Adds type annotations to MonsterM4sk I2C bus. Solves issue #11