diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-03-03 09:56:05 -0800 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-03-04 12:52:57 -0500 |
| commit | a2007d031cf421fabc9158ce393ea7f1063d174d (patch) | |
| tree | 8a9c2ababafce486e5a2ff754ae935ed6aec7073 | |
| parent | 84f64b2378807837eecfdc42feb5ff83446433ff (diff) | |
| download | meson-a2007d031cf421fabc9158ce393ea7f1063d174d.tar.gz | |
options: remove get_option_from_meson_file
This is just a wrapper around `get_value_object_and_value_for`, doing
needless work of unpacking a tuple, then repacking it.
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 2 | ||||
| -rw-r--r-- | mesonbuild/options.py | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index c8c05f0bd..1ff6aa4b1 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1082,7 +1082,7 @@ class Interpreter(InterpreterBase, HoldableObject): try: optkey = options.OptionKey(optname, self.subproject) - value_object, value = self.coredata.optstore.get_option_from_meson_file(optkey) + value_object, value = self.coredata.optstore.get_value_object_and_value_for(optkey) except KeyError: if self.coredata.optstore.is_base_option(optkey): # Due to backwards compatibility return the default diff --git a/mesonbuild/options.py b/mesonbuild/options.py index f81683eca..4a4d40f22 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -1139,11 +1139,6 @@ class OptionStore: key = self.ensure_and_validate_key(key) return self.options[key] - def get_option_from_meson_file(self, key: OptionKey) -> T.Tuple[AnyOptionType, ElementaryOptionValues]: - assert isinstance(key, OptionKey) - (value_object, value) = self.get_value_object_and_value_for(key) - return (value_object, value) - def get_default_for_b_option(self, key: OptionKey) -> ElementaryOptionValues: assert self.is_base_option(key) from .compilers.compilers import BASE_OPTIONS |
