diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-10 14:31:40 -0700 |
|---|---|---|
| committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-09-30 21:01:38 +0200 |
| commit | f9b14dc5702d171b2fa74f6aafa2e23c60625eff (patch) | |
| tree | bb2e1cc6007e3d190207246c70775a00a1857407 | |
| parent | c11eb869958462dff67a020e2835c193edba56a4 (diff) | |
| download | meson-f9b14dc5702d171b2fa74f6aafa2e23c60625eff.tar.gz | |
build: Add full type annotations to CommandBase
| -rw-r--r-- | mesonbuild/build.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 137198517..7f69f616e 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2231,9 +2231,10 @@ class CommandBase: dependencies: T.List[T.Union[BuildTarget, 'CustomTarget']] subproject: str - def flatten_command(self, cmd): + def flatten_command(self, cmd: T.Sequence[T.Union[str, File, programs.ExternalProgram, 'BuildTarget', 'CustomTarget', 'CustomTargetIndex']]) -> \ + T.List[T.Union[str, File, BuildTarget, 'CustomTarget']]: cmd = listify(cmd) - final_cmd = [] + final_cmd: T.List[T.Union[str, File, BuildTarget, 'CustomTarget']] = [] for c in cmd: if isinstance(c, str): final_cmd.append(c) |
