Skip to content

Commit 2e6decb

Browse files
committed
Removes Maybe monad
1 parent edb8ae2 commit 2e6decb

15 files changed

+5
-519
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ We follow Semantic Versions since the `0.1.0` release.
1515
- Renames `ebind` to `rescue`
1616
- Renames `efmap` to `fix`
1717
- Renames `Monad` to `Container`
18+
- Removes `Maybe` monad, since typing does not have `NonNullable` type
1819

1920

2021
## Version 0.3.1

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Contents
1717
:caption: Userguide
1818

1919
pages/container.rst
20-
pages/maybe.rst
2120
pages/result.rst
2221
pages/functions.rst
2322

docs/pages/functions.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ is_successful
1010
:func:`is_succesful <returns.functions.is_successful>` is used to
1111
tell whether or not your result is a success.
1212
We treat only treat types that does not throw as a successful ones,
13-
basically: :class:`Success <returns.result.Success>`
14-
and :class:`Some <returns.maybe.Some>`.
13+
basically: :class:`Success <returns.result.Success>`.
1514

1615
.. code:: python
1716
1817
from returns.result import Success, Failure
1918
from returns.functions import is_successful
20-
from returns.maybe import Some, Nothing
2119
22-
is_successful(Some(1)) and is_successful(Success(1))
20+
is_successful(Success(1))
2321
# => True
2422
25-
is_successful(Nothing) or is_successful(Failure('text'))
23+
is_successful(Failure('text'))
2624
# => False
2725
2826
.. _pipeline:

docs/pages/maybe.rst

Lines changed: 0 additions & 62 deletions
This file was deleted.

returns/maybe.py

Lines changed: 0 additions & 128 deletions
This file was deleted.

returns/maybe.pyi

Lines changed: 0 additions & 130 deletions
This file was deleted.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ per-file-ignores =
3131
**/*.pyi: D100, D401, X100
3232
**/*.py: D100, D401, X100
3333
# Disable some `.pyi` specific warings:
34-
**/*.pyi: D101, D102, D103, D107, Z214, Z444, Z452
34+
**/*.pyi: D101, D102, D103, D107, Z444, Z452
3535
# TODO: fix check and remove it from ignores
3636
**/*.py: Z454
3737
**/*.pyi: Z454

tests/test_functions/test_is_successful.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
import pytest
44

55
from returns.functions import is_successful
6-
from returns.maybe import Nothing, Some
76
from returns.result import Failure, Success
87

98

109
@pytest.mark.parametrize('container, correct_result', [
11-
(Some, True),
1210
(Success, True),
13-
(Nothing, False),
1411
(Failure, False),
1512
])
1613
def test_is_successful(container, correct_result):

0 commit comments

Comments
 (0)