diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c680bf8..aaef3ae5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.6.0 with: - python-version: "3.12" + python-version: "3.13" - name: Install dependencies run: | sudo apt-get update @@ -28,7 +28,7 @@ jobs: pip install -e .[server] pip install -e .[test] - name: Lint/test with pre-commit - run: SKIP=no-commit-to-branch pre-commit run --all-files + run: PRE_COMMIT_LOG_LEVEL=DEBUG SKIP=no-commit-to-branch pre-commit run --all-files --verbose test: runs-on: ubuntu-latest diff --git a/matter_server/server/server.py b/matter_server/server/server.py index 7e04ff84..3c233044 100644 --- a/matter_server/server/server.py +++ b/matter_server/server/server.py @@ -84,6 +84,7 @@ async def _handle_ws(request: web.Request) -> web.WebSocketResponse: finally: clients.remove(connection) + @web.middleware async def _handle_shutdown(app: web.Application) -> None: # pylint: disable=unused-argument for client in set(clients): diff --git a/pyproject.toml b/pyproject.toml index 5cf20f72..6dcbc9d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,8 +54,9 @@ test = [ "pytest-asyncio==1.0.0", "pytest-aiohttp==1.1.0", "pytest-cov==6.2.1", - "ruff==0.12.0", + "ruff==0.12.2", "tomli==2.2.1", + "typing-extensions==4.14.0", ] [project.scripts] @@ -89,7 +90,7 @@ ignore_missing_imports = true no_implicit_optional = true no_implicit_reexport = true platform = "linux" -python_version = "3.11" +python_version = "3.12" strict_optional = true warn_incomplete_stub = true warn_no_return = true @@ -146,7 +147,7 @@ asyncio_mode = "auto" fix = true line-length = 88 show-fixes = true -target-version = "py311" +target-version = "py312" [tool.ruff.lint.pydocstyle] # Use Google-style docstrings.