Clean up other Python files (#11379)

* Address issues found by ruff check.

* Make mypy happy; remove some Python 2 compat code.

* Also declare port1.
This commit is contained in:
Felix Fontein
2026-01-05 17:59:58 +01:00
committed by GitHub
parent 75234597bc
commit b3dc06a7dd
16 changed files with 52 additions and 47 deletions

View File

@@ -20,7 +20,7 @@ def main():
for line in sys.stdin:
seconds = time.time() - start
sys.stdout.write("%02d:%02d %s" % (seconds // 60, seconds % 60, line))
sys.stdout.write(f"{seconds // 60:02}:{seconds % 60:02} {line}")
sys.stdout.flush()