This rule does not appear to be working for Dataclass Init-Only variables:
@dataclass class Book: name: str condition: InitVar[str] = ''
Assign to “condition” a value of type “InitVar[str]” instead of “str” or update its type hint.
In fact, most examples including the official documentation use
None as the default for init-only arguments. Attempting to use
InitVar[Optional[str]] has the same effect as above.