python: Accept Optional[FrameType] in signal handlers.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-12-22 21:53:42 -08:00
committed by Tim Abbott
parent 7a9074ecfd
commit 702ce071f4
3 changed files with 9 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import subprocess
import sys
import time
import types
from typing import Optional
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
@@ -22,7 +23,7 @@ def check_worker_launch(run_dev: "subprocess.Popen[str]") -> bool:
failed = False
i = 0
def on_timer(signum: int, frame: types.FrameType) -> None:
def on_timer(signum: int, frame: Optional[types.FrameType]) -> None:
nonlocal failed, i
sys.stdout.write(".")
sys.stdout.flush()