MCPcopy Index your code
hub / github.com/dry-python/returns / unwrap

Method unwrap

returns/result.py:396–400  ·  view source on GitHub ↗

Raises an exception, since it does not have a value inside.

(self)

Source from the content-addressed store, hash-verified

394 return Success(self._inner_value)
395
396 def unwrap(self) -> Never:
397 """Raises an exception, since it does not have a value inside."""
398 if isinstance(self._inner_value, Exception):
399 raise UnwrapFailedError(self) from self._inner_value
400 raise UnwrapFailedError(self)
401
402 def failure(self) -> _ErrorType_co:
403 """Returns failed value."""

Callers

nothing calls this directly

Calls 1

UnwrapFailedErrorClass · 0.90

Tested by

no test coverage detected