Skip to content

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

Closed as not planned
@DetachHead

Description

@DetachHead
from typing import Final
from dataclasses import dataclass

@dataclass
class Foo:
    a: Final[int]

playground

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions