Skip to content

Commit c0f0a91

Browse files
committed
refactor(core): use str_to_bool of python-strtobool instead of strtobool of distutils
1 parent 16e68cc commit c0f0a91

File tree

7 files changed

+125
-120
lines changed

7 files changed

+125
-120
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Version 0.15.9
4+
5+
- refactor(core): use `str_to_bool` of `python-strtobool` instead of `strtobool`
6+
of `distutils`
7+
38
## Version 0.15.8
49

510
- feat(test-snapshot): the `selector` function can signal the `monitor` it should

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ store.dispatch(FinishAction())
144144
## ⚙️ Features
145145

146146
- Redux API for Python developers.
147+
147148
- Reduce boilerplate by dropping `type` property, payload classes and action creators:
148149

149150
- Each action is a subclass of `BaseAction`.
@@ -152,13 +153,17 @@ store.dispatch(FinishAction())
152153
- Its creator is its auto-generated constructor.
153154

154155
- Use type annotations for all its API.
156+
155157
- Immutable state management for predictable state updates using [python-immutable](https://github.com/sassanh/python-immutable).
158+
156159
- Offers a streamlined, native [API](#handling-side-effects-with-events) for handling
157160
side-effects asynchronously, eliminating the necessity for more intricate utilities
158161
such as redux-thunk or redux-saga.
162+
159163
- Incorporates the [autorun decorator](#autorun-decorator) and
160164
the [view decorator](#view-decorator), inspired by the mobx framework, to better
161165
integrate with elements of the software following procedural patterns.
166+
162167
- Supports middlewares.
163168

164169
## 📦 Installation
@@ -294,6 +299,7 @@ For a detailed example, see [features demo](/tests/test_features.py).
294299

295300
Contributions following Python best practices are welcome.
296301

297-
## 🔒 License
302+
## 📜 License
298303

299-
Refer to the repository for license details.
304+
This project is released under the Apache-2.0 License. See the [LICENSE](./LICENSE)
305+
file for more details.

poetry.lock

Lines changed: 105 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "python-redux"
3-
version = "0.15.8"
3+
version = "0.15.9"
44
description = "Redux implementation for Python"
55
authors = ["Sassan Haradji <sassanh@gmail.com>"]
66
license = "Apache-2.0"
@@ -13,6 +13,7 @@ packages = [{ include = "redux" }, { include = "redux_pytest" }]
1313
[tool.poetry.dependencies]
1414
python = "^3.11"
1515
python-immutable = "^1.1.1"
16+
python-strtobool = "^1.0.0"
1617

1718
[tool.poetry.group.dev]
1819
optional = true

redux/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def decorator(
324324
store=self,
325325
selector=selector,
326326
comparator=comparator,
327-
func=func,
327+
func=cast(Callable, func),
328328
options=options or AutorunOptions(),
329329
)
330330

@@ -381,7 +381,7 @@ def decorator(
381381
store=self,
382382
selector=selector,
383383
comparator=None,
384-
func=func,
384+
func=cast(Callable, func),
385385
options=AutorunOptions(
386386
default_value=_options.default_value,
387387
initial_call=False,

redux_pytest/fixtures/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .store import needs_finish, store # noqa: E402
1717
from .wait_for import Waiter, WaitFor, wait_for # noqa: E402
1818

19-
__all__ = [
19+
__all__ = (
2020
'LoopThread',
2121
'StoreMonitor',
2222
'StoreSnapshot',
@@ -28,4 +28,4 @@
2828
'store_monitor',
2929
'store_snapshot',
3030
'wait_for',
31-
]
31+
)

redux_pytest/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
@pytest.hookimpl
77
def pytest_addoption(parser: pytest.Parser) -> None:
88
"""Add options to the pytest command line."""
9-
group = parser.getgroup('redux', 'python-redux')
9+
group = parser.getgroup('redux', 'python redux options')
1010
group.addoption('--override-store-snapshots', action='store_true')

0 commit comments

Comments
 (0)