Fix the Type checking job, which now fails on every Python PR - #250
Merged
Conversation
The job runs `uvx ty check` in skills/analyzing-data/scripts, unpinned, so it picks up whatever ty released last. ty 0.0.62 started reading rules from PEP 723 inline script metadata. cli.py carries such a block, so its own metadata now configures it and ty.toml no longer reaches it. The unresolved-import suppression stopped applying and the undeclared `click` import surfaced as an error. The dependency is not missing. cli.py declares click in its PEP 723 header and runs with `uv run cli.py`; ty does not install dependencies, which is why ty.toml suppressed the rule to begin with. So the fix is to repeat that suppression in the script's own metadata. Main looks green only because it last ran before ty 0.0.62. Anything touching Python in this repo fails today. Confirmed by running the job's command against an untouched checkout of main. Checked against ty 0.0.65 and 0.0.61, and `uv run cli.py` still works. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKSW26NfBtfq8hVeeLdfLj
josh-fell
approved these changes
Jul 30, 2026
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.
Type checkingfails onmainas it stands. Any PR touching Python in this repo hits it — #249 is how I found it. I reproduced it by running the job's own command against an untouched checkout oforigin/main:mainreads green only because its last CI run was 2026-07-20, before the ty release that changed this.What broke
The job at
.github/workflows/ci.yml:85-96runsuvx ty check, unpinned, so every run picks up the latest ty.ty
0.0.62(2026-07-21) shipped this, under Configuration:cli.pycarries a PEP 723 inline metadata block. As of that release the block configures the file, andty.tomlno longer reaches it. Theunresolved-import = "ignore"rule stopped applying and theclickimport surfaced as an error.Bisected:
0.0.610.0.620.0.65(what CI pulls today)What this does
Repeats the suppression in the script's own metadata, which is where ty now reads it from, plus a note in
ty.tomlso the next person understands the duplication.The dependency is not actually missing —
cli.pydeclaresclick>=8.0.0in its PEP 723 header and runs viauv run cli.py. ty does not install dependencies, which is the reasonty.tomlsuppressed the rule in the first place. This keeps that decision, it just states it where ty will now look.cli.pyis the only PEP 723 script in the checked directory, so it is the only file affected.Testing
uvx ty checkpasses on ty0.0.65and on0.0.61, so it works either side of the change.uv run cli.py --helpstill works, confirming the added block does not disturb PEP 723 execution.One thing for the owners to decide
I did not pin ty, because that is a policy call rather than part of the fix. Worth considering though: an unpinned tool in CI means an upstream release can turn
mainred without anyone touching the repo, which is exactly what happened. A pin would make the job reproducible at the cost of someone bumping it. Happy to add it if you want.🤖 Generated with Claude Code
https://claude.ai/code/session_01NKSW26NfBtfq8hVeeLdfLj