From 78625f543ca7a962fda686c07cbfbe9da5d4fc82 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 16:13:21 +0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1) - [github.com/pdm-project/pdm: 2.17.3 → 2.18.1](https://github.com/pdm-project/pdm/compare/2.17.3...2.18.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * resolve ASYNC009 reported by ruff --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: SoulMelody --- .pre-commit-config.yaml | 4 ++-- libresvip/gui/modules/notifier.py | 6 +++--- tests/conftest.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d54ca930..5040e33e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] @@ -19,7 +19,7 @@ repos: additional_dependencies: [proto-plus-stubs, types-parsimonious, types-pyyaml, types-ujson] - repo: https://github.com/pdm-project/pdm - rev: 2.17.3 + rev: 2.18.1 hooks: - id: pdm-lock-check args: ["-G", ":all"] diff --git a/libresvip/gui/modules/notifier.py b/libresvip/gui/modules/notifier.py index 99d398152..46b6e0aab 100644 --- a/libresvip/gui/modules/notifier.py +++ b/libresvip/gui/modules/notifier.py @@ -78,7 +78,7 @@ async def _check_for_updates(self) -> None: await self.notify_async( title=_("Checking for Updates"), message=_("Please wait..."), - timeout=self.request_timeout, + send_timeout=self.request_timeout, ) resp = await client.get( "https://api.github.com/repos/SoulMelody/LibreSVIP/releases/latest" @@ -201,7 +201,7 @@ async def notify_async( title: str, message: str, buttons: Sequence[Button] = (), - timeout: int = -1, + send_timeout: int = -1, ) -> Optional[Awaitable[Notification]]: try: if self.last_notify_time is None: @@ -210,7 +210,7 @@ async def notify_async( await asyncio.sleep(1 - elapsed) self.last_notify_time = time.time() return await self.notifier.send( - title=title, message=message, buttons=buttons, timeout=timeout + title=title, message=message, buttons=buttons, timeout=send_timeout ) except Exception as e: logger.exception(e) diff --git a/tests/conftest.py b/tests/conftest.py index 8d6673747..1bb860a6d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,12 @@ import pytest -@pytest.fixture() +@pytest.fixture def pinyin_example() -> list[str]: return ["山东菏泽", "曹县,", "牛pi", "666我滴", "宝贝儿!", "行-走-", "行-业-", "-"] -@pytest.fixture() +@pytest.fixture def _pretty_construct() -> None: from enum import IntEnum