Message396756
mypy does not support __parameters__:
(venv) ➜ cpython git:(main) cat repro.py
from typing import TypeVar
T = TypeVar('T')
(int | list[T]).__parameters__
(venv) ➜ cpython git:(main) mypy --version
mypy 0.920+dev.cae5d3c8b5f14d0796914aa6a113473ca3ffc38e
(venv) ➜ cpython git:(main) python --version
Python 3.11.0a0
(venv) ➜ cpython git:(main) mypy repro.py
repro.py:4: error: "types.Union" has no attribute "__parameters__"
Found 1 error in 1 file (checked 1 source file)
(venv) ➜ cpython git:(main)
mypy also does not support __getitem__
(venv) ➜ cpython git:(main) cat repro.py
from typing import TypeVar
T = TypeVar('T')
(int | list[T]).__getitem__
(venv) ➜ cpython git:(main) mypy --version
./mypy 0.920+dev.cae5d3c8b5f14d0796914aa6a113473ca3ffc38e
(venv) ➜ cpython git:(main) python --version
Python 3.11.0a0
(venv) ➜ cpython git:(main) mypy repro.py
repro.py:4: error: Value of type "types.Union" is not indexable
Found 1 error in 1 file (checked 1 source file)
(venv) ➜ cpython git:(main) |
|
| Date |
User |
Action |
Args |
| 2021-06-29 22:16:44 | jack__d | set | recipients:
+ jack__d, gvanrossum, levkivskyi, JelleZijlstra, brandtbucher, uriyyo, kj |
| 2021-06-29 22:16:44 | jack__d | set | messageid: <[email protected]> |
| 2021-06-29 22:16:44 | jack__d | link | issue44490 messages |
| 2021-06-29 22:16:44 | jack__d | create | |
|