mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
* chore: add pre-commit config * chore: fix pre-commit errors * chore: add black pre-commit hook * style: format python files with black * chore: add isort pre-commit hook * style: format python files using isort * chore: add pyupgrade pre-commit hook * refactor: upgrade code to python3.7 * Allow stacking PRs Co-authored-by: Julian Tölle <julian.toelle97@gmail.com> --------- Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
15 lines
325 B
Python
Executable file
15 lines
325 B
Python
Executable file
#!/usr/bin/env python3.7
|
|
|
|
|
|
import sys
|
|
import time
|
|
|
|
start = time.time()
|
|
|
|
sys.stdin.reconfigure(errors="surrogateescape")
|
|
sys.stdout.reconfigure(errors="surrogateescape")
|
|
|
|
for line in sys.stdin:
|
|
seconds = time.time() - start
|
|
sys.stdout.write("%02d:%02d %s" % (seconds // 60, seconds % 60, line))
|
|
sys.stdout.flush()
|