diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-09-06 11:52:56 -0700 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-05 17:45:38 +0200 |
| commit | 9fd5281befe7881c9d1210c9e6865382bc0f2b08 (patch) | |
| tree | 45530ef9752f3537f23dd564f2fb6c657417fc0f /mesonbuild/optinterpreter.py | |
| parent | 8eba69cbaaa6498ecb0a43fac64e81b7f764d572 (diff) | |
| download | meson-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.py | 2 |
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, |
