Skip to content

chore: bump ty to 0.0.88 and resolve new diagnostics - #417

Open
ricardosrib wants to merge 1 commit into
mainfrom
chore/bump-ty-0.0.88
Open

ricardosrib wants to merge 1 commit into
mainfrom
chore/bump-ty-0.0.88

Conversation

@ricardosrib

Copy link
Copy Markdown
Contributor

Description

Bumps ty from 0.0.64 to 0.0.88 — the half of #338 that was deliberately left out of #415 because the newer ty is significantly stricter and surfaces 19 pre-existing diagnostics that need real changes.

Real fixes (behavior-preserving):

  • adms/_async_http.py: deprecated asyncio.iscoroutinefunction → inspect.iscoroutinefunction
  • dms/model.py: removed a redundant cast(RepositoryParams, {})
  • agentgateway/converters.py: hoisted the conditional **{...} kwargs spread into a
    dict[str, Any] variable, so the union-valued dict is no longer type-checked against
    every keyword parameter of StructuredTool.from_function (identical runtime behavior)

Suppressions via # ty: ignore[...] (matching the existing repo convention):

  • core/auditlog/models.py (×2): deletion events intentionally override attributes
    with DeletedAttribute; the invariant-list override is by design
  • Tests (×9): abstract-class instantiations asserted inside pytest.raises(TypeError)
    and one deliberately-invalid Library assignment — intentional negative tests

Related Issue

Closes #338

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

  1. uvx pre-commit run --all-files → ty type check passes (also ruff format + ruff check)
  2. uv run pytest → full suite green (affected modules: 1148 passed, 26 skipped locally)

Breaking Changes

N/A

This branch has not been deployed

No deployments
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