Skip to content

Commit 4527ef3

Browse files
committed
refactor(core): allow None type for state, action and event types in ReducerResult and CompleteReducerResult
1 parent 2942791 commit 4527ef3

File tree

4 files changed

+36
-30
lines changed

4 files changed

+36
-30
lines changed

CHANGELOG.md

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

3+
## Version 0.17.1
4+
5+
- refactor(core): allow `None` type for state, action and event types in `ReducerResult` and `CompleteReducerResult`
6+
37
## Version 0.17.0
48

59
- refactor(autorun): remove `auto_call` option as it was addressing such a rare use case that it was not worth the complexity

poetry.lock

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

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "python-redux"
3-
version = "0.17.0"
3+
version = "0.17.1"
44
description = "Redux implementation for Python"
55
authors = ["Sassan Haradji <sassanh@gmail.com>"]
66
license = "Apache-2.0"
@@ -14,8 +14,8 @@ packages = [{ include = "redux" }, { include = "redux_pytest" }]
1414
python = "^3.11"
1515
python-immutable = "^1.1.1"
1616
python-strtobool = "^1.0.0"
17-
pyright = "^1.1.378"
18-
ruff = "^0.6.3"
17+
pyright = "^1.1.383"
18+
ruff = "^0.6.9"
1919

2020
[tool.poetry.group.dev]
2121
optional = true

redux/basic_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class BaseEvent(Immutable): ...
3939

4040

4141
# 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)
4545
Event2 = TypeVar('Event2', bound=BaseEvent, infer_variance=True)
4646
SelectorOutput = TypeVar('SelectorOutput', infer_variance=True)
4747
ComparatorOutput = TypeVar('ComparatorOutput', infer_variance=True)

0 commit comments

Comments
 (0)