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

"Final name must be initialized with a value" error when annotating dataclass field with Final #13118

Closed
DetachHead opened this issue Jul 14, 2022 · 1 comment
Labels
bug mypy got something wrong topic-dataclasses topic-final PEP 591

Comments

@DetachHead
Copy link
Contributor

from typing import Final
from dataclasses import dataclass

@dataclass
class Foo:
    a: Final[int]

playground

@AlexWaygood
Copy link
Member

Duplicate of #5608

@AlexWaygood AlexWaygood marked this as a duplicate of #5608 Jul 14, 2022
@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-dataclasses topic-final PEP 591
Projects
None yet
Development

No branches or pull requests

2 participants