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_project_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'run_project_tests.py') diff --git a/run_project_tests.py b/run_project_tests.py index b6879eea6..b14e8172e 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1352,7 +1352,7 @@ if __name__ == '__main__': except UnicodeError: print(l.encode('ascii', errors='replace').decode(), '\n') for name, dirs, _ in all_tests: - dir_names = list(set(x.path.name for x in dirs)) + dir_names = list({x.path.name for x in dirs}) for k, g in itertools.groupby(dir_names, key=lambda x: x.split()[0]): tests = list(g) if len(tests) != 1: -- cgit v1.2.3