Skip to content

Upgrade ty to 1.0 - #251

Open
zzstoatzz wants to merge 1 commit into
numeric-flow-name-labelsfrom
upgrade-ty-1.0
Open

zzstoatzz wants to merge 1 commit into
numeric-flow-name-labelsfrom
upgrade-ty-1.0

Conversation

@zzstoatzz

Copy link
Copy Markdown
Collaborator

Merge #250 first. This PR is based on that branch because ty also reports the flow_name error that #250 fixes. After #250 merges, this PR must have main as its base.

The problem. ty 1.0 is the first stable release. This repository used ty 0.0.38. ty 1.0 reports 20 issues in the current code. Since version 0.0.52, ty also exits with code 1 for warnings. A version bump alone fails CI.

The change. ty is now 1.0.0. No other locked package changes. ty passes without new ignore comments or rule exceptions.

  • Most of the errors came from tool results. The code built them as untyped dictionaries and lists, and returned them as a TypedDict. Each result now has its declared type where the code builds it, so ty checks every field. The returned data does not change.
  • The event filter and the client options now have explicit types.
  • The client context managers now return AsyncGenerator. typeshed deprecates AsyncIterator there.
Session context

When the code built untyped dictionaries, ty did not check each field. With the declared types, ty found the numeric flow_name error. #189 also changes events.py, pyproject.toml and uv.lock, but it does not change the ty version. It already has conflicts with main. #248 and #249 also change uv.lock.

🤖 Generated with Claude Code

Tool results now use their declared types where they are built, so ty checks
every field. Context managers return AsyncGenerator because typeshed
deprecates AsyncIterator there.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

📊 Observability

View eval run traces in Logfire: prefect-mcp-server-evals @ 5fefdc9

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Evaluation Results

21 tests  ±0   13 ✅ ±0   2m 11s ⏱️ +2s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    8 ❌ ±0 

For more details on these failures, see this check.

Results for commit 5fefdc9. ± Comparison against base commit 5eee614.

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