[Python 3.9 compat] Check for __class_getitem__ #3951
Labels
Blocker 🙅
Blocks the next release
Bug 🪲
False Positive 🦟
A message is emitted but nothing is wrong with the code
python 3.9
Python 3.9 starts to make a great use of
__class_getitem__
for exemple in collections.deque.pylint/checkers/typecheck.py
should probably look for it to infer if something is subscriptable.Reproducer:
which give:
while the code works thanks to the
__class_getitem__
.Related to #3890.
See also #3882.
The text was updated successfully, but these errors were encountered: