Currently, running mypy with Python 3.11 on typeshed fails. We should fix it, ideally before the next mypy release. These should help: https://github.com/python/typeshed/pull/7314 https://github.com/python/typeshed/pull/7318 Looks like some generic type stuff is still broken: ``` stdlib/builtins.pyi:1710: error: Value of type "Type[type]" is not indexable [index] ``` There are changes to use `@property` in enum that mypy doesn't like. Lucky for us @sobolevn is really good at fixing enum issues :D ``` stdlib/enum.pyi:103: error: Decorated property not supported [misc] stdlib/enum.pyi:105: error: Decorated property not supported [misc] stdlib/enum.pyi:131: error: Decorated property not supported [misc] stdlib/enum.pyi:148: error: Signature of "value" incompatible with supertype "Flag" [override] stdlib/enum.pyi:159: error: Decorated property not supported [misc] stdlib/enum.pyi:161: error: Decorated property not supported [misc] stdlib/enum.pyi:189: error: Decorated property not supported [misc] ```
Activity
hauntsaninja commentedon Feb 20, 2022
To repro:
and then
python3.11 ~/dev/typeshed/tests/mypy_test.py --python-version 3.11sobolevn commentedon Feb 20, 2022
I have some crazy stuff going on, so I am not really active right now.
But, I will have a look somewhere this week! 👍
Thanks for the repro!
AlexWaygood commentedon Feb 20, 2022
(Note that the changes in
enumare that theenummodule in 3.11 started using@enum.property(not@builtins.property!))AlexWaygood commentedon Feb 26, 2022
python/typeshed#7389 gets rid of most of the remaining errors reported by mypy.
AlexWaygood commentedon Feb 27, 2022
I've filed #12258 to track the last remaining error when running mypy's master branch on the 3.11 typeshed stubs.
AlexWaygood commentedon Feb 28, 2022
Now that #12260 is merged, it looks like typeshed's 3.11 stdlib passes a mypy type-check when using the mypy master branch 🥳
hauntsaninja commentedon Feb 28, 2022
Awesome, thanks both!
Further improve `mypy_test.py` (#7484)