We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
field
dataclass
from dataclasses import field a = field(default=1) a + 1 # runtime error reveal_type(a) # int
playground
Take it to typeshed general
from dataclasses import dataclass, field @dataclass class A: a = field(default=1) print(a + 1)
Field
int
Activity
KotlinIsland commentedon Jul 14, 2022
Take it to typeshed general
KotlinIsland commentedon Jul 19, 2022
Field
when mypy thinks it'sint
(or whatever) #13180