Skip to content

Type Parameter Modernization: Fixes, Latest Version - #287

Draft
FrancescoPezzella wants to merge 25 commits into
typing-recipes-2-cst-structurefrom
typing-recipes-2-further-fixes
Draft

FrancescoPezzella wants to merge 25 commits into
typing-recipes-2-cst-structurefrom
typing-recipes-2-further-fixes

Conversation

@FrancescoPezzella

Copy link
Copy Markdown
Collaborator

No description provided.

@FrancescoPezzella FrancescoPezzella self-assigned this Oct 13, 2026
@FrancescoPezzella
FrancescoPezzella changed the base branch from main to typing-recipes-2-cst-structure October 13, 2026 14:21
@FrancescoPezzella
FrancescoPezzella added this pull request to stack #277 October 13, 2026 14:21
@FrancescoPezzella

Copy link
Copy Markdown
Collaborator Author

mark most bugs with TODO: there are 0 instances found in 10+ projects. they are also often the result of syntax that goes against conventions, tool should be working

more testing will be doen against more projects and results will be reported

@FrancescoPezzella
FrancescoPezzella removed this pull request from stack #277 October 16, 2026 11:58
@FrancescoPezzella
FrancescoPezzella added this pull request to stack #296 October 16, 2026 12:15
@FrancescoPezzella FrancescoPezzella changed the title Typing recipes 2 further fixes Typing recipes 2 further fixes (latest version) Oct 16, 2026
@FrancescoPezzella
FrancescoPezzella removed this pull request from stack #296 October 16, 2026 13:51
@FrancescoPezzella
FrancescoPezzella changed the base branch from typing-recipes-2-cst-structure to main October 16, 2026 13:52
@FrancescoPezzella
FrancescoPezzella changed the base branch from main to typing-recipes-2-cst-structure October 16, 2026 15:07
…unction using a TypeVar that can't be converted is now left whole and reported unsafe.
…used only by a nested function now gets its [T] there instead of on the enclosing function.
…uff I001 in the CLI

Needed imports are added once per file after the last import, and the CLI merges and sorts them with ruff.
Keeps `# noqa` and similar comments on the declaration; comment lines above it are tracked under "Need to fix".
…them and drop its trailing comment on removal

Fixes `from <origin> import Any` for names the origin imports, and the stray `# noqa` left by orphan removal.
@FrancescoPezzella
FrancescoPezzella force-pushed the typing-recipes-2-further-fixes branch from e409e7b to 5f14bb4 Compare October 16, 2026 15:25
@FrancescoPezzella
FrancescoPezzella added this pull request to stack #295 October 16, 2026 15:25
@FrancescoPezzella FrancescoPezzella changed the title Typing recipes 2 further fixes (latest version) Type Parameter Modernization: Fixes, Latest Version Oct 19, 2026
… a fix.

Document that rewritten files are written with LF line endings as intended behaviour instead of listing it under Need to fix.
…igration report. Expose each declaration's kind from TypeVarCheck so the CLI can count them.
…unctions were converted. Simplify the migration report: plain-language descriptions, one shared documentation link, and fewer, end-to-end CLI tests.
…nctions use them, since variance applies to generic classes only.
…nused declaration removed in the migration report.
@FrancescoPezzella
FrancescoPezzella force-pushed the typing-recipes-2-further-fixes branch from f71b9c7 to 799de1a Compare October 19, 2026 16:17
…les, and report them with an Ignored column.
…nverted, removed or localized per name, and the files left for manual review by reason.
… untouched and keeps their imports in other files. Document that the tool only sees the scanned project, so unused type parameters in a shared module are removed unless it is passed to --ignore.
…instead of copying their declarations into the importing file.
… style its headings, paths and names as Markdown. Drop the redundant ruff import-cleanup sentence.
…ause of imports later localized, merging both passes into one report.

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