Closed AlexWaygood closed 10 months ago
The changes in model.py
were required to avoid tripping this assertion here, since this adds three projects from the same repo:
(Very happy to go with a different fix if you don't like this one!)
Note: although these projects live in the CPython repo, they're guaranteed to not use any syntax newer than Python 3.10. That's because these projects are used to build CPython itself, and CPython 3.13 can't rely on features new-in-py312 in its build scripts, or it would run into bootstrapping issues. As such, all three projects have python_version = 3.10
in their mypy config files.
Okay cool, I think I've fixed the final nits!
Thank you!
Temporarily reverted in https://github.com/hauntsaninja/mypy_primer/commit/3fe90cf5c76de767ac4f1e46c9893a0dde0376cd in case it's causing issues
Argument Clinic, the cases generator, and the peg generator are now all checked with mypy in CI. All have very strict settings enabled in their mypy configs (including the new
possibly-undefined
error code for the cases generator). The cases generator and Argument Clinic also make heavy use of pattern-matching; and the peg generator makes some use of relatively obscure parts ofsetuptools
(which is useful for typeshed).