Skip to content

Commit aa6130b

Browse files
committed
Fixes docs for pointfree
1 parent db160df commit aa6130b

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

returns/_generated/pointfree/bind.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def _bind(function):
2525
>>> assert bind(example)(Nothing) == Nothing
2626
2727
Note, that this function works for all containers with ``.bind`` method.
28+
See :class:`returns.primitives.interfaces.Bindable` for more info.
2829
2930
"""
3031
return lambda container: container.bind(function)

returns/_generated/pointfree/rescue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def _rescue(function):
2323
>>> assert rescue(example)(Success('a')) == Success('a')
2424
>>> assert rescue(example)(Failure(1)) == Success(2)
2525
26-
Note, that this function works for all containers with ``.bind`` method.
26+
Note, that this function works for all containers with ``.rescue`` method.
27+
See :class:`returns.primitives.interfaces.Rescueable` for more info.
2728
2829
"""
2930
return lambda container: container.rescue(function)

returns/primitives/interfaces.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def bind(
2828
2929
And returns a new container.
3030
Works for containers that represent success.
31-
Is the opposite of :meth:`Rescueable.rescue`.
31+
Is the opposite of :meth:`~Rescueable.rescue`.
3232
"""
3333

3434

@@ -47,7 +47,7 @@ def map( # noqa: A003
4747
Applies 'function' to the contents of the functor.
4848
4949
And returns a new functor value.
50-
Is the opposite of :meth:`Fixable.fix`.
50+
Is the opposite of :meth:`~Fixable.fix`.
5151
"""
5252

5353

@@ -63,7 +63,7 @@ def fix(
6363
6464
And returns a new functor value.
6565
Works for containers that represent failure.
66-
Is the opposite of :meth:`Mappable.map`.
66+
Is the opposite of :meth:`~Mappable.map`.
6767
"""
6868

6969

@@ -88,7 +88,7 @@ def rescue(
8888
8989
And returns a new container.
9090
Works for containers that represent failure.
91-
Is the opposite of :meth:`~bind`.
91+
Is the opposite of :meth:`~Bindable.bind`.
9292
"""
9393

9494

@@ -108,14 +108,14 @@ def unwrap(self) -> _ValueType:
108108
Should be redefined for ones that actually have values.
109109
And for ones that raise an exception for no values.
110110
111-
This method is the opposite of :meth:`~failure`.
111+
This method is the opposite of :meth:`~Unwrapable.failure`.
112112
"""
113113

114114
def failure(self) -> _ErrorType:
115115
"""
116116
Custom magic method to unwrap inner value from the failed container.
117117
118-
This method is the opposite of :meth:`~unwrap`.
118+
This method is the opposite of :meth:`~Unwrapable.unwrap`.
119119
"""
120120

121121

@@ -132,7 +132,7 @@ def alt(
132132
133133
And returns a new functor value.
134134
Works for containers that represent failure.
135-
Is the opposite of :meth:`~map`.
135+
Is the opposite of :meth:`~Mappable.map`.
136136
"""
137137

138138

0 commit comments

Comments
 (0)