Fix mypy errors in Optuna 4.0+

This commit is contained in:
c-bata
2024-09-11 16:32:38 +09:00
parent 7d6b619212
commit 5a1d6365cd
4 changed files with 27 additions and 9 deletions
+5 -1
View File
@@ -10,6 +10,8 @@ from optuna_dashboard._storage import trials_last_fetched_at
if typing.TYPE_CHECKING:
from sys import _OptExcInfo
from _typeshed.wsgi import WSGIEnvironment
@@ -64,7 +66,9 @@ def send_request(
status: str = ""
response_headers: list[tuple[str, str]] = []
def start_response(status_: str, headers_: list[tuple[str, str]]) -> None:
def start_response(
status_: str, headers_: list[tuple[str, str]], exc_info: _OptExcInfo | None = None
) -> None:
nonlocal status, response_headers
status = status_
response_headers = headers_