diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-26 09:04:37 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-18 21:33:19 +0300 |
| commit | e284c0d74240da15e7d62d3d530c69b224130be6 (patch) | |
| tree | 4d4540f5a73d8531df4d8d825f33907ed1e21508 /mesonbuild/environment.py | |
| parent | 723f402ff2afe594581df66ded71ff27b57c3d3d (diff) | |
| download | meson-e284c0d74240da15e7d62d3d530c69b224130be6.tar.gz | |
options: all inputs to OptionStore are OptionKeys
Thanks to several fixes applied between commit d37d649b0 ("Make all
Meson level options overridable per subproject.", 2025-02-13) and now,
OptionStore never gets a string key. Tighten the type of OptionDict,
and use it whenever possible.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/environment.py')
| -rw-r--r-- | mesonbuild/environment.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 2a9cf165b..2c3bdecf3 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -43,7 +43,7 @@ from mesonbuild import envconfig if T.TYPE_CHECKING: from .compilers import Compiler from .compilers.mixins.visualstudio import VisualStudioLikeCompiler - from .options import ElementaryOptionValues + from .options import OptionDict, ElementaryOptionValues from .wrap.wrap import Resolver from . import cargo @@ -646,12 +646,12 @@ class Environment: # # Note that order matters because of 'buildtype', if it is after # 'optimization' and 'debug' keys, it override them. - self.options: T.MutableMapping[OptionKey, ElementaryOptionValues] = collections.OrderedDict() + self.options: OptionDict = collections.OrderedDict() # Environment variables with the name converted into an OptionKey type. # These have subtly different behavior compared to machine files, so do # not store them in self.options. See _set_default_options_from_env. - self.env_opts: T.MutableMapping[OptionKey, ElementaryOptionValues] = {} + self.env_opts: OptionDict = {} self.machinestore = machinefile.MachineFileStore(self.coredata.config_files, self.coredata.cross_files, self.source_dir) |
