Bump ty from 0.0.19 to 0.0.75 - #103
Merged
Merged
Conversation
woutervh
added a commit
that referenced
this pull request
Aug 30, 2026
`about.py` broke the Linting job once `ty` was bumped (Dependabot #103): - `msg.json` -> ty `unresolved-attribute` (typeshed resolves `importlib.metadata.metadata()` as `email.message.Message`). - `version: str = pkginfo.get("version", "unknown")` -> ty `invalid-assignment` (value was `str | list[str]`). - `# type: ignore[...]` comments do not silence ty. Materialise the distribution metadata into a plain `dict[str, str]` via `{key: msg[key] for key in msg}` (only `__iter__`/`__getitem__` are guaranteed on `PackageMetadata` across 3.9-3.14, unlike `.json` / `.get`), then read `Author-email` / `License(-Expression)` / `Version` off the dict. Keep the `# pragma: no cover` fallback branches. Also bump `ty` 0.0.19 -> 0.0.75 in the lock so CI exercises the new behaviour; this supersedes Dependabot #103. Verified locally: ruff, pylint (10/10), mypy (3.10/3.11/3.14), ty, pre-commit, and pytest w/ coverage (100%) all green.
woutervh
added a commit
that referenced
this pull request
Aug 30, 2026
Dependabot #103 (bump `ty` 0.0.19 -> 0.0.29) turns the Linting job red on every Python version. `ty` rejects two constructs in `about.py` that older `ty` accepted and that `# type: ignore[...]` does not silence: - `msg.json` -> `unresolved-attribute` (typeshed resolves `importlib.metadata.metadata()` as `email.message.Message`). - `version: str = pkginfo.get("version", "unknown")` -> `invalid-assignment` (the value is `str | list[str]`). Materialise the distribution metadata into a plain `dict[str, str]` via `{key: msg[key] for key in msg}` - only `__iter__` (over keys) and `__getitem__` are guaranteed on `PackageMetadata` across 3.9-3.14, unlike `.json` / `.get` - then read `Author-email` / `License(-Expression)` / `Version` off the dict. Fallback branches keep their `# pragma: no cover`. Verified against `ty` 0.0.75 locally (plus ruff, pylint 10/10, mypy on 3.10/3.11/3.14, pre-commit, pytest+coverage 100%). Merging unblocks #103, which then only carries the lockfile bump.
woutervh
added a commit
that referenced
this pull request
Aug 30, 2026
## Why Dependabot #103 (bump `ty` 0.0.19 -> 0.0.29) turns the **Linting** job red on every Python version. `ty check` rejects two constructs in `src/autoadd_bindir/about.py` that older `ty` accepted and that `# type: ignore[...]` comments do **not** silence: 1. `unresolved-attribute` - `msg.json` (typeshed resolves `importlib.metadata.metadata()` as `email.message.Message`, which has no `.json`). 2. `invalid-assignment` - `version: str = pkginfo.get("version", "unknown")` (the value is `str | list[str]`). ## What Materialise the distribution metadata into a plain `dict[str, str]` with `{key: msg[key] for key in msg}` - only `__iter__` (over keys) and `__getitem__` are guaranteed on `importlib.metadata.PackageMetadata` across 3.9-3.14, unlike `.json` or `.get` (mypy 1.19 rejects `.get` on 3.10/3.11). Then read `Author-email` / `License(-Expression)` / `Version` off the dict. Fallback branches keep their `# pragma: no cover`. Single-file change; `uv.lock` is untouched here. ## Verification (local) Against `ty` **0.0.75** (newer than #103's 0.0.29): `just ruff-check`, `just pylint` (10/10), `just mypy` (explicitly on 3.10 / 3.11 / 3.14), `just ty-check`, `pre-commit run --all-files`, and `just pytest-coverage` (100%, 7 passed) all pass. ## Follow-up Merging this unblocks #103; that PR then only carries the `ty` lockfile bump.
Contributor
|
@dependabot rebase |
Bumps [ty](https://github.com/astral-sh/ty) from 0.0.19 to 0.0.75. - [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.19...0.0.75) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.29 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
force-pushed
the
dependabot/uv/ty-0.0.29
branch
from
August 30, 2026 14:41
d5bfc39 to
ea987e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps ty from 0.0.19 to 0.0.75.
Release notes
Sourced from ty's releases.
... (truncated)
Changelog
Sourced from ty's changelog.
... (truncated)
Commits
a553dccBump version to 0.0.75 (#4396)26b1b50Update prek dependencies (#4392)73d226eFix documented Python package build command (#4384)5e264daLink untyped-call tracking issue in migration guide (#4382)00199f0Bump version to 0.0.74 (#4351)5769062Update mypy/pyright comparison table (#4165)4fcb060Remove Zulip from the PGO training (#4336)a7a7064Use the versions bot's ruleset bypass when merging (#4333)01b0fabUpdate prek dependencies (#4325)deef42fUpdate dependency python to 3.14 (#4326)