Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
romanmatveevsky committed Aug 12, 2024
1 parent d8369b8 commit f1839c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/pages/result.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ list of ``Result`` instances to a tuple of two lists: successes and failures.
.. code:: python
>>> from returns.result import Failure, Success
>>> from returns.result.methods import partition
>>> from returns.methods import partition
>>> results = [Success(1), Failure(2), Success(3), Failure(4)]
>>> partition(results)
([1, 3], [2, 4])
Expand Down
2 changes: 1 addition & 1 deletion returns/methods/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def partition(
>>> from returns.methods import partition
>>> results = [Success(1), Failure(2), Success(3), Failure(4)]
>>> partition(results)
([1, 3], [2,4])
([1, 3], [2, 4])
"""
successes = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
disable_cache: false
main: |
from returns.result import Success, Failure
from returns.result.methods import partition
from returns.methods import partition
x: List[Result[int, str]]
reveal_type(partition(x)) # N: Revealed type is "Tuple[builtins.list[builtin.int], builtins.list[builtin.str]]"
Expand All @@ -12,7 +12,7 @@
main: |
from typing import Tuple
from returns.result import Success, Failure
from returns.result.methods import partition
from returns.methods import partition
from returns.io import IO, IOResult
x: Tuple[IOResult[int, str], IOResult[int, str]]
Expand Down

0 comments on commit f1839c3

Please sign in to comment.