From 9e4b146941a9a31d952b19cfcf016f248882a826 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 27 Jun 2023 15:35:45 +0200 Subject: python: Add type hints and fix style in test scripts For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. --- test/utils/run_test_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/utils/run_test_server.py') diff --git a/test/utils/run_test_server.py b/test/utils/run_test_server.py index a23207fe..5d1450dd 100644 --- a/test/utils/run_test_server.py +++ b/test/utils/run_test_server.py @@ -18,11 +18,13 @@ import signal from http.server import SimpleHTTPRequestHandler as HTTPHandler from http.server import HTTPServer as HTTPServer +from typing import Any + httpd = None # handle interrupts gracefully, i.e., shutdown the server and exit -def RecvSig(*_) -> None: +def RecvSig(*_: Any) -> None: if not httpd is None: # cleanup httpd.server_close() -- cgit v1.2.3