diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34e0a173..e08a258f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.5 + rev: v0.6.8 hooks: - id: ruff name: ruff unused imports diff --git a/requirements.txt b/requirements.txt index f29cbfef..07e2f647 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,8 +7,9 @@ # Packages for source formatting # ----------------------------------------------------------------------------- pre-commit == 3.8.0 -ruff == 0.6.5 -autotyping == 24.3.0 +ruff == 0.6.8 +autotyping == 24.9.0 # ----------------------------------------------------------------------------- # Packages for other developement tasks # ----------------------------------------------------------------------------- +pur == 7.3.2 diff --git a/requirements_setup.txt b/requirements_setup.txt index bfdb08fe..c11319b9 100644 --- a/requirements_setup.txt +++ b/requirements_setup.txt @@ -1,8 +1,8 @@ -aiohttp == 3.10.5 +aiohttp == 3.10.8 pydantic == 2.9.2 msgspec == 0.18.6 bidict == 0.23.1 -watchdog == 5.0.2 +watchdog == 5.0.3 ujson == 5.10.0 aiomqtt == 2.3.0 diff --git a/run/conf_testing/lib/HABAppTests/test_rule/_rest_patcher.py b/run/conf_testing/lib/HABAppTests/test_rule/_rest_patcher.py index 1e13058b..06077def 100644 --- a/run/conf_testing/lib/HABAppTests/test_rule/_rest_patcher.py +++ b/run/conf_testing/lib/HABAppTests/test_rule/_rest_patcher.py @@ -3,7 +3,7 @@ import pprint from types import TracebackType -from pytest import MonkeyPatch +from pytest import MonkeyPatch # noqa: PT013 import HABApp.openhab.connection.handler import HABApp.openhab.connection.handler.func_async @@ -11,7 +11,7 @@ from HABApp.config import CONFIG -def shorten_url(url: str): +def shorten_url(url: str) -> str: url = str(url) cfg = CONFIG.openhab.connection.url if url.startswith(cfg): diff --git a/src/HABApp/__version__.py b/src/HABApp/__version__.py index 8d251b60..f974b40d 100644 --- a/src/HABApp/__version__.py +++ b/src/HABApp/__version__.py @@ -10,4 +10,4 @@ # Development versions contain the DEV-COUNTER postfix: # - 24.01.0.DEV-1 -__version__ = '24.09.0.DEV-4' +__version__ = '24.09.0.DEV-5' diff --git a/src/HABApp/core/files/watcher/base_watcher.py b/src/HABApp/core/files/watcher/base_watcher.py index f91bceb9..bc449b4f 100644 --- a/src/HABApp/core/files/watcher/base_watcher.py +++ b/src/HABApp/core/files/watcher/base_watcher.py @@ -2,6 +2,7 @@ from pathlib import Path from watchdog.events import EVENT_TYPE_CLOSED as WD_EVENT_TYPE_CLOSED +from watchdog.events import EVENT_TYPE_CLOSED_NO_WRITE as WD_EVENT_TYPE_CLOSED_NO_WRITE from watchdog.events import EVENT_TYPE_OPENED as WD_EVENT_TYPE_OPENED from watchdog.events import FileSystemEvent @@ -44,7 +45,7 @@ def dispatch(self, event: FileSystemEvent): return None # we don't process open and close events - if (e_type := event.event_type) == WD_EVENT_TYPE_OPENED or e_type == WD_EVENT_TYPE_CLOSED: + if event.event_type in (WD_EVENT_TYPE_OPENED, WD_EVENT_TYPE_CLOSED, WD_EVENT_TYPE_CLOSED_NO_WRITE): return None src = event.src_path diff --git a/src/HABApp/rule/interfaces/__init__.py b/src/HABApp/rule/interfaces/__init__.py index 82c3f30d..c833d0df 100644 --- a/src/HABApp/rule/interfaces/__init__.py +++ b/src/HABApp/rule/interfaces/__init__.py @@ -1,2 +1,2 @@ -from HABApp.rule.interfaces import http_interface as http +from HABApp.rule.interfaces import interface_http as http from .rule_subprocess import async_subprocess_exec, FinishedProcessInfo diff --git a/src/HABApp/rule/interfaces/http_interface.py b/src/HABApp/rule/interfaces/interface_http.py similarity index 100% rename from src/HABApp/rule/interfaces/http_interface.py rename to src/HABApp/rule/interfaces/interface_http.py