diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-04 13:52:33 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-04 15:02:20 -0700 |
commit | 1e5496d1ba949bdb9422e6c476014e079320f788 (patch) | |
tree | dadb372df93c8a5baa70f838b63ef00b4d061ccf /mesonbuild/coredata.py | |
parent | 6940848f0bc9820d8f32667e4d0f9b73b68d2003 (diff) | |
download | meson-1e5496d1ba949bdb9422e6c476014e079320f788.zip meson-1e5496d1ba949bdb9422e6c476014e079320f788.tar.gz meson-1e5496d1ba949bdb9422e6c476014e079320f788.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r-- | mesonbuild/coredata.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 180f7e5..9fa1317 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -666,12 +666,6 @@ def get_builtin_option_choices(optname): else: 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=''): if optname in builtin_options: o = builtin_options[optname] @@ -701,7 +695,7 @@ def add_builtin_argument(p, name): c = get_builtin_option_choices(name) b = builtin.argparse_action() - h = get_builtin_option_description(name) + h = builtin.description if not b: h = h.rstrip('.') + ' (default: %s).' % get_builtin_option_default(name) else: |