From a5205f0786b01b952c1b2a2441dd4fc8d1ac6208 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 5 Nov 2021 13:49:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Specify=20return=20type=20in=20s?= =?UTF-8?q?ophon.notebook=20custom=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/sophon/notebooks/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/sophon/notebooks/views.py b/backend/sophon/notebooks/views.py index e09db94..ff5d7ce 100644 --- a/backend/sophon/notebooks/views.py +++ b/backend/sophon/notebooks/views.py @@ -25,7 +25,7 @@ class NotebooksViewSet(SophonGroupViewSet, metaclass=abc.ABCMeta): return NoneSerializer @action(["PATCH"], detail=True) - def sync(self, request: Request, **kwargs): + def sync(self, request: Request, **kwargs) -> Response: """ Update the `Notebook`'s state. """ @@ -36,7 +36,7 @@ class NotebooksViewSet(SophonGroupViewSet, metaclass=abc.ABCMeta): return Response(serializer.data, status.HTTP_200_OK) @action(["PATCH"], detail=True) - def start(self, request: Request, **kwargs): + def start(self, request: Request, **kwargs) -> Response: """ Start the `Notebook`. """ @@ -47,7 +47,7 @@ class NotebooksViewSet(SophonGroupViewSet, metaclass=abc.ABCMeta): return Response(serializer.data, status.HTTP_200_OK) @action(["PATCH"], detail=True) - def lock(self, request: Request, **kwargs): + def lock(self, request: Request, **kwargs) -> Response: """ Lock the `Notebook`. @@ -62,7 +62,7 @@ class NotebooksViewSet(SophonGroupViewSet, metaclass=abc.ABCMeta): return Response(serializer.data, status.HTTP_200_OK) @action(["PATCH"], detail=True) - def unlock(self, request: Request, **kwargs): + def unlock(self, request: Request, **kwargs) -> Response: """ Unlock the `Notebook`. @@ -76,7 +76,7 @@ class NotebooksViewSet(SophonGroupViewSet, metaclass=abc.ABCMeta): return Response(serializer.data, status.HTTP_200_OK) @action(["PATCH"], detail=True) - def stop(self, request: Request, **kwargs): + def stop(self, request: Request, **kwargs) -> Response: """ Stop the `Notebook`. """