python-redux 0.16.1__tar.gz → 0.17.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_redux-0.16.1 → python_redux-0.17.1}/PKG-INFO +3 -3
- {python_redux-0.16.1 → python_redux-0.17.1}/pyproject.toml +3 -3
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/autorun.py +1 -6
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/basic_types.py +3 -4
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/main.py +0 -1
- {python_redux-0.16.1 → python_redux-0.17.1}/LICENSE +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/README.md +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/__init__.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/combine_reducers.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/py.typed +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/serialization_mixin.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux/side_effect_runner.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/__init__.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/__init__.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/event_loop.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/monitor.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/snapshot.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/store.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/fixtures/wait_for.py +0 -0
- {python_redux-0.16.1 → python_redux-0.17.1}/redux_pytest/plugin.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-redux
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.1
|
|
4
4
|
Summary: Redux implementation for Python
|
|
5
5
|
Home-page: https://github.com/sassanh/python-redux/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -12,10 +12,10 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Dist: pyright (>=1.1.
|
|
15
|
+
Requires-Dist: pyright (>=1.1.383,<2.0.0)
|
|
16
16
|
Requires-Dist: python-immutable (>=1.1.1,<2.0.0)
|
|
17
17
|
Requires-Dist: python-strtobool (>=1.0.0,<2.0.0)
|
|
18
|
-
Requires-Dist: ruff (>=0.6.
|
|
18
|
+
Requires-Dist: ruff (>=0.6.9,<0.7.0)
|
|
19
19
|
Project-URL: Repository, https://github.com/sassanh/python-redux/
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "python-redux"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.17.1"
|
|
4
4
|
description = "Redux implementation for Python"
|
|
5
5
|
authors = ["Sassan Haradji <sassanh@gmail.com>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -14,8 +14,8 @@ packages = [{ include = "redux" }, { include = "redux_pytest" }]
|
|
|
14
14
|
python = "^3.11"
|
|
15
15
|
python-immutable = "^1.1.1"
|
|
16
16
|
python-strtobool = "^1.0.0"
|
|
17
|
-
pyright = "^1.1.
|
|
18
|
-
ruff = "^0.6.
|
|
17
|
+
pyright = "^1.1.383"
|
|
18
|
+
ruff = "^0.6.9"
|
|
19
19
|
|
|
20
20
|
[tool.poetry.group.dev]
|
|
21
21
|
optional = true
|
|
@@ -45,9 +45,6 @@ class Autorun(
|
|
|
45
45
|
],
|
|
46
46
|
options: AutorunOptions[AutorunOriginalReturnType],
|
|
47
47
|
) -> None:
|
|
48
|
-
if not options.reactive and options.auto_call:
|
|
49
|
-
msg = '`reactive` must be `True` if `auto_call` is `True`'
|
|
50
|
-
raise ValueError(msg)
|
|
51
48
|
self._store = store
|
|
52
49
|
self._selector = selector
|
|
53
50
|
self._comparator = comparator
|
|
@@ -80,9 +77,7 @@ class Autorun(
|
|
|
80
77
|
|
|
81
78
|
if self._options.reactive:
|
|
82
79
|
self._unsubscribe = store.subscribe(
|
|
83
|
-
lambda state: self._call()
|
|
84
|
-
if self._check(state) and self._options.auto_call
|
|
85
|
-
else None,
|
|
80
|
+
lambda state: self._call() if self._check(state) else None,
|
|
86
81
|
)
|
|
87
82
|
else:
|
|
88
83
|
self._unsubscribe = None
|
|
@@ -39,9 +39,9 @@ class BaseEvent(Immutable): ...
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
# Type variables
|
|
42
|
-
State = TypeVar('State', bound=Immutable, infer_variance=True)
|
|
43
|
-
Action = TypeVar('Action', bound=BaseAction, infer_variance=True)
|
|
44
|
-
Event = TypeVar('Event', bound=BaseEvent, infer_variance=True)
|
|
42
|
+
State = TypeVar('State', bound=Immutable | None, infer_variance=True)
|
|
43
|
+
Action = TypeVar('Action', bound=BaseAction | None, infer_variance=True)
|
|
44
|
+
Event = TypeVar('Event', bound=BaseEvent | None, infer_variance=True)
|
|
45
45
|
Event2 = TypeVar('Event2', bound=BaseEvent, infer_variance=True)
|
|
46
46
|
SelectorOutput = TypeVar('SelectorOutput', infer_variance=True)
|
|
47
47
|
ComparatorOutput = TypeVar('ComparatorOutput', infer_variance=True)
|
|
@@ -134,7 +134,6 @@ class CreateStoreOptions(Immutable, Generic[Action, Event]):
|
|
|
134
134
|
class AutorunOptions(Immutable, Generic[AutorunOriginalReturnType]):
|
|
135
135
|
default_value: AutorunOriginalReturnType | None = None
|
|
136
136
|
initial_call: bool = True
|
|
137
|
-
auto_call: bool = True
|
|
138
137
|
reactive: bool = True
|
|
139
138
|
keep_ref: bool = True
|
|
140
139
|
subscribers_initial_run: bool = True
|
|
@@ -389,7 +389,6 @@ class Store(Generic[State, Action, Event], SerializationMixin):
|
|
|
389
389
|
options=AutorunOptions(
|
|
390
390
|
default_value=_options.default_value,
|
|
391
391
|
initial_call=False,
|
|
392
|
-
auto_call=False,
|
|
393
392
|
reactive=False,
|
|
394
393
|
keep_ref=_options.keep_ref,
|
|
395
394
|
subscribers_initial_run=_options.subscribers_initial_run,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|