diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-06-27 16:08:22 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-29 18:12:12 +0200 |
commit | d501d86b5e974523e965d52001a5c185ce47be92 (patch) | |
tree | 6ef775ff9244e8f94a0184221baa31441e292e66 /tests/test_rules/test_runner.py | |
parent | 9fc4e4a122117a49c59cbbcecbf7aa892d301d0a (diff) | |
download | rules-cc-d501d86b5e974523e965d52001a5c185ce47be92.tar.gz |
python: Add type hints and fix style in rules-cc 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 'tests/test_rules/test_runner.py')
-rwxr-xr-x | tests/test_rules/test_runner.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_rules/test_runner.py b/tests/test_rules/test_runner.py index 976f041..6fd2d8c 100755 --- a/tests/test_rules/test_runner.py +++ b/tests/test_rules/test_runner.py @@ -18,14 +18,14 @@ import os import subprocess import time -time_start = time.time() -time_stop = 0 -result = "UNKNOWN" -stderr = "" -stdout = "" +time_start: float = time.time() +time_stop: float = 0 +result: str = "UNKNOWN" +stderr: str = "" +stdout: str = "" -def dump_results(): +def dump_results() -> None: with open("result", "w") as f: f.write("%s\n" % (result, )) with open("time-start", "w") as f: |