Skip to content

refactor: annotate open_source as a Generator - #75

Merged
jkomalley merged 1 commit into
mainfrom
refactor/contextmanager-generator
Oct 13, 2026
Merged

jkomalley merged 1 commit into
mainfrom
refactor/contextmanager-generator

Conversation

@jkomalley

Copy link
Copy Markdown
Owner

ty 0.0.85 (in Dependabot's #73) deprecates annotating a @contextmanager function as returning Iterator[...], and the warning fails CI's ty check src/ step:

warning[deprecated]: The overload of `contextmanager` is deprecated
  --> src/sillystrings/cli.py:44:2

open_source() is the only @contextmanager in the repo, so this switches its return annotation to Generator[Source]. That form is clean under both the pinned ty 0.0.84 and 0.0.85. Internal only, so there's no CHANGELOG entry.

Unblocks #73.

ty 0.0.85 deprecates annotating a @contextmanager function as returning
Iterator, which fails the typecheck step on the Dependabot bump in #73.
@jkomalley
jkomalley merged commit 1e4552a into main Oct 13, 2026
6 checks passed
@jkomalley
jkomalley deleted the refactor/contextmanager-generator branch October 13, 2026 02:06
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