From 26e0eaaa8e584c93f8ba23d0d4516426ffd8f79f Mon Sep 17 00:00:00 2001 From: Guillaume Gauvrit Date: Sun, 3 Nov 2024 09:22:37 +0100 Subject: [PATCH] Add a docstring --- src/blacksmith/domain/model/params.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/blacksmith/domain/model/params.py b/src/blacksmith/domain/model/params.py index 3a99bfb..7ebd909 100644 --- a/src/blacksmith/domain/model/params.py +++ b/src/blacksmith/domain/model/params.py @@ -339,11 +339,17 @@ def or_else( return self._result.or_else(op) # type: ignore def inspect(self, op: Callable[[TResponse], Any]) -> Result[TResponse, TError_co]: + """ + Call op with the contained value if `Ok` and return the original result. + """ return self._result.inspect(op) def inspect_err( self, op: Callable[[TError_co], Any] ) -> Result[TResponse, TError_co]: + """ + Call op with the contained error if `Ok` and return the original result. + """ return self._result.inspect_err(op)