Author jack__d
Recipients Jelle Zijlstra, brandtbucher, gvanrossum, jack__d, kj, levkivskyi, uriyyo
Date 2021-06-29.22:16:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625005004.74.0.345078088215.issue44490@roundup.psfhosted.org>
In-reply-to
Content
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)
History
Date User Action Args
2021-06-29 22:16:44jack__dsetrecipients: + jack__d, gvanrossum, levkivskyi, Jelle Zijlstra, brandtbucher, uriyyo, kj
2021-06-29 22:16:44jack__dsetmessageid: <1625005004.74.0.345078088215.issue44490@roundup.psfhosted.org>
2021-06-29 22:16:44jack__dlinkissue44490 messages
2021-06-29 22:16:44jack__dcreate