summaryrefslogtreecommitdiff
path: root/perf/bug397.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2021-05-03 01:40:05 +0300
committerGitHub <noreply@github.com>2021-05-02 15:40:05 -0700
commitdf79a6390f6d0531f6411f745d0ccd2c3d674883 (patch)
tree182575a9f279d791c9a3f724ed8373c750cb49bd /perf/bug397.py
parentbb73791b59f74b6621a87036c14a6be6a23e0e55 (diff)
downloadpython-coveragepy-git-df79a6390f6d0531f6411f745d0ccd2c3d674883.tar.gz
refactor: remove redundant Python 2 code (#1155)
* Remove Python 2 code * Upgrade Python syntax with pyupgrade * Upgrade Python syntax with pyupgrade --py3-plus * Upgrade Python syntax with pyupgrade --py36-plus * Remove unused imports
Diffstat (limited to 'perf/bug397.py')
-rw-r--r--perf/bug397.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/perf/bug397.py b/perf/bug397.py
index 390741e5..18c979b8 100644
--- a/perf/bug397.py
+++ b/perf/bug397.py
@@ -10,7 +10,6 @@ Run this file two ways under coverage and see that the times are the same:
Written by David MacIver as part of https://github.com/nedbat/coveragepy/issues/397
"""
-from __future__ import print_function
import sys
import random
@@ -52,4 +51,4 @@ if __name__ == '__main__':
for d in data:
hash_str(d)
timing.append(1000000 * (time.time() - start) / len(data))
- print("Runtime per example:", "%.2f +/- %.2f us" % (mean(timing), sd(timing)))
+ print("Runtime per example:", f"{mean(timing):.2f} +/- {sd(timing):.2f} us")