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

typing.Final not subscriptable #4052

Closed
bryceschober opened this issue Jan 29, 2021 · 3 comments
Closed

typing.Final not subscriptable #4052

bryceschober opened this issue Jan 29, 2021 · 3 comments
Labels
Duplicate 🐫 Duplicate of an already existing issue python 3.9

Comments

@bryceschober
Copy link

bryceschober commented Jan 29, 2021

Steps to reproduce

from dataclasses import dataclass
from typing import Final

@dataclass
class constants:
    MY_THING: Final[float] = -12.34

Current behavior

Value 'Final' is unsubscriptable

pylint --version output

$ pylint --version
pylint 2.5.3
astroid 2.4.1
Python 3.9.1 (default, Dec 11 2020, 09:29:25) [MSC v.1916 64 bit (AMD64)]
@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Feb 6, 2021

Hello, I cannot reproduce with python 3.8 on pylint's master branch, could you try to install pylint 2.6.0 or the latest master (pip3 install git@github.com:PyCQA/pylint.git@master#egg=pylint), please ? (2.5.3 is old) Maybe it's specific to python 3.9.

@cdce8p
Copy link
Member

cdce8p commented Feb 6, 2021

I can reproduce it with Python 3.9.1 and pylint 2.6.0.

However, I believe this issue was already fixed with: pylint-dev/astroid#885, at least it works with the current master branch of pylint and astroid just fine.

Similar to #3950, #3951, #3979

@Pierre-Sassoulas Pierre-Sassoulas added Duplicate 🐫 Duplicate of an already existing issue and removed Cannot reproduce 🤷 labels Feb 6, 2021
@Pierre-Sassoulas
Copy link
Member

Thanks for testing with latest astroid @cdce8p. It should be fixed in 2.6.1 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue python 3.9
Projects
None yet
Development

No branches or pull requests

3 participants