(cls, **kwargs)
| 43 | |
| 44 | @classmethod |
| 45 | def create(cls, **kwargs): |
| 46 | assert len(kwargs) == 1 |
| 47 | obj = cls(**{**{f.name: None for f in fields(cls)}, **kwargs}) # type: ignore[arg-type] |
| 48 | obj._type = _UnionTag.create(next(iter(kwargs.keys())), cls) |
| 49 | return obj |
| 50 | |
| 51 | def __post_init__(self): |
| 52 | assert not any(f.name in ("type", "_type", "create", "value") for f in fields(self)) # type: ignore[arg-type, misc] |
no test coverage detected