summaryrefslogtreecommitdiff
path: root/mesonbuild/optinterpreter.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-09-06 11:52:56 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2025-02-05 17:45:38 +0200
commit9fd5281befe7881c9d1210c9e6865382bc0f2b08 (patch)
tree45530ef9752f3537f23dd564f2fb6c657417fc0f /mesonbuild/optinterpreter.py
parent8eba69cbaaa6498ecb0a43fac64e81b7f764d572 (diff)
downloadmeson-9fd5281befe7881c9d1210c9e6865382bc0f2b08.tar.gz
options: Replace uses of `UserOption[T.Any]` with a Union of UserOption types
The fact that UserOption is generic is really an implementation detail, not something to be used publicly. So by having an `AnyOptionType` alias, we can get better type checking, as can be seen by the patch as a whole. One of the big fixes it replace open-coded equivlalents of `MutableKeydOptionDictType` with that type alias.
Diffstat (limited to 'mesonbuild/optinterpreter.py')
-rw-r--r--mesonbuild/optinterpreter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py
index 8c0d1daec..9f95925fa 100644
--- a/mesonbuild/optinterpreter.py
+++ b/mesonbuild/optinterpreter.py
@@ -69,7 +69,7 @@ class OptionInterpreter:
def __init__(self, optionstore: 'OptionStore', subproject: 'SubProject') -> None:
self.options: 'coredata.MutableKeyedOptionDictType' = {}
self.subproject = subproject
- self.option_types: T.Dict[str, T.Callable[..., options.UserOption]] = {
+ self.option_types: T.Dict[str, T.Callable[..., options.AnyOptionType]] = {
'string': self.string_parser,
'boolean': self.boolean_parser,
'combo': self.combo_parser,