datetime.replace: Fix type annotations of parameters#33
Merged
dhalbert merged 1 commit intoadafruit:mainfrom May 18, 2025
jepler:datetime-replace-typing
Merged
datetime.replace: Fix type annotations of parameters#33dhalbert merged 1 commit intoadafruit:mainfrom jepler:datetime-replace-typing
dhalbert merged 1 commit intoadafruit:mainfrom
jepler:datetime-replace-typing
Conversation
If specified, these parameters must be integers.
Contributor
Author
|
just for background, I've got a project that optionally uses adafruit_datetime (https://github.com/jepler/wwvbpy). I started this before there were any typing annotations in adafruit_datetime, and created my own stubs that I ship within the wwvbpy source distribution. I needed these stubs so that my project was mypy-clean under the --strict flag. Something made me say, hey, wait, adafruit_datetime (now) has annotations. True, and mypy can be made to use them through a stanza in settings.toml. But, some of the types I depended on are incorrect in the inline type hints. Hence this PR. |
jepler
added a commit
to jepler/wwvbpy
that referenced
this pull request
May 18, 2025
and depend on correct typing info (+ override to use it). The correct typing info won't exist until a release of adafruit_datetime with adafruit/Adafruit_CircuitPython_datetime#33 is made, likely soon.
Contributor
Author
|
thanks! |
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
May 22, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_OV5640 to 1.2.7 from 1.2.6: > Merge pull request adafruit/Adafruit_CircuitPython_OV5640#39 from relic-se/contrast-getter > Merge pull request adafruit/Adafruit_CircuitPython_OV5640#38 from relic-se/contrast-range-docs Updating https://github.com/adafruit/Adafruit_CircuitPython_OV to 1.1.4 from 1.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_OV#23 from adafruit/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT31D to 2.3.27 from 2.3.26: > Merge pull request adafruit/Adafruit_CircuitPython_SHT31D#38 from adafruit/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_TCA8418 to 1.0.17 from 1.0.16: > Merge pull request adafruit/Adafruit_CircuitPython_TCA8418#17 from FoamyGuy/displayio_api_update Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Beacon to 1.0.9 from 1.0.8: > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Beacon#5 from adafruit/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_datetime to 1.4.2 from 1.4.1: > Merge pull request adafruit/Adafruit_CircuitPython_datetime#33 from jepler/datetime-replace-typing Updating https://github.com/adafruit/Adafruit_CircuitPython_MIDI_Parser to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_MIDI_Parser#3 from adafruit/polyphony Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 4.0.4 from 4.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#72 from adafruit/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_PYOA to 2.6.4 from 2.6.3: > Merge pull request adafruit/Adafruit_CircuitPython_PYOA#42 from adafruit/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_Radial_Controller to 1.0.15 from 1.0.14: > Merge pull request adafruit/Adafruit_CircuitPython_Radial_Controller#4 from adafruit/use_ruff
jepler
added a commit
to jepler/wwvbpy
that referenced
this pull request
May 27, 2025
and depend on correct typing info (+ override to use it). The correct typing info won't exist until a release of adafruit_datetime with adafruit/Adafruit_CircuitPython_datetime#33 is made, likely soon.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If specified, these parameters must be integers.