Skip to content
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

resolves #12 Missing Type Annotations #13

Merged
merged 2 commits into from
Aug 25, 2022
Merged

resolves #12 Missing Type Annotations #13

merged 2 commits into from
Aug 25, 2022

Conversation

tcfranks
Copy link
Contributor

No description provided.

@tcfranks
Copy link
Contributor Author

TO REVIEWER: class TMP007 - docstring says it returns true (Initialized) or false. I see no returned type and have indicated by annotating "None". Am I correct and docstring needs fixed or did I miss something? The code raised error for invalid sample rate param or if init fails because device not found. (Should sample rates be Literal hex values instead of variable names?)

@FoamyGuy
Copy link
Contributor

@tcfranks I think you are correct, the current docstring does not accurately describe the functionality.

If you're up for it , go ahead and push a new commit to change the docstring. I would lean towards just removing "Returns True if the device is intialized, False otherwise." from the init docstring all together. init doesn't actually return anything, this sentence would be closer to accurate for the new function I think, but in this class we don't have new implemented with our own code so there isn't a great spot to put that information.

Even in the case of new it's not really returning True or False, however the concept of "truthiness" of objects and "falsiness" of None do make it seem functionally similar to returning booleans.

@FoamyGuy
Copy link
Contributor

The types in this PR are looking good to me. Thanks for handling another one @tcfranks!

@tcfranks tcfranks changed the title Correct Missing Type Annotations resolves #12 Missing Type Annotations Aug 23, 2022
@tcfranks
Copy link
Contributor Author

updated docstring to remove the returns sentence as suggested

@tekktrik tekktrik merged commit 973d3cb into adafruit:main Aug 25, 2022
@tekktrik
Copy link
Member

Thanks y'all!

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 25, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_BH1750 to 1.1.5 from 1.1.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BH1750#7 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP3XX to 1.3.15 from 1.3.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_BMP3XX#22 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 5.3.0 from 5.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#114 from tekktrik/dev/iterable-io-rework
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_IL91874 to 1.2.9 from 1.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_IL91874#16 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1322 to 1.3.6 from 1.3.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1322#17 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1325 to 1.4.7 from 1.4.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1325#15 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1331 to 1.3.7 from 1.3.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1331#16 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1351 to 1.3.7 from 1.3.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1351#18 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1608 to 1.2.17 from 1.2.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1608#15 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_TMP007 to 2.1.12 from 2.1.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_TMP007#13 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_MIDI to 1.0.12 from 1.0.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_MIDI#10 from tcfranks/main
  > Use year duration range for copyright attribution
  > Keep copyright up to date in documentation
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.

3 participants