Skip to content

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

Closed as not planned

Description

@DetachHead
from typing import Final
from dataclasses import dataclass

@dataclass
class Foo:
    a: Final[int]

playground

Activity

  1. added
    bug
    on Jul 14, 2022
  2. AlexWaygood commented on Jul 14, 2022

    @AlexWaygood
    Member

    Duplicate of #5608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtopic-dataclassestopic-final

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions