diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-03 09:32:44 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-06-08 23:19:09 +0300 |
commit | c621ab22519ea8f0778a8907196feab619b93c47 (patch) | |
tree | 9acccb9590f4cd31196fec689fb95a1fd1f71a8a | |
parent | 629a9c68e26652dcd1649a46e7b2729404cb2b40 (diff) | |
download | meson-c621ab22519ea8f0778a8907196feab619b93c47.zip meson-c621ab22519ea8f0778a8907196feab619b93c47.tar.gz meson-c621ab22519ea8f0778a8907196feab619b93c47.tar.bz2 |
build: Fix type annotations for get_target_dependencies
-rw-r--r-- | mesonbuild/build.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index d80672e..5b6f5f0 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2486,13 +2486,14 @@ class CustomTarget(Target, CommandBase): repr_str = "<{0} {1}: {2}>" return repr_str.format(self.__class__.__name__, self.get_id(), self.command) - def get_target_dependencies(self) -> T.List[T.Union['BuildTarget', 'CustomTarget']]: - deps = self.dependencies[:] - deps += self.extra_depends + def get_target_dependencies(self) -> T.List[T.Union[SourceOutputs, str]]: + deps: T.List[T.Union[SourceOutputs, str]] = [] + deps.extend(self.dependencies) + deps.extend(self.extra_depends) for c in self.sources: if isinstance(c, (BuildTarget, CustomTarget)): deps.append(c) - if isinstance(c, CustomTargetIndex): + elif isinstance(c, CustomTargetIndex): deps.append(c.target) return deps |