forked from mrmcwethy/Adafruit_CircuitPython_DHT
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add type hints #76
Merged
Merged
Add type hints #76
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ack, too much TypeScript in my brain. Let me fix those Union types. |
I had to remove the variable type hints because
|
FoamyGuy
approved these changes
Nov 1, 2021
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.
Looks good to me. Thank you @tylercrumpton
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Nov 3, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_74HC595 to 1.3.1 from 1.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_74HC595#19 from tekktrik/feature/add-typing > fix branch name on conduct link > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_AM2320 to 1.2.8 from 1.2.7: > Merge pull request adafruit/Adafruit_CircuitPython_AM2320#22 from tylercrumpton/add-type-hints > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_DHT to 3.6.3 from 3.6.2: > Merge pull request adafruit/Adafruit_CircuitPython_DHT#76 from tylercrumpton/add-type-hints > add docs link to readme Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 4.1.6 from 4.1.5: > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#92 from tekktrik/feature/add-typing > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 2.1.5 from 2.1.4: > Merge pull request adafruit/Adafruit_CircuitPython_PM25#20 from process1183/type_annotations > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1305 to 1.3.7 from 1.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_SSD1305#14 from tylercrumpton/add-type-hints > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7735R to 1.5.1 from 1.5.0: > Merge pull request adafruit/Adafruit_CircuitPython_ST7735R#27 from FoamyGuy/type_info > add docs link to readme > Globally disabled consider-using-f-string pylint check Updating https://github.com/adafruit/Adafruit_CircuitPython_WS2801 to 0.10.7 from 0.10.6: > Merge pull request adafruit/Adafruit_CircuitPython_WS2801#23 from rhooper/main > fix branch name in conduct link > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Notification to 0.9.5 from 0.9.4: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Notification#9 from tekktrik/fix/add-blinka-requirement > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.5.7 from 2.5.6: > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#84 from rhooper/sparkle-mask > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#78 from plugowski/master > add docs link to readme Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 3.7.0 from 1.2.9: > Merge pull request adafruit/Adafruit_CircuitPython_Logging#22 from tekktrik/feature/add-file-handler Updating https://github.com/adafruit/Adafruit_CircuitPython_Waveform to 1.3.7 from 1.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_Waveform#22 from rhooper/main > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_WSGI to 1.1.5 from 1.1.4: > Merge pull request adafruit/Adafruit_CircuitPython_WSGI#10 from rhooper/main > fix branch name in conduct link > add docs link to readme > Globally disabled consider-using-f-string pylint check > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold "
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hiya! I've added type hints for this (fixes #74 ).
These changes clear all of the errors returned from
mypy adafruit_dht.py --disallow-untyped-defs
except for one:I'd fix that one up as well, but I'm not actually sure what is causing it.
Thanks!