Skip to content

Commit

Permalink
Fixes coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jun 17, 2019
1 parent f674464 commit 37df1b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions returns/maybe.py
Expand Up @@ -46,49 +46,49 @@ def new(cls, inner_value: Optional[_ValueType]) -> 'Maybe[_ValueType]':
def map(
self,
function: Callable[[_ValueType], Optional[_NewValueType]],
) -> 'Maybe[_NewValueType]':
) -> 'Maybe[_NewValueType]': # pragma: no cover
"""Abstract method to compose container with pure function."""
raise NotImplementedError()

@abstractmethod
def bind(
self,
function: Callable[[_ValueType], 'Maybe[_NewValueType]'],
) -> 'Maybe[_NewValueType]':
) -> 'Maybe[_NewValueType]': # pragma: no cover
"""Abstract method to compose container with other container."""
raise NotImplementedError()

@abstractmethod
def fix(
self,
function: Callable[[], Optional[_NewValueType]],
) -> 'Maybe[_NewValueType]':
) -> 'Maybe[_NewValueType]': # pragma: no cover
"""Abstract method to compose container with pure function."""
raise NotImplementedError()

@abstractmethod
def rescue(
self,
function: Callable[[], 'Maybe[_NewValueType]'],
) -> 'Maybe[_NewValueType]':
) -> 'Maybe[_NewValueType]': # pragma: no cover
"""Abstract method to compose container with other container."""
raise NotImplementedError()

@abstractmethod
def value_or(
self,
default_value: _NewValueType,
) -> Union[_ValueType, _NewValueType]:
) -> Union[_ValueType, _NewValueType]: # pragma: no cover
"""Get value or default value."""
raise NotImplementedError()

@abstractmethod
def unwrap(self) -> _ValueType:
def unwrap(self) -> _ValueType: # pragma: no cover
"""Get value or raise exception."""
raise NotImplementedError()

@abstractmethod
def failure(self) -> None:
def failure(self) -> None: # pragma: no cover
"""Get failed value or raise exception."""
raise NotImplementedError()

Expand Down
2 changes: 1 addition & 1 deletion returns/primitives/exceptions.py
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING, TypeVar

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from returns.primitives.container import Container # noqa: F401, Z435

_ContainerType = TypeVar('_ContainerType', bound='Container')
Expand Down
14 changes: 7 additions & 7 deletions returns/result.py
Expand Up @@ -36,7 +36,7 @@ class Result(
def map(
self,
function: Callable[[_ValueType], _NewValueType],
) -> 'Result[_NewValueType, _ErrorType]':
) -> 'Result[_NewValueType, _ErrorType]': # pragma: no cover
"""Abstract method to compose container with pure function."""
raise NotImplementedError()

Expand All @@ -46,15 +46,15 @@ def bind(
function: Callable[
[_ValueType], 'Result[_NewValueType, _NewErrorType]',
],
) -> 'Result[_NewValueType, _NewErrorType]':
) -> 'Result[_NewValueType, _NewErrorType]': # pragma: no cover
"""Abstract method to compose container with other container."""
raise NotImplementedError()

@abstractmethod
def fix(
self,
function: Callable[[_ErrorType], _NewValueType],
) -> 'Result[_NewValueType, _ErrorType]':
) -> 'Result[_NewValueType, _ErrorType]': # pragma: no cover
"""Abstract method to compose container with pure function."""
raise NotImplementedError()

Expand All @@ -64,25 +64,25 @@ def rescue(
function: Callable[
[_ErrorType], 'Result[_NewValueType, _NewErrorType]',
],
) -> 'Result[_NewValueType, _NewErrorType]':
) -> 'Result[_NewValueType, _NewErrorType]': # pragma: no cover
"""Abstract method to compose container with other container."""
raise NotImplementedError()

@abstractmethod
def value_or(
self,
default_value: _NewValueType,
) -> Union[_ValueType, _NewValueType]:
) -> Union[_ValueType, _NewValueType]: # pragma: no cover
"""Get value or default value."""
raise NotImplementedError()

@abstractmethod
def unwrap(self) -> _ValueType:
def unwrap(self) -> _ValueType: # pragma: no cover
"""Get value or raise exception."""
raise NotImplementedError()

@abstractmethod
def failure(self) -> _ErrorType:
def failure(self) -> _ErrorType: # pragma: no cover
"""Get failed value or raise exception."""
raise NotImplementedError()

Expand Down

0 comments on commit 37df1b2

Please sign in to comment.