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 /unittests/datatests.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 'unittests/datatests.py')
-rw-r--r-- | unittests/datatests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/datatests.py b/unittests/datatests.py index 6f4f421..b82ff1c 100644 --- a/unittests/datatests.py +++ b/unittests/datatests.py @@ -145,8 +145,8 @@ class DataTests(unittest.TestCase): found_entries |= options self.assertEqual(found_entries, { - *[str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS], - *[str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS_PER_MACHINE], + *(str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS), + *(str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS_PER_MACHINE), }) # Check that `buildtype` table inside `Core options` matches how |