diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-10 15:38:18 -0700 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-09-30 21:01:38 +0200 |
commit | 16986f1853673776f76ff97acb5d8b5b9f02a788 (patch) | |
tree | 984bcd9cd8a3282e9f98d92974218ff74ce8576e | |
parent | 0f6d6c914a8a5c596a11c019d9bb900ac9aceeee (diff) | |
download | meson-16986f1853673776f76ff97acb5d8b5b9f02a788.zip meson-16986f1853673776f76ff97acb5d8b5b9f02a788.tar.gz meson-16986f1853673776f76ff97acb5d8b5b9f02a788.tar.bz2 |
interpreter: DEPFILE_KW should be Optional[str]
-rw-r--r-- | mesonbuild/interpreter/kwargs.py | 2 | ||||
-rw-r--r-- | mesonbuild/interpreter/type_checking.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 69706bc..4281ee4 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -88,7 +88,7 @@ class FuncGenerator(TypedDict): arguments: T.List[str] output: T.List[str] - depfile: bool + depfile: T.Optional[str] capture: bool depends: T.List[T.Union[build.BuildTarget, build.CustomTarget]] diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 3c4c3f0..d855954 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -178,8 +178,8 @@ ENV_KW: KwargInfo[T.Union[EnvironmentVariables, T.List, T.Dict, str, None]] = Kw convertor=_env_convertor, ) -DEPFILE_KW = KwargInfo( +DEPFILE_KW: KwargInfo[T.Optional[str]] = KwargInfo( 'depfile', - str, + (str, type(None)), validator=lambda x: 'Depfile must be a plain filename with a subdirectory' if has_path_sep(x) else None ) |