diff --git a/lightly/api/serve.py b/lightly/api/serve.py index 7dd1610df..08960efd3 100644 --- a/lightly/api/serve.py +++ b/lightly/api/serve.py @@ -10,7 +10,7 @@ def get_server( paths: Sequence[Path], host: str, port: int, -): +) -> ThreadingHTTPServer: """Returns an HTTP server that serves a local datasource. Args: @@ -42,7 +42,7 @@ def do_OPTIONS(self) -> None: self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS") self.end_headers() - def send_response_only(self, code, message=None): + def send_response_only(self, code: int, message: str | None = None) -> None: super().send_response_only(code, message) self.send_header( "Cache-Control", "no-store, must-revalidate, no-cache, max-age=-1" diff --git a/pyproject.toml b/pyproject.toml index 12363495f..405d16f07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -223,7 +223,6 @@ exclude = '''(?x)( lightly/api/api_workflow_download_dataset.py | lightly/api/bitmask.py | lightly/api/_version_checking.py | - lightly/api/serve.py | lightly/api/patch.py | lightly/api/swagger_api_client.py | lightly/api/api_workflow_collaboration.py |