From 0c834e99bdef246dcfb13a83a457d8c1cad07400 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 29 Mar 2023 10:15:10 -0400 Subject: [PATCH] src/pybind: fix type annotations for signal handler function This change makes this file pass mypy checking on mypy 0.981. Signed-off-by: John Mulligan (cherry picked from commit 3035ca6c52168245dcc2104ef58615948697e740) --- src/pybind/ceph_daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/ceph_daemon.py b/src/pybind/ceph_daemon.py index f15af91e8ae25..0a70e92bc93a2 100644 --- a/src/pybind/ceph_daemon.py +++ b/src/pybind/ceph_daemon.py @@ -22,7 +22,7 @@ from prettytable import PrettyTable, HEADER from signal import signal, Signals, SIGWINCH from termios import TIOCGWINSZ from types import FrameType -from typing import Any, Callable, Dict, List, Optional, Sequence, TextIO, Tuple +from typing import Any, Callable, Dict, List, Optional, Sequence, TextIO, Tuple, Union from ceph_argparse import parse_json_funcsigs, validate_command @@ -367,8 +367,8 @@ class DaemonWatcher(object): raise RuntimeError("no stats selected by filters") def _handle_sigwinch(self, - signo: Signals, - frame: FrameType) -> None: + signo: Union[int, Signals], + frame: Optional[FrameType]) -> None: self.termsize.update() def run(self, -- 2.39.5