Skip to content

Add type annotations #5

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 3 commits into from
Aug 11, 2022
Merged

Add type annotations #5

merged 3 commits into from
Aug 11, 2022

Conversation

sokratisvas
Copy link
Contributor

No description provided.

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

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

One small change, but otherwise it looks good to go!

"""Whether there is an active alert to be checked"""
return self._alert_status

@property
def alert_reason(self):
def alert_reason(self) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this should be an int since it returns a number representing all the bits that define the reason for an alert.

@sokratisvas
Copy link
Contributor Author

Fixed the type from bool to int. It should be ok now.

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks!

@tekktrik tekktrik merged commit 5f04c0a into adafruit:main Aug 11, 2022
@tekktrik tekktrik mentioned this pull request Aug 11, 2022
@tekktrik tekktrik linked an issue Aug 11, 2022 that may be closed by this pull request
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 12, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX1704x to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX1704x#5 from sokratisvas/add-type-annotations

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI1145 to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI1145#10 from caternuson/iss9

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_MAX1704x
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