diff options
| -rwxr-xr-x | scripts/benchmark.py | 7 | ||||
| -rwxr-xr-x | scripts/generate-alt-random-writes.py | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | scripts/generate-emoji-variation-sequences.py | 0 | ||||
| -rwxr-xr-x | scripts/srgb.py | 1 |
4 files changed, 4 insertions, 8 deletions
diff --git a/scripts/benchmark.py b/scripts/benchmark.py index fe820d9b..8f161fbe 100755 --- a/scripts/benchmark.py +++ b/scripts/benchmark.py @@ -7,8 +7,7 @@ import statistics import struct import sys import termios - -from datetime import datetime +from datetime import UTC, datetime def main() -> None: @@ -30,9 +29,9 @@ def main() -> None: bench_bytes = f.read() for _ in range(args.iterations): - start = datetime.now() + start = datetime.now(tz=UTC) sys.stdout.buffer.write(bench_bytes) - stop = datetime.now() + stop = datetime.now(tz=UTC) times[f.name].append((stop - start).total_seconds()) diff --git a/scripts/generate-alt-random-writes.py b/scripts/generate-alt-random-writes.py index 7ad1460c..bebe4b0e 100755 --- a/scripts/generate-alt-random-writes.py +++ b/scripts/generate-alt-random-writes.py @@ -7,7 +7,6 @@ import signal import struct import sys import termios - from typing import Any @@ -50,7 +49,6 @@ def main() -> None: def dummy(*args: Any) -> None: """Need a handler installed for sigwait() to trigger.""" _ = args - pass signal.signal(signal.SIGWINCH, dummy) while True: @@ -90,7 +88,7 @@ def main() -> None: width = 8 * cols # PGO help binary hardcodes cell width to 8px if lines is None or cols is None or height is None or width is None: - raise Exception('could not get terminal width/height; use --rows and --cols') + raise ValueError('could not get terminal width/height; use --rows and --cols') assert lines > 0, f'{lines}' assert cols > 0, f'{cols}' diff --git a/scripts/generate-emoji-variation-sequences.py b/scripts/generate-emoji-variation-sequences.py index 57e881c7..57e881c7 100644..100755 --- a/scripts/generate-emoji-variation-sequences.py +++ b/scripts/generate-emoji-variation-sequences.py diff --git a/scripts/srgb.py b/scripts/srgb.py index a6aa0f4a..fb718bcf 100755 --- a/scripts/srgb.py +++ b/scripts/srgb.py @@ -3,7 +3,6 @@ import argparse import math - # Note: we use a pure gamma 2.2 function, rather than the piece-wise # sRGB transfer function, since that is what all compositors do. |
