From 426c0a8974b5837eb744734e9f16bf68d6439b57 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:54:06 -0800 Subject: [PATCH 1/2] Chore: typing fixes --- src/documents/serialisers.py | 2 +- src/documents/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index e9fdf1202..e16ad76de 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -2927,7 +2927,7 @@ class WorkflowSerializer(serializers.ModelSerializer): return instance - def to_representation(self, instance): + def to_representation(self, instance: Workflow) -> dict[str, Any]: data = super().to_representation(instance) actions = instance.actions.order_by("order", "pk") data["actions"] = WorkflowActionSerializer( diff --git a/src/documents/views.py b/src/documents/views.py index 637e2ccaf..b2fd118e5 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -3022,7 +3022,7 @@ class SharedLinkView(View): return response -def serve_file(*, doc: Document, use_archive: bool, disposition: str): +def serve_file(*, doc: Document, use_archive: bool, disposition: str) -> HttpResponse: if use_archive: file_handle = doc.archive_file filename = doc.get_public_filename(archive=True) From eda0e61cec3f69b6adfe06594654c723f74f2917 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:56:59 -0800 Subject: [PATCH 2/2] Update mypy baseline --- .mypy-baseline.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/.mypy-baseline.txt b/.mypy-baseline.txt index 4177c691f..c2978e4c5 100644 --- a/.mypy-baseline.txt +++ b/.mypy-baseline.txt @@ -559,7 +559,6 @@ src/documents/serialisers.py:0: error: Function is missing a type annotation [n src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def] src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def] src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def] -src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def] src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def] src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def] src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def] @@ -1571,7 +1570,6 @@ src/documents/views.py:0: error: Function is missing a return type annotation [ src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def] src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def] src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def] -src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def] src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def] src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def] src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]