coredata: Remove get_builtin_option_description

Since the attribute is always accessible from a BuiltinOptions
instance we don't need a special function for this.
pull/4931/head
Dylan Baker 6 years ago
parent 6940848f0b
commit 1e5496d1ba
  1. 8
      mesonbuild/coredata.py

@ -666,12 +666,6 @@ def get_builtin_option_choices(optname):
else: else:
raise RuntimeError('Tried to get the supported values for an unknown builtin option \'%s\'.' % optname) raise RuntimeError('Tried to get the supported values for an unknown builtin option \'%s\'.' % optname)
def get_builtin_option_description(optname):
if optname in builtin_options:
return builtin_options[optname].description
else:
raise RuntimeError('Tried to get the description for an unknown builtin option \'%s\'.' % optname)
def get_builtin_option_default(optname, prefix=''): def get_builtin_option_default(optname, prefix=''):
if optname in builtin_options: if optname in builtin_options:
o = builtin_options[optname] o = builtin_options[optname]
@ -701,7 +695,7 @@ def add_builtin_argument(p, name):
c = get_builtin_option_choices(name) c = get_builtin_option_choices(name)
b = builtin.argparse_action() b = builtin.argparse_action()
h = get_builtin_option_description(name) h = builtin.description
if not b: if not b:
h = h.rstrip('.') + ' (default: %s).' % get_builtin_option_default(name) h = h.rstrip('.') + ' (default: %s).' % get_builtin_option_default(name)
else: else:

Loading…
Cancel
Save