From 9fa545f3fa956b5ba58e49af1323990c69bcbf3b Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 25 Jul 2021 03:38:20 +0100 Subject: [PATCH] Typing fix mypy doesn't like adding attributes to functions, so I have used the described_operation decorator to add type hints to the functions. --- openflexure_microscope/api/default_extensions/zip_builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/default_extensions/zip_builder.py b/openflexure_microscope/api/default_extensions/zip_builder.py index 0885fc41..077988fc 100644 --- a/openflexure_microscope/api/default_extensions/zip_builder.py +++ b/openflexure_microscope/api/default_extensions/zip_builder.py @@ -10,7 +10,7 @@ from labthings import fields, find_component, update_action_progress from labthings.extensions import BaseExtension from labthings.schema import Schema, pre_dump from labthings.utilities import description_from_view -from labthings.views import ActionView, PropertyView, View +from labthings.views import ActionView, PropertyView, View, described_operation from openflexure_microscope.captures import CaptureObject from openflexure_microscope.microscope import Microscope @@ -188,6 +188,7 @@ class ZipGetterAPIView(View): ] responses = {404: {"description": "The session ID could not be found"}} + @described_operation def get(self, session_id): """ Download a particular capture collection ZIP file @@ -211,6 +212,7 @@ class ZipGetterAPIView(View): } } + @described_operation def delete(self, session_id): """ Close and delete a particular capture collection ZIP file