Skip to content

fix: annotate context managers with Generator for ty 0.0.85 - #62

Merged
lesnik512 merged 1 commit into
mainfrom
fix/ty-0-0-85
Oct 7, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/ty-0-0-85

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

Closes #61

ty 0.0.85 bundles a typeshed that deprecates the contextmanager overload for functions annotated -> Iterator[T], so ty check in the scheduled run now reports a deprecated warning and lint-ci fails.

Changes

  • tests/test_end_of_file_fixer.py: annotate _run_main_in as -> Generator[...] instead of -> Iterator[...], importing Generator from collections.abc. typing.Generator needs all three type arguments before Python 3.13; collections.abc.Generator accepts one.

Checklist

  • just lint-ci fails on main with ty 0.0.85 and passes with this change
  • just test passes (37 tests)

@lesnik512
lesnik512 merged commit 9bd6878 into main Oct 7, 2026
12 checks passed
@lesnik512
lesnik512 deleted the fix/ty-0-0-85 branch October 7, 2026 16:24
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.

Scheduled dependency check failed

1 participant