Skip to content

fix various typos and type related things - #555

Open
AndrewAnnex wants to merge 6 commits into
mainfrom
refresh_type_annotations
Open

fix various typos and type related things#555
AndrewAnnex wants to merge 6 commits into
mainfrom
refresh_type_annotations

Conversation

@AndrewAnnex

Copy link
Copy Markdown
Owner

fixing a whole bunch of typos and type hinting things to make things with mypy a bit smoother

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.61%. Comparing base (ab33b43) to head (ea11596).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…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
AndrewAnnex force-pushed the refresh_type_annotations branch from 70f62d9 to 336583a Compare August 30, 2026 23:19
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.

1 participant