diff options
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 3 | ||||
-rw-r--r-- | mesonbuild/interpreter/type_checking.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index d591a49..b11a000 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -60,6 +60,7 @@ from .type_checking import ( DEPENDS_KW, DEPEND_FILES_KW, DEPFILE_KW, + DISABLER_KW, ENV_KW, INSTALL_KW, INSTALL_MODE_KW, @@ -570,7 +571,7 @@ class Interpreter(InterpreterBase, HoldableObject): @typed_kwargs( 'import', REQUIRED_KW.evolve(since='0.59.0'), - KwargInfo('disabler', bool, default=False, since='0.59.0'), + DISABLER_KW.evolve(since='0.59.0'), ) @disablerIfNotFound def func_import(self, node: mparser.BaseNode, args: T.Tuple[str], diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 50164ee..5391e9f 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -129,6 +129,8 @@ REQUIRED_KW: KwargInfo[T.Union[bool, UserFeatureOption]] = KwargInfo( # TODO: extract_required_kwarg could be converted to a convertor ) +DISABLER_KW: KwargInfo[bool] = KwargInfo('disabler', bool, default=False) + def _env_validator(value: T.Union[EnvironmentVariables, T.List['TYPE_var'], T.Dict[str, 'TYPE_var'], str, None]) -> T.Optional[str]: def _splitter(v: str) -> T.Optional[str]: split = v.split('=', 1) |