Bump ty from 0.0.1a31 to 0.0.2#2636
Conversation
Bumps [ty](https://github.com/astral-sh/ty) from 0.0.1a31 to 0.0.2. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](astral-sh/ty@0.0.1-alpha.31...0.0.2) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Test Failure AnalysisSummary: The type checker was upgraded from version 0.0.1a31 to 0.0.2 (beta release), which has stricter type checking. This caught a type error in the AWS Cognito auth provider where Root Cause: In Suggested Solution: Add validation for Add this validation after line 199: if not settings.base_url:
raise ValueError(
"base_url is required - set via parameter or FASTMCP_SERVER_AUTH_AWS_COGNITO_BASE_URL"
)This will ensure Detailed AnalysisThe error from ty 0.0.2: The settings model defines base_url: AnyHttpUrl | str | None = NoneBut the parent class def __init__(
self,
*,
# ...
base_url: AnyHttpUrl | str, # <- not optional
# ...
)The Related Files
|
ty 0.0.2 (first beta) introduced stricter checking that catches several patterns that are valid at runtime but hard for static analysis: - invalid-parameter-default: Depends() DI pattern uses markers as defaults - invalid-return-type: functools.partial doesn't preserve return types - invalid-argument-type: Optional->required, generics, datetime coercion Each rule is documented with affected files and TODO for future fixes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| # ty 0.0.2 introduced stricter checking - these need incremental fixes: | ||
|
|
||
| # invalid-parameter-default: ty doesn't understand Depends() dependency injection pattern | ||
| # where default values are dependency markers resolved at runtime, not actual defaults. | ||
| # Affects: tests/server/test_dependencies.py, tests/server/tasks/test_task_dependencies.py | ||
| # TODO: Investigate if ty will add support for FastAPI/Depends-style DI patterns | ||
| invalid-parameter-default = "ignore" # 13 errors | ||
|
|
||
| # invalid-return-type: ty doesn't understand functools.partial preserves callable signatures. | ||
| # partial(self.tool, ...) returns a callable with same return type as self.tool. | ||
| # Affects: src/fastmcp/server/server.py (tool/prompt decorator partials) | ||
| # TODO: Check if ty improves partial() type inference | ||
| invalid-return-type = "ignore" # 2 errors | ||
|
|
||
| # invalid-argument-type: Multiple causes needing individual investigation: | ||
| # 1. Auth providers pass settings.base_url (Optional) to parent expecting non-Optional | ||
| # - Could add validation, but tests rely on base_url being optional for some scenarios | ||
| # 2. PydanticAdapter accepts list[Model] via TypeAdapter but ty expects type[T] | ||
| # 3. Client.new() generic Self bound not understood for ProxyClient | ||
| # 4. createdAt expects datetime but code passes ISO string (pydantic coerces) | ||
| # Affects: auth/providers/*.py, middleware/caching.py, server.py, tasks/protocol.py | ||
| # TODO: Fix individually - some may need code changes, others ty improvements | ||
| invalid-argument-type = "ignore" # 14 errors |
There was a problem hiding this comment.
@zzstoatzz these seem so broad that disabling them invalidates a lot of type checking benefits, no? in particular return types and argument types? Is it worth it to have targeted ignores (or use pyright)?
|
A newer version of ty exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
|
Closed for #2676 |
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
Bumps ty from 0.0.1a31 to 0.0.2.
Release notes
Sourced from ty's releases.
... (truncated)
Changelog
Sourced from ty's changelog.
... (truncated)
Commits
4283557Bump version to 0.0.2 (beta release) (#1954)7494d49Add Docker install instructions (#1953)9f739f3"type-driven" -> "sophisticated" (#1952)b82181fBump version to 0.0.1 (beta release) (#1949)2225382Update benchmark image in README (#1951)05d94a5Add reference benchmarks (#1945)bfa973aAdd repair of the benchmark images to the PyPI readme transform (#1947)65c80b8Simplify image rendering for GitHub README (#1946)8852f07Add documentation for--watchmode (#1944)d402045Update the benchmark image (#1943)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)