diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-01-19 12:42:25 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-01-28 15:53:20 -0500 |
commit | 11f96380351a88059ec55f1070fdebc1b1033117 (patch) | |
tree | 3577f52920c3e2159f193605a894cb090b95ec10 /mesonbuild/interpreter/kwargs.py | |
parent | b402817fb6f0392812bfa272bdbc05c9c30139fa (diff) | |
download | meson-11f96380351a88059ec55f1070fdebc1b1033117.zip meson-11f96380351a88059ec55f1070fdebc1b1033117.tar.gz meson-11f96380351a88059ec55f1070fdebc1b1033117.tar.bz2 |
build: replace kwargs in CustomTarget initializer
Because we don't want to pass the Interpreter kwargs into the build
layer. This turned out to be a mega commit, as there's really on elegant
way to make this change in an incremental way. On the nice side, mypy
made this change super easy, as nearly all of the calls to
`CustomTarget` are fully type checked!
It also turns out that we're not handling install_tags in custom_target
correctly, since we're not converting the boolean values into Optional
values!
Diffstat (limited to 'mesonbuild/interpreter/kwargs.py')
-rw-r--r-- | mesonbuild/interpreter/kwargs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py index 99c54c1..b97fe05 100644 --- a/mesonbuild/interpreter/kwargs.py +++ b/mesonbuild/interpreter/kwargs.py @@ -167,8 +167,8 @@ class RunTarget(TypedDict): class CustomTarget(TypedDict): build_always: bool - build_always_stale: bool - build_by_default: bool + build_always_stale: T.Optional[bool] + build_by_default: T.Optional[bool] capture: bool command: T.List[T.Union[str, build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, ExternalProgram, File]] @@ -183,7 +183,7 @@ class CustomTarget(TypedDict): install: bool install_dir: T.List[T.Union[str, bool]] install_mode: FileMode - install_tag: T.List[T.Union[str, bool]] + install_tag: T.List[T.Optional[str]] output: T.List[str] override_options: T.Dict[OptionKey, str] |