Skip to content

Commit

Permalink
mconf: Replace usage of keys() on dicts with direct call by sorted
Browse files Browse the repository at this point in the history
Calling sorted or list on a dictionary will return the keys.
  • Loading branch information
infirit committed Mar 4, 2018
1 parent 41b5983 commit f805f8e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mesonbuild/mconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def print_conf(self):
'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:
Expand All @@ -151,7 +151,7 @@ def print_conf(self):
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:
Expand All @@ -170,7 +170,7 @@ def print_conf(self):
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:
Expand Down Expand Up @@ -207,8 +207,7 @@ def print_conf(self):
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]
Expand Down

0 comments on commit f805f8e

Please sign in to comment.