Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python 3.9 compat] type is now subscriptable. #3950

Closed
JulienPalard opened this issue Nov 22, 2020 · 3 comments
Closed

[Python 3.9 compat] type is now subscriptable. #3950

JulienPalard opened this issue Nov 22, 2020 · 3 comments
Labels
Blocker 🙅 Blocks the next release Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code python 3.9

Comments

@JulienPalard
Copy link
Contributor

JulienPalard commented Nov 22, 2020

Since Python 3.9, type is made subscriptable by Objects/abstract.c (python/cpython@48b069a), to allow, for example, type[int].

print(type[int])

which give:

test.py:10:6: E1136: Value 'type' is unsubscriptable (unsubscriptable-object)

while the code works.

Related to #3890.
See also #3882.

@hippo91
Copy link
Contributor

hippo91 commented Nov 26, 2020

@JulienPalard thanks for the report.

@hippo91 hippo91 added Blocker 🙅 Blocks the next release Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code python 3.9 labels Nov 26, 2020
@cdce8p
Copy link
Member

cdce8p commented Feb 3, 2021

This seems to be fixed with: pylint-dev/astroid#885
So non blocker after an astroid update 🎉

@hippo91
Copy link
Contributor

hippo91 commented Feb 6, 2021

@cdce8p thanks for this check! I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker 🙅 Blocks the next release Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code python 3.9
Projects
None yet
Development

No branches or pull requests

3 participants