mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-12 12:40:33 +08:00
Fix mypy errors in Optuna 4.0+
This commit is contained in:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user