Skip to content

Add type hints #87

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

Merged
merged 19 commits into from
Dec 14, 2021
Merged

Add type hints #87

merged 19 commits into from
Dec 14, 2021

Conversation

tekktrik
Copy link
Member

@tekktrik tekktrik commented Dec 9, 2021

Probably the most complex typing PR I've done, so definitely would appreciate a thorough look from someone else @___@ I had to learn a few things for this one, so hopefully I implemented it all correctly!

@tekktrik tekktrik mentioned this pull request Dec 10, 2021
38 tasks
@tannewt tannewt requested a review from a team December 10, 2021 17:48
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this difficult annotation. Just a few q's.

@tekktrik tekktrik requested a review from dhalbert December 14, 2021 19:02
@tekktrik
Copy link
Member Author

tekktrik commented Dec 14, 2021

Change # 1 - Changed to Union[bytes, bytearray] and also added the missing type hint for buf, but if there's a way to do _typing.ReadableBuffer that might be better. Don't know a lot about the other buffer types either so not sure whether this function should be accepting them either, but let me know if that makes more sense.
Change # 2 - Added
Change # 3 - Added
Change # 4 - Left as bytearray for now but I'll change it if I misunderstood and that parameter can be of type bytes

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the iteration!

@dhalbert dhalbert merged commit 2c5c93a into adafruit:main Dec 14, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 28, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 4.1.8 from 4.1.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#80 from Daviey/moar_lolz
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_RA8875 to 3.1.8 from 3.1.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_RA8875#28 from adafruit/dhalbert-ustruct
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI5351 to 1.2.10 from 1.2.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI5351#24 from adafruit/dhalbert-ustruct
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet to 0.11.0 from 0.10.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BroadcastNet#23 from tekktrik/feature/add-sound-level
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BroadcastNet#22 from tekktrik/feature/add-typing
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect to 1.2.0 from 1.1.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_BluefruitConnect#33 from TonyLHansen/main
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_BoardTest to 1.2.8 from 1.2.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_BoardTest#19 from tekktrik/feature/add-typing
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_CursorControl to 2.5.1 from 2.5.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CursorControl#30 from tekktrik/feature/add-typing
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_hashlib to 1.4.0 from 1.3.6:
  > Update README.rst
  > Merge pull request adafruit/Adafruit_CircuitPython_hashlib#17 from timhawes/main
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.3.3 from 3.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#59 from FoamyGuy/typing_input_error_catch

Updating https://github.com/adafruit/Adafruit_CircuitPython_Register to 1.9.7 from 1.9.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_Register#46 from adafruit/dhalbert-ustruct
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.10.3 from 1.10.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#87 from tekktrik/main
  > update rtd py version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants