diff options
author | Sander Sweers <infirit@gmail.com> | 2018-03-04 19:22:50 +0100 |
---|---|---|
committer | Sander Sweers <infirit@gmail.com> | 2018-03-04 19:54:50 +0100 |
commit | f805f8e109f5a344b2edf2b62f66bd94aac31fc2 (patch) | |
tree | 47b0a77cb1abb1557ac18b2aabad57918e7e976f /mesonbuild/mconf.py | |
parent | 41b598382333b50a0d58cd9909e1d64daaedb348 (diff) | |
download | meson-f805f8e109f5a344b2edf2b62f66bd94aac31fc2.zip meson-f805f8e109f5a344b2edf2b62f66bd94aac31fc2.tar.gz meson-f805f8e109f5a344b2edf2b62f66bd94aac31fc2.tar.bz2 |
mconf: Replace usage of keys() on dicts with direct call by sorted
Calling sorted or list on a dictionary will return the keys.
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r-- | mesonbuild/mconf.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 65a4708..8a78f3d 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -140,7 +140,7 @@ class Conf: 'choices': coredata.get_builtin_option_choices(key)}) self.print_aligned(carr) print('') - bekeys = sorted(self.coredata.backend_options.keys()) + bekeys = sorted(self.coredata.backend_options) if not bekeys: print(' No backend options\n') else: @@ -151,7 +151,7 @@ class Conf: self.print_aligned(bearr) print('') print('Base options:') - okeys = sorted(self.coredata.base_options.keys()) + okeys = sorted(self.coredata.base_options) if not okeys: print(' No base options\n') else: @@ -170,7 +170,7 @@ class Conf: print(' ' + lang + '_link_args', str(args)) print('') print('Compiler options:') - okeys = sorted(self.coredata.compiler_options.keys()) + okeys = sorted(self.coredata.compiler_options) if not okeys: print(' No compiler options\n') else: @@ -207,8 +207,7 @@ class Conf: print(' This project does not have any options') else: options = self.coredata.user_options - keys = list(options.keys()) - keys.sort() + keys = sorted(options) optarr = [] for key in keys: opt = options[key] |