diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-08-15 11:08:26 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-04 16:29:30 -0400 |
commit | e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca (patch) | |
tree | 83ed77c6e7372b73fc7f84cb326fd95808335be8 /mesonbuild/mtest.py | |
parent | 2d65472c725f18b343aee00bf91b9ac98c08b95f (diff) | |
download | meson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.zip meson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.tar.gz meson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.tar.bz2 |
various python neatness cleanups
All changes were created by running
"pyupgrade --py3-only"
and committing the results. Although this has been performed in the
past, newer versions of pyupgrade can automatically catch more
opportunities, notably list comprehensions can use generators instead,
in the following cases:
- unpacking into function arguments as function(*generator)
- unpacking into assignments of the form x, y = generator
- as the argument to some builtin functions such as min/max/sorted
Also catch a few creeping cases of new code added using older styles.
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r-- | mesonbuild/mtest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index fd175ba..f877ec8 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -1660,7 +1660,7 @@ class TestHarness: # wrapper script. sys.exit(125) - self.name_max_len = max([uniwidth(self.get_pretty_suite(test)) for test in tests]) + self.name_max_len = max(uniwidth(self.get_pretty_suite(test)) for test in tests) startdir = os.getcwd() try: os.chdir(self.options.wd) @@ -1668,8 +1668,8 @@ class TestHarness: for i in range(self.options.repeat): runners.extend(self.get_test_runner(test) for test in tests) if i == 0: - self.duration_max_len = max([len(str(int(runner.timeout or 99))) - for runner in runners]) + self.duration_max_len = max(len(str(int(runner.timeout or 99))) + for runner in runners) # Disable the progress report if it gets in the way self.need_console = any(runner.console_mode is not ConsoleUser.LOGGER for runner in runners) |