Skip to content

Commit

Permalink
Add a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mardiros committed Nov 3, 2024
1 parent ccabeb6 commit 26e0eaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/blacksmith/domain/model/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 26e0eaa

Please sign in to comment.