import dataclasses
from typing import List
@dataclasses.dataclass
class Foo:
bar: List[str] = dataclasses.field(default_factory=lambda: ["foo"])
print(Foo.__doc__)
which prints:
Foo(bar: List[str] = <factory>)
is there any way to have it be?:
Foo(bar: List[str] = ["foo"])
Hi, given this snippet:
which prints:
Foo(bar: List[str] = <factory>)
is there any way to have it be?:
Foo(bar: List[str] = ["foo"])
Thanks!