summaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-04 19:56:42 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-10-29 18:59:30 +0200
commit9ca756ba04a94e321f2afc681c22bfbb7c63be15 (patch)
tree27ccd3dfcc03a948966c1e38f11e7c02ecc37619 /mesonbuild
parent795e7431ffafa0cc1257d64c5fdd0f2c3cb6d841 (diff)
downloadmeson-9ca756ba04a94e321f2afc681c22bfbb7c63be15.tar.gz
options: rename get_value_object_for
No need to focus on the "value" part of the name. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreterobjects.py2
-rw-r--r--mesonbuild/options.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py
index 697c4a0f0..1005fc273 100644
--- a/mesonbuild/interpreter/interpreterobjects.py
+++ b/mesonbuild/interpreter/interpreterobjects.py
@@ -113,7 +113,7 @@ class FeatureOptionHolder(ObjectHolder[options.UserFeatureOption]):
super().__init__(option, interpreter)
if option and option.is_auto():
# TODO: we need to cast here because options is not a TypedDict
- auto = T.cast('options.UserFeatureOption', self.env.coredata.optstore.get_value_object_for('auto_features'))
+ auto = T.cast('options.UserFeatureOption', self.env.coredata.optstore.resolve_option('auto_features'))
self.held_object = copy.copy(auto)
self.held_object.name = option.name
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index 9b7488800..a37573626 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -846,7 +846,7 @@ class OptionStore:
def __len__(self) -> int:
return len(self.options)
- def get_value_object_for(self, key: 'T.Union[OptionKey, str]') -> AnyOptionType:
+ def resolve_option(self, key: 'T.Union[OptionKey, str]') -> AnyOptionType:
key = self.ensure_and_validate_key(key)
potential = self.options.get(key, None)
if self.is_project_option(key):
@@ -866,7 +866,7 @@ class OptionStore:
def get_value_object_and_value_for(self, key: OptionKey) -> T.Tuple[AnyOptionType, ElementaryOptionValues]:
assert isinstance(key, OptionKey)
key = self.ensure_and_validate_key(key)
- vobject = self.get_value_object_for(key)
+ vobject = self.resolve_option(key)
computed_value = vobject.value
if key in self.augments:
assert key.subproject is not None
@@ -1035,7 +1035,7 @@ class OptionStore:
new_value = self.sanitize_dir_option_value(prefix, key, new_value)
try:
- opt = self.get_value_object_for(key)
+ opt = self.resolve_option(key)
except KeyError:
raise MesonException(f'Unknown option: "{error_key}".')