From f2828cc7391a6d077446e80eeb4cae07e0e14d38 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Tue, 9 Jul 2024 17:53:50 +0300 Subject: [PATCH] docs: update NoCast docstring --- faststream/utils/no_cast.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/faststream/utils/no_cast.py b/faststream/utils/no_cast.py index 9d978e0f0c..6a96fbd029 100644 --- a/faststream/utils/no_cast.py +++ b/faststream/utils/no_cast.py @@ -8,22 +8,15 @@ class NoCast(CustomField): """A class that represents a custom field without casting. - Methods: - __init__ : Initializes the NoCast object. - use : Returns the provided keyword arguments as a dictionary. + You can use it to annotate fields, that should not be casted. + + Usage: + + `data: Annotated[..., NoCast()]` """ def __init__(self) -> None: - """Initialize the NoCast object.""" super().__init__(cast=False) def use(self, **kwargs: Any) -> AnyDict: - """Return a dictionary containing the keyword arguments passed to the function. - - Args: - **kwargs: Keyword arguments - - Returns: - Dictionary containing the keyword arguments - """ return kwargs