From b428c19199853e0c6d41812e382268d18084aac6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:14:37 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v2.1.0 → v2.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v2.1.0...v2.3.0) - [github.com/astral-sh/ruff-pre-commit: v0.15.20 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.16.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 368571c..a6fcbfb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: # - id: no-commit-to-branch - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v2.1.0' + rev: 'v2.3.0' hooks: - id: mypy additional_dependencies: @@ -32,7 +32,7 @@ repos: - sqlalchemy - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.15.20' + rev: 'v0.16.0' hooks: - id: ruff args: [--fix] From 9f27325f1ad65307ea972b298cc8634acf1f8855 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:15:03 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/routers/tasktype.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routers/tasktype.py b/src/routers/tasktype.py index a1a4c5a..4e86369 100644 --- a/src/routers/tasktype.py +++ b/src/routers/tasktype.py @@ -22,9 +22,9 @@ router = APIRouter(prefix="/tasktype", tags=["tasks"]) -def _normalize_task_type(task_type: Row[Any]) -> dict[str, str | None | list[Any]]: +def _normalize_task_type(task_type: Row[Any]) -> dict[str, str | list[Any] | None]: # Task types may contain multi-line fields which have either \r\n or \n line endings - ttype: dict[str, str | None | list[Any]] = { + ttype: dict[str, str | list[Any] | None] = { k: str(v).replace("\r\n", "\n").strip() if v is not None else v for k, v in task_type._mapping.items() # noqa: SLF001 if k != "id" @@ -40,10 +40,10 @@ async def list_task_types( expdb: Annotated[AsyncSession, Depends(expdb_session)], ) -> dict[ Literal["task_types"], - dict[Literal["task_type"], list[dict[str, str | None | list[Any]]]], + dict[Literal["task_type"], list[dict[str, str | list[Any] | None]]], ]: """Return a high level description of all task types.""" - task_types: list[dict[str, str | None | list[Any]]] = [ + task_types: list[dict[str, str | list[Any] | None]] = [ _normalize_task_type(ttype) for ttype in await get_task_types(expdb) ] return {"task_types": {"task_type": task_types}} @@ -53,7 +53,7 @@ async def list_task_types( async def get_task_type( task_type_id: Identifier, expdb: Annotated[AsyncSession, Depends(expdb_session)], -) -> dict[Literal["task_type"], dict[str, str | None | list[str] | list[dict[str, str]]]]: +) -> dict[Literal["task_type"], dict[str, str | list[str] | list[dict[str, str]] | None]]: """Return a detailed description for the given task type, including expected inputs.""" task_type_record = await db_get_task_type(task_type_id, expdb) if task_type_record is None: