diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-06-27 15:35:45 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-29 17:19:14 +0200 |
commit | 9e4b146941a9a31d952b19cfcf016f248882a826 (patch) | |
tree | d5be705912d9e05c7f6b90b3dd4fc0bc319d83ec /test/utils/run_test_server.py | |
parent | 0d8aeb4655446d05ecbb3fc3336ebe02741e91bf (diff) | |
download | justbuild-9e4b146941a9a31d952b19cfcf016f248882a826.tar.gz |
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.
Diffstat (limited to 'test/utils/run_test_server.py')
-rw-r--r-- | test/utils/run_test_server.py | 4 |
1 files changed, 3 insertions, 1 deletions
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() |