-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Blocker 🙅Blocks the next releaseBlocks the next releaseBug 🪲False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codepython 3.9
Description
Steps to reproduce
Install Python 3.9, then:
# minimal_repro.py
from typing import Optional, Union
foo: Optional[int] = 3
bar: Union[int, str] = 4
Current behavior
Pylint reports
minimal_repro.py:3:5: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
minimal_repro.py:4:5: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
Expected behavior
This isn't an error in Python 3.8 so I don't think it should be an error in 3.9?
pylint --version output
pylint 2.6.0
astroid 2.4.2
(I tried pip install pylint astroid --pre -U
)
timokau, the-it, apinkney97, JulienPalard, cradleguard and 120 more
Metadata
Metadata
Assignees
Labels
Blocker 🙅Blocks the next releaseBlocks the next releaseBug 🪲False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codepython 3.9