
El mar, 5 abr 2022 a las 18:13, Erik De Bonte (<Erik.DeBonte@microsoft.com>) escribió:
- Our idea is to make `@dataclass_transform()` accept and ignore arbitrary **kwargs at runtime. Type checkers would still give errors if users pass unrecognized parameters, but would be free to support additional experimental parameters without having to wait for changes to the runtime.
Thanks, great suggestion! I can submit a PR for this later tonight. Should I do that? It’s not clear to me if changes are still allowed at this point.
Small changes are fine.
- …ignore arbitrary **kwargs at runtime…
The only thing it does at runtime is set the __dataclass_transform__ attribute, right? Are you saying that you wouldn’t want to include the extra kwargs in that dict?
I'd suggest putting a key in the __dataclass_transform__ attribute that holds all the unrecognized kwargs.
-Erik