rename a badly named KwargInfo

CT_OUTPUT_KW is the same OUTPUT_KW we use in lots of places. The most
distinctive thing about it is not that it's part of custom_target
(basically any other function that uses such a kwarg follows the same
rules due to using CustomTarget under the hood), but the fact that it
takes multiple outputs.
pull/10167/head
Eli Schwartz 3 years ago
parent e3d70d89b1
commit 52d01dbf38
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 6
      mesonbuild/interpreter/interpreter.py
  2. 2
      mesonbuild/interpreter/type_checking.py
  3. 6
      mesonbuild/modules/i18n.py

@ -57,7 +57,7 @@ from .type_checking import (
CT_BUILD_BY_DEFAULT, CT_BUILD_BY_DEFAULT,
CT_INPUT_KW, CT_INPUT_KW,
CT_INSTALL_DIR_KW, CT_INSTALL_DIR_KW,
CT_OUTPUT_KW, MULTI_OUTPUT_KW,
OUTPUT_KW, OUTPUT_KW,
DEFAULT_OPTIONS, DEFAULT_OPTIONS,
DEPENDS_KW, DEPENDS_KW,
@ -1761,7 +1761,7 @@ class Interpreter(InterpreterBase, HoldableObject):
@typed_kwargs( @typed_kwargs(
'vcs_tag', 'vcs_tag',
CT_INPUT_KW.evolve(required=True), CT_INPUT_KW.evolve(required=True),
CT_OUTPUT_KW, MULTI_OUTPUT_KW,
# Cannot use the COMMAND_KW because command is allowed to be empty # Cannot use the COMMAND_KW because command is allowed to be empty
KwargInfo( KwargInfo(
'command', 'command',
@ -1851,7 +1851,7 @@ class Interpreter(InterpreterBase, HoldableObject):
CT_INPUT_KW, CT_INPUT_KW,
CT_INSTALL_DIR_KW, CT_INSTALL_DIR_KW,
CT_INSTALL_TAG_KW, CT_INSTALL_TAG_KW,
CT_OUTPUT_KW, MULTI_OUTPUT_KW,
DEPENDS_KW, DEPENDS_KW,
DEPEND_FILES_KW, DEPEND_FILES_KW,
DEPFILE_KW, DEPFILE_KW,

@ -268,7 +268,7 @@ def _output_validator(outputs: T.List[str]) -> T.Optional[str]:
return None return None
CT_OUTPUT_KW: KwargInfo[T.List[str]] = KwargInfo( MULTI_OUTPUT_KW: KwargInfo[T.List[str]] = KwargInfo(
'output', 'output',
ContainerTypeInfo(list, str, allow_empty=False), ContainerTypeInfo(list, str, allow_empty=False),
listify=True, listify=True,

@ -20,7 +20,7 @@ from . import ExtensionModule, ModuleReturnValue
from .. import build from .. import build
from .. import mesonlib from .. import mesonlib
from .. import mlog from .. import mlog
from ..interpreter.type_checking import CT_BUILD_BY_DEFAULT, CT_INPUT_KW, CT_INSTALL_DIR_KW, CT_INSTALL_TAG_KW, CT_OUTPUT_KW, INSTALL_KW, NoneType, in_set_validator from ..interpreter.type_checking import CT_BUILD_BY_DEFAULT, CT_INPUT_KW, CT_INSTALL_DIR_KW, CT_INSTALL_TAG_KW, MULTI_OUTPUT_KW, INSTALL_KW, NoneType, in_set_validator
from ..interpreterbase import FeatureNew from ..interpreterbase import FeatureNew
from ..interpreterbase.decorators import ContainerTypeInfo, KwargInfo, noPosargs, typed_kwargs, typed_pos_args from ..interpreterbase.decorators import ContainerTypeInfo, KwargInfo, noPosargs, typed_kwargs, typed_pos_args
from ..scripts.gettext import read_linguas from ..scripts.gettext import read_linguas
@ -154,7 +154,7 @@ class I18nModule(ExtensionModule):
CT_INPUT_KW, CT_INPUT_KW,
CT_INSTALL_DIR_KW, CT_INSTALL_DIR_KW,
CT_INSTALL_TAG_KW, CT_INSTALL_TAG_KW,
CT_OUTPUT_KW, MULTI_OUTPUT_KW,
INSTALL_KW, INSTALL_KW,
_ARGS.evolve(since='0.51.0'), _ARGS.evolve(since='0.51.0'),
_DATA_DIRS.evolve(since='0.41.0'), _DATA_DIRS.evolve(since='0.41.0'),
@ -323,7 +323,7 @@ class I18nModule(ExtensionModule):
CT_INPUT_KW, CT_INPUT_KW,
CT_INSTALL_DIR_KW, CT_INSTALL_DIR_KW,
CT_INSTALL_TAG_KW, CT_INSTALL_TAG_KW,
CT_OUTPUT_KW, MULTI_OUTPUT_KW,
INSTALL_KW, INSTALL_KW,
_ARGS.evolve(), _ARGS.evolve(),
KwargInfo('its_files', ContainerTypeInfo(list, str)), KwargInfo('its_files', ContainerTypeInfo(list, str)),

Loading…
Cancel
Save