Skip to content

Commit 37df1b2

Browse files
committed
Fixes coverage
1 parent f674464 commit 37df1b2

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

returns/maybe.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,49 +46,49 @@ def new(cls, inner_value: Optional[_ValueType]) -> 'Maybe[_ValueType]':
4646
def map(
4747
self,
4848
function: Callable[[_ValueType], Optional[_NewValueType]],
49-
) -> 'Maybe[_NewValueType]':
49+
) -> 'Maybe[_NewValueType]': # pragma: no cover
5050
"""Abstract method to compose container with pure function."""
5151
raise NotImplementedError()
5252

5353
@abstractmethod
5454
def bind(
5555
self,
5656
function: Callable[[_ValueType], 'Maybe[_NewValueType]'],
57-
) -> 'Maybe[_NewValueType]':
57+
) -> 'Maybe[_NewValueType]': # pragma: no cover
5858
"""Abstract method to compose container with other container."""
5959
raise NotImplementedError()
6060

6161
@abstractmethod
6262
def fix(
6363
self,
6464
function: Callable[[], Optional[_NewValueType]],
65-
) -> 'Maybe[_NewValueType]':
65+
) -> 'Maybe[_NewValueType]': # pragma: no cover
6666
"""Abstract method to compose container with pure function."""
6767
raise NotImplementedError()
6868

6969
@abstractmethod
7070
def rescue(
7171
self,
7272
function: Callable[[], 'Maybe[_NewValueType]'],
73-
) -> 'Maybe[_NewValueType]':
73+
) -> 'Maybe[_NewValueType]': # pragma: no cover
7474
"""Abstract method to compose container with other container."""
7575
raise NotImplementedError()
7676

7777
@abstractmethod
7878
def value_or(
7979
self,
8080
default_value: _NewValueType,
81-
) -> Union[_ValueType, _NewValueType]:
81+
) -> Union[_ValueType, _NewValueType]: # pragma: no cover
8282
"""Get value or default value."""
8383
raise NotImplementedError()
8484

8585
@abstractmethod
86-
def unwrap(self) -> _ValueType:
86+
def unwrap(self) -> _ValueType: # pragma: no cover
8787
"""Get value or raise exception."""
8888
raise NotImplementedError()
8989

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

returns/primitives/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import TYPE_CHECKING, TypeVar
44

5-
if TYPE_CHECKING:
5+
if TYPE_CHECKING: # pragma: no cover
66
from returns.primitives.container import Container # noqa: F401, Z435
77

88
_ContainerType = TypeVar('_ContainerType', bound='Container')

returns/result.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Result(
3636
def map(
3737
self,
3838
function: Callable[[_ValueType], _NewValueType],
39-
) -> 'Result[_NewValueType, _ErrorType]':
39+
) -> 'Result[_NewValueType, _ErrorType]': # pragma: no cover
4040
"""Abstract method to compose container with pure function."""
4141
raise NotImplementedError()
4242

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

5353
@abstractmethod
5454
def fix(
5555
self,
5656
function: Callable[[_ErrorType], _NewValueType],
57-
) -> 'Result[_NewValueType, _ErrorType]':
57+
) -> 'Result[_NewValueType, _ErrorType]': # pragma: no cover
5858
"""Abstract method to compose container with pure function."""
5959
raise NotImplementedError()
6060

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

7171
@abstractmethod
7272
def value_or(
7373
self,
7474
default_value: _NewValueType,
75-
) -> Union[_ValueType, _NewValueType]:
75+
) -> Union[_ValueType, _NewValueType]: # pragma: no cover
7676
"""Get value or default value."""
7777
raise NotImplementedError()
7878

7979
@abstractmethod
80-
def unwrap(self) -> _ValueType:
80+
def unwrap(self) -> _ValueType: # pragma: no cover
8181
"""Get value or raise exception."""
8282
raise NotImplementedError()
8383

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

0 commit comments

Comments
 (0)