|
14 | 14 | import warnings
|
15 | 15 | from http.client import responses
|
16 | 16 | from logging import Logger
|
17 |
| -from typing import TYPE_CHECKING, Any, Awaitable, Sequence, cast |
| 17 | +from typing import TYPE_CHECKING, Any, Awaitable, Coroutine, Sequence, cast |
18 | 18 | from urllib.parse import urlparse
|
19 | 19 |
|
20 | 20 | import prometheus_client
|
@@ -1016,14 +1016,14 @@ def compute_etag(self) -> str | None:
|
1016 | 1016 | # access is allowed as this class is used to serve static assets on login page
|
1017 | 1017 | # TODO: create an allow-list of files used on login page and remove this decorator
|
1018 | 1018 | @allow_unauthenticated
|
1019 |
| - def get(self, *args, **kwargs) -> None: |
1020 |
| - return super().get(*args, **kwargs) |
| 1019 | + def get(self, path: str, include_body: bool = ...) -> Coroutine[Any, Any, None]: |
| 1020 | + return super().get(path, include_body) |
1021 | 1021 |
|
1022 | 1022 | # access is allowed as this class is used to serve static assets on login page
|
1023 | 1023 | # TODO: create an allow-list of files used on login page and remove this decorator
|
1024 | 1024 | @allow_unauthenticated
|
1025 |
| - def head(self, *args, **kwargs) -> None: |
1026 |
| - return super().head(*args, **kwargs) |
| 1025 | + def head(self, path: str) -> Awaitable[None]: |
| 1026 | + return super().head(path) |
1027 | 1027 |
|
1028 | 1028 | @classmethod
|
1029 | 1029 | def get_absolute_path(cls, roots: Sequence[str], path: str) -> str:
|
@@ -1170,12 +1170,12 @@ class PublicStaticFileHandler(web.StaticFileHandler):
|
1170 | 1170 | """Same as web.StaticFileHandler, but decorated to acknowledge that auth is not required."""
|
1171 | 1171 |
|
1172 | 1172 | @allow_unauthenticated
|
1173 |
| - def head(self, *args, **kwargs) -> None: |
1174 |
| - return super().head(*args, **kwargs) |
| 1173 | + def head(self, path: str) -> Awaitable[None]: |
| 1174 | + return super().head(path) |
1175 | 1175 |
|
1176 | 1176 | @allow_unauthenticated
|
1177 |
| - def get(self, *args, **kwargs) -> None: |
1178 |
| - return super().get(*args, **kwargs) |
| 1177 | + def get(self, path: str, include_body: bool = ...) -> Coroutine[Any, Any, None]: |
| 1178 | + return super().get(path, include_body) |
1179 | 1179 |
|
1180 | 1180 |
|
1181 | 1181 | # -----------------------------------------------------------------------------
|
|
0 commit comments