Skip to content

Commit

Permalink
Added missing pragmas no cover
Browse files Browse the repository at this point in the history
  • Loading branch information
danielSanchezQ committed Mar 29, 2024
1 parent b549aad commit ce8e164
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions rusty_results/prelude.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def transpose(self) -> "Result[Option[T], E]":
:return: `Result[Option[T], E]`
:raises TypeError if inner value is not a `Result`
"""
... # pragma: no cover
... # pragma: no cover

@abstractmethod
def early_return(self) -> T:
Expand All @@ -258,7 +258,7 @@ def early_return(self) -> T:
:return: Self if self is Some(T) otherwise
:raises: EarlyReturnException(Empty)
"""
...
... # pragma: no cover

@abstractmethod
def __bool__(self) -> bool:
Expand Down Expand Up @@ -731,15 +731,15 @@ def flatten_one(self) -> "Result[T, E]":
Converts from Result[Result[T, E], E] to Result<T, E>, one nested level.
:return: Flattened Result[T, E]
"""
... # pragma: no cover
... # pragma: no cover

@abstractmethod
def flatten(self) -> "Result[T, E]":
"""
Converts from Result[Result[T, E], E] to Result<T, E>, any nested level
:return: Flattened Result[T, E]
"""
... # pragma: no cover
... # pragma: no cover

@abstractmethod
def transpose(self) -> Option["Result[T, E]"]:
Expand All @@ -749,7 +749,7 @@ def transpose(self) -> Option["Result[T, E]"]:
:return: Option[Result[T, E]] as per the mapping above
:raises TypeError if inner value is not an `Option`
"""
... # pragma: no cover
... # pragma: no cover

@abstractmethod
def early_return(self) -> T:
Expand All @@ -758,7 +758,7 @@ def early_return(self) -> T:
:return: T if self is Ok(T) otherwise
:raises: EarlyReturnException(Err(e))
"""
...
... # pragma: no cover

def __invert__(self) -> T:
"""
Expand Down
2 changes: 1 addition & 1 deletion rusty_results/tests/exceptions/test_early_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ def test_early_return():
def __test_it() -> Option[str]:
foo: Option = Empty()
_ = ~foo
return Some(10)
return Some(10) # pragma: no cover

assert __test_it() == Empty()

0 comments on commit ce8e164

Please sign in to comment.