Skip to content

Add type annotations #19

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 1 commit into from
Mar 16, 2022
Merged

Add type annotations #19

merged 1 commit into from
Mar 16, 2022

Conversation

tekktrik
Copy link
Member

Resolves #18 by adding type annotations!

@@ -52,7 +57,7 @@ def hls_to_rgb(hue, light, sat):
)


def _v(chroma1, chroma2, hue):
def _v(chroma1: float, chroma2: float, hue: float) -> float:
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not really specifically related to this PR but I'm curious if you know what this _v function is doing? I don't recognize the algorithm in it (tho I have little experience with light sensors and related things).

I wonder if there is a more descriptive name that we could use for it.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thanks @tekktrik

@FoamyGuy FoamyGuy merged commit 5e5f508 into adafruit:main Mar 16, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 17, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_FXOS8700 to 2.1.12 from 2.1.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_FXOS8700#27 from tekktrik/doc/add-typing
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_Colorsys to 2.0.4 from 2.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Colorsys#19 from tekktrik/doc/add-typing
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

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