MCPcopy
hub / github.com/python-attrs/attrs / FactoryTest

Class FactoryTest

typing-examples/baseline.py:167–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166@attrs.define
167class FactoryTest:
168 a: list[int] = attrs.field(factory=list) # pyright:ignore[reportUnknownVariableType]
169 b: list[str] = attrs.field( # pyright:ignore[reportUnknownVariableType]
170 default=attrs.Factory(list, takes_self=False) # pyright:ignore[reportUnknownArgumentType]
171 )
172 c: list[int] = attrs.field(default=attrs.Factory((lambda s: s.a), True))
173 d: list[int] = attrs.Factory(list) # pyright:ignore[reportUnknownVariableType]
174
175
176attrs.asdict(FactoryTest())

Callers 1

baseline.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected