Closed
Copy link
Labels
Description
In #20223, I'm choosing to (temporarily) ignore PEP 695 lint rules, that suggests using syntactic type variables. This is for a couple reasons:
- while most of the violations can be auto-fixed by ruff, the fix isn't safe (subtle differences might creep in, in particular around variance)
- I'd like to keep DEP: drop support for Python 3.11, require 3.12+ #20223 as clean as possible. It does contain (100% safe) cleanups, but I'd rather not scope creep it with unnecessary upgrades.
linked PRs:
- RFC: autofix non-pep695-type-alias violations (UP040) #20307
- RFC: rewrite a private generic using a PEP 695 type parameter #20308
- RFC: fix non-pep695-generic-class violations (UP046) #20309
- RFC: rewrite overloads with PEP 695 type parameters #20343
- RFC: refine type annotations around an invalid typevar #20344
- RFC: rewrite type annotations with PEP 695 type parameters (cosmology) #20345
- RFC: rewrite type annotations with PEP 695 type parameters #20347
Activity
neutrinoceros commentedon Sep 8, 2026
The set of open PRs is complete in that it will resolve all remaining violations to rules UP046 and UP047 in existing code. What remains to be done besides merging these is to re-enable the rules globally.