Skip to content

Add type annotations #168

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 25 commits into from
Jul 25, 2022
Merged

Add type annotations #168

merged 25 commits into from
Jul 25, 2022

Conversation

tekktrik
Copy link
Member

@tekktrik tekktrik commented Jul 23, 2022

The Big One! Resolves #137 by adding type annotations for this library.

Notes:

  • Lines of similarity needed to be increased to avoid refactoring.
  • Using a combination of from __futures__ import annotations and if typing.TYPE_CHECKING to avoid circular imports and unbound types.

@tekktrik tekktrik requested a review from a team July 23, 2022 15:30
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@tannewt tannewt merged commit 0e631c0 into adafruit:main Jul 25, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 28, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_CharLCD to 3.4.0 from 3.3.15:
  > Merge pull request adafruit/Adafruit_CircuitPython_CharLCD#72 from Neradoc/compatibility-rainbowio
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.10.5 from 2.10.4:
  > Create requirements.txt
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.17 from 1.1.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#22 from adafruit/lsm6dstrc
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL3115A2 to 2.0.0 from 1.2.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL3115A2#22 from caternuson/iss19
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.3.10 from 2.3.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#57 from tekktrik/doc/fix-product-link
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI1145 to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI1145#6 from tekktrik/doc/add-product-link

Updating https://github.com/adafruit/Adafruit_CircuitPython_asyncio to 0.5.12 from 0.5.11:
  > Create requirements.txt

Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.5.8 from 2.5.7:
  > Updated sphinx version
  > Changed .env to .venv in README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 8.3.4 from 8.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#168 from tekktrik/doc/add-type-annotations
  > Changed .env to .venv in README.rst
  > Removed duplicate-code from library pylint disable

Updating https://github.com/adafruit/Adafruit_CircuitPython_Hue to 1.2.0 from 1.1.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_Hue#21 from tekktrik/dev/specific-error
  > Changed .env to .venv in README.rst
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.

Missing Type Annotations
2 participants