fix various typos and type related things - #555
Open
AndrewAnnex wants to merge 6 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #555 +/- ##
=======================================
Coverage 99.61% 99.61%
=======================================
Files 19 19
Lines 18094 18172 +78
=======================================
+ Hits 18024 18102 +78
Misses 70 70 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…with mypy a bit smoother
…d instead et2utc/sct2e had been switched from stypes.is_iterable() to hasattr(x, "__iter__") purely to satisfy mypy narrowing, since a plain bool-returning function is opaque to the type checker. Restore the is_iterable() calls and instead make is_iterable itself a TypeIs[Iterable[Any]] (PEP 742) guard, so the existing check narrows correctly without per-callsite workarounds. TypeIs only exists in typing on Python 3.13+, so the import is TYPE_CHECKING-gated with a string return annotation to keep the module importable on the project's minimum supported Python (3.11). This also correctly narrows the pre-existing is_iterable() call in list_to_char_array(), which additionally calls len() on its argument; added a Sized assert there since Iterable alone doesn't guarantee that.
AndrewAnnex
force-pushed
the
refresh_type_annotations
branch
from
August 30, 2026 23:19
70f62d9 to
336583a
Compare
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.
fixing a whole bunch of typos and type hinting things to make things with mypy a bit smoother