From: Sebastián Ramírez Date: Mon, 5 Dec 2022 19:58:17 +0000 (+0100) Subject: 📝 Add **kwargs parameter to follow the design in the final version of dataclass_transform X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=932356ff826f808421cde1f310f649f62ac45061;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Add **kwargs parameter to follow the design in the final version of dataclass_transform --- diff --git a/typing_doc.md b/typing_doc.md index 0dcdb1c062..a92a0a76f2 100644 --- a/typing_doc.md +++ b/typing_doc.md @@ -42,6 +42,7 @@ This `doc()` function would receive several parameters for metadata and document * `discouraged: bool`: this would mark a parameter, class, function, or method as discouraged. Editors could display them similar to `deprecated`. The reason why having a `discouraged` apart from `deprecated` is that there are cases where something is not gonna be removed for backward compatibility, but it shouldn't be used in new code. An example of this is `datetime.utcnow()`. * `extra: dict`: a dictionary containing any additional metadata that could be useful for developers or library authors. * An `extra` parameter instead of `**kwargs` is proposed to allow adding future standard parameters. +* `**kwargs: Any`: allows arbitrary additional keyword args. This gives type checkers the freedom to support experimental parameters without needing to wait for changes in `typing.py`. Type checkers should report errors for any unrecognized parameters. This follows the same pattern designed in [PEP 681 – Data Class Transforms](https://peps.python.org/pep-0681/). Other possible future parameters could include: