adafruit / Adafruit_CircuitPython_ADS1x15

CircuitPython drivers for the ADS1x15 series of ADCs.
MIT License
140 stars 59 forks source link

Add typing to library #73

Closed tekktrik closed 2 years ago

tekktrik commented 2 years ago

Addressed issues from pre-commit

tekktrik commented 2 years ago

My pleasure! Code updated per review comments.

FoamyGuy commented 2 years ago

This is looking pretty good to me now. Last thing is lets move the ADS import to inside the try block since it's used only for typing:

Inside of analog_in.py:

try:
    # used only for typing
    from typing import Optional
    from .ads1x15 import ADS1x15
except ImportError:
    pass
tekktrik commented 2 years ago

No worries! Just glad to be able to help out!