Skip to content

fix: use Generator instead of Iterator for contextmanager return types#2163

Merged
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/fix-ci-run-2161
Apr 24, 2026
Merged

fix: use Generator instead of Iterator for contextmanager return types#2163
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/fix-ci-run-2161

Conversation

@adamtheturtle
Copy link
Copy Markdown
Member

@adamtheturtle adamtheturtle commented Apr 24, 2026

Summary

Test plan

  • pyright passes locally on the three changed files
  • CI green on this branch

🤖 Generated with Claude Code


Note

Low Risk
Low risk type-hint-only change across three CLI modules; no runtime behavior should change beyond static type checking.

Overview
Adjusts the three CLI exception-handling context managers (in commands.py, query.py, and vumark.py) to return Generator[None] and updates imports accordingly, addressing Pyright’s deprecation warning for Iterator[...] with @contextlib.contextmanager.

Reviewed by Cursor Bugbot for commit 2c4d6fa. Bugbot is set up for automated code reviews on this repo. Configure here.

Pyright 1.1.409 deprecates annotating `@contextmanager` return types as
`Iterator[Foo]`; it now requires `Generator[Foo]`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adamtheturtle adamtheturtle merged commit d1d7eb5 into main Apr 24, 2026
16 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/fix-ci-run-2161 branch April 24, 2026 02: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