From 6a427561fc484cc08951c85f2e5b7e4231b8310a Mon Sep 17 00:00:00 2001 From: Sassan Haradji Date: Tue, 23 Apr 2024 18:18:24 +0400 Subject: [PATCH] fix: add `unsubscribe` method to `AutorunReturnType` protocol --- .gitignore | 2 +- CHANGELOG.md | 4 ++++ pyproject.toml | 2 +- redux/basic_types.py | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7d61052..498db70 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,7 @@ nosetests.xml coverage.xml *.cover .hypothesis/ -tests/**/results/**/*.mismatch.json +tests/**/results/**/*.mismatch.jsonc # Translations *.mo diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a7235..928f7ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 0.14.3 + +- fix: add `unsubscribe` method to `AutorunReturnType` protocol + ## Version 0.14.2 - refactor: middleware functions can now return `None` to cancel an action or event diff --git a/pyproject.toml b/pyproject.toml index 0e4777d..fd675c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-redux" -version = "0.14.2" +version = "0.14.3" description = "Redux implementation for Python" authors = ["Sassan Haradji "] license = "Apache-2.0" diff --git a/redux/basic_types.py b/redux/basic_types.py index 96688d4..b6a89cc 100644 --- a/redux/basic_types.py +++ b/redux/basic_types.py @@ -169,6 +169,8 @@ def subscribe( keep_ref: bool | None = None, ) -> Callable[[], None]: ... + def unsubscribe(self: AutorunReturnType) -> None: ... + class EventSubscriber(Protocol): def __call__(