From 4340bf34faca7eed8076ba4c388fbe15355f2183 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 4 Mar 2021 17:02:31 -0500 Subject: various python neatness cleanups All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes --- run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 1e01aa943..85434e40f 100755 --- a/run_tests.py +++ b/run_tests.py @@ -190,7 +190,7 @@ def find_vcxproj_with_target(builddir, target): for _, _, files in os.walk(builddir): for f in fnmatch.filter(files, '*.vcxproj'): f = os.path.join(builddir, f) - with open(f, 'r', encoding='utf-8') as o: + with open(f, encoding='utf-8') as o: if re.search(p, o.read(), flags=re.MULTILINE): return f raise RuntimeError('No vcxproj matching {!r} in {!r}'.format(p, builddir)) -- cgit v1.2.3