interpreter: DEPFILE_KW should be Optional[str]

pull/9329/head
Dylan Baker 3 years ago committed by Daniel Mensinger
parent 0f6d6c914a
commit 16986f1853
  1. 2
      mesonbuild/interpreter/kwargs.py
  2. 4
      mesonbuild/interpreter/type_checking.py

@ -88,7 +88,7 @@ class FuncGenerator(TypedDict):
arguments: T.List[str] arguments: T.List[str]
output: T.List[str] output: T.List[str]
depfile: bool depfile: T.Optional[str]
capture: bool capture: bool
depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]] depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]]

@ -178,8 +178,8 @@ ENV_KW: KwargInfo[T.Union[EnvironmentVariables, T.List, T.Dict, str, None]] = Kw
convertor=_env_convertor, convertor=_env_convertor,
) )
DEPFILE_KW = KwargInfo( DEPFILE_KW: KwargInfo[T.Optional[str]] = KwargInfo(
'depfile', 'depfile',
str, (str, type(None)),
validator=lambda x: 'Depfile must be a plain filename with a subdirectory' if has_path_sep(x) else None validator=lambda x: 'Depfile must be a plain filename with a subdirectory' if has_path_sep(x) else None
) )

Loading…
Cancel
Save