From 4427aa442f1964ac44e27924e2e18f152b5326b2 Mon Sep 17 00:00:00 2001 From: Gnought <1684105+gnought@users.noreply.github.com> Date: Wed, 4 Sep 2024 04:39:16 +0800 Subject: [PATCH] [watchmedo] Fix `tricks` argument type of `schedule_tricks()` (#1063) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: correct `tricks` typing be a list of dictionary * Update changelog.rst --------- Co-authored-by: Mickaël Schoentgen --- changelog.rst | 4 ++-- src/watchdog/watchmedo.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.rst b/changelog.rst index 584e6baf..95c4a26c 100644 --- a/changelog.rst +++ b/changelog.rst @@ -8,8 +8,8 @@ Changelog 2024-xx-xx • `full history `__ -- -- Thanks to our beloved contributors: @BoboTiG, @ +- [watchmedo] Fix ``tricks`` argument type of ``schedule_tricks()`` (`#1063 `__) +- Thanks to our beloved contributors: @BoboTiG, @gnought 5.0.1 ~~~~~ diff --git a/src/watchdog/watchmedo.py b/src/watchdog/watchmedo.py index 4aab0872..a4af65e3 100644 --- a/src/watchdog/watchmedo.py +++ b/src/watchdog/watchmedo.py @@ -190,7 +190,7 @@ def observe_with( observer.join() -def schedule_tricks(observer: BaseObserver, tricks: dict, pathname: str, *, recursive: bool) -> None: +def schedule_tricks(observer: BaseObserver, tricks: list[dict], pathname: str, *, recursive: bool) -> None: """Schedules tricks with the specified observer and for the given watch path.