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

False unsubscriptable-object positive on typing.Collection with Python 3.6 #3292

Closed
scop opened this issue Dec 6, 2019 · 3 comments
Closed
Labels
Bug 🪲 Duplicate 🐫 Duplicate of an already existing issue

Comments

@scop
Copy link
Contributor

scop commented Dec 6, 2019

Steps to reproduce

$ cat t.py

def test(coll: Collection[str]) -> None:
    print(len(coll))
$ pylint t.py | grep unsubscriptable
t.py:3:15: E1136: Value 'Collection' is unsubscriptable (unsubscriptable-object)
$ python --version
Python 3.6.9

Curiously, this is not reproducible with at least 3.7.4 or 3.8.0, I see it with 3.6.x (x={1, 9}) only.

Maybe related to #3129, #2849 ?

Current behavior

False unsubscriptable-object positive on typing.Collection

Expected behavior

No error

pylint --version output

pylint 2.5.0-dev1
astroid 2.4.0
Python 3.6.9 (default, Jul 31 2019, 21:07:43)
[GCC 7.4.0]

@PCManticore
Copy link
Contributor

Curious that this reproduces only on 3.6.X.

@Jon-Work
Copy link

Dupe of #2377

@PCManticore
Copy link
Contributor

Thanks @Jon-Work

@PCManticore PCManticore added the Duplicate 🐫 Duplicate of an already existing issue label Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

3 participants