From 6e36f8f6664c4a1c6a85b41f55995fb73c9d66a0 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 9 Mar 2022 10:48:41 -0800 Subject: [PATCH] build: fix annotations for BuildTarget.link*target which do not hold BuildTargets, they are `SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex` (whole doesn't accept `SharedLIbrary`) --- mesonbuild/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c07f7a33f..51419d126 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -749,8 +749,8 @@ class BuildTarget(Target): self.external_deps: T.List[dependencies.Dependency] = [] self.include_dirs: T.List['IncludeDirs'] = [] self.link_language = kwargs.get('link_language') - self.link_targets: T.List[T.Union['BuildTarget', 'CustomTarget', 'CustomTargetIndex']] = [] - self.link_whole_targets = [] + self.link_targets: T.List[T.Union[SharedLibrary, StaticLibrary, 'CustomTarget', 'CustomTargetIndex']] = [] + self.link_whole_targets: T.List[T.Union[StaticLibrary, CustomTarget, CustomTargetIndex]] = [] self.link_depends = [] self.added_deps = set() self.name_prefix_set = False