diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_formatting.py | 2 | ||||
-rwxr-xr-x | scripts/serd_bench.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/check_formatting.py b/scripts/check_formatting.py index e3342603..27daebe5 100755 --- a/scripts/check_formatting.py +++ b/scripts/check_formatting.py @@ -20,7 +20,7 @@ def run_formatter(command, good_path): """Run the formatter and compare the output.""" with subprocess.Popen( - command, stderr=DEVNULL, stdout=PIPE, encoding="utf-8" + command, encoding="utf-8", stderr=DEVNULL, stdout=PIPE ) as proc: out = list(proc.stdout) diff --git a/scripts/serd_bench.py b/scripts/serd_bench.py index e342976b..8e176322 100755 --- a/scripts/serd_bench.py +++ b/scripts/serd_bench.py @@ -3,7 +3,7 @@ # Copyright 2018-2023 David Robillard <d@drobilla.net> # SPDX-License-Identifier: ISC -""""Benchmark RDF reading and writing commands.""" +"""Benchmark RDF reading and writing commands.""" # pylint: disable=consider-using-f-string # pylint: disable=consider-using-with @@ -192,10 +192,13 @@ def run(progs, n_min, n_max, step): with open(filename(n) + ".out", "w") as out: sys.stderr.write(cmd + "\n") proc = subprocess.Popen( - cmd.split(), stdout=out, stderr=subprocess.PIPE + cmd.split(), + encoding="utf-8", + stdout=out, + stderr=subprocess.PIPE, ) - time, memory = parse_time(proc.communicate()[1].decode()) + time, memory = parse_time(proc.communicate()[1]) rows["time"] += ["%.07f" % time] rows["throughput"] += ["%d" % (n / time)] rows["memory"] += [str(memory)] |