Skip to content

Commit

Permalink
Remove mimic of old Result library
Browse files Browse the repository at this point in the history
  • Loading branch information
mardiros committed Nov 3, 2024
1 parent 57a9902 commit 0d528f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/blacksmith/domain/model/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,7 @@ def unwrap_or_raise(self, exc: Type[Exception]) -> TResponse:
:raises exc: it the response is an error.
:raises NoResponseSchemaException: if there are no response schema set.
"""
# note that we can't use the unwrap_or_raise from the result
# because/until we support version that don't have the method
# for python 3.7 compatibility.
if self._result.is_err():
raise exc(self._result.unwrap_err())
return self._result.unwrap()
return self._result.unwrap_or_raise(exc)

def expect(self, message: str) -> TResponse:
"""
Expand Down

0 comments on commit 0d528f6

Please sign in to comment.