diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-10-05 09:27:53 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-11-01 12:24:25 -0700 |
commit | 6472f013a193c30038ce82d5c2d7155a2de49ad9 (patch) | |
tree | 387bb50261da801514bdd4cc6577521db13a1098 | |
parent | fec7b2c07f2e07979880e12555015113686f69a1 (diff) | |
download | meson-6472f013a193c30038ce82d5c2d7155a2de49ad9.zip meson-6472f013a193c30038ce82d5c2d7155a2de49ad9.tar.gz meson-6472f013a193c30038ce82d5c2d7155a2de49ad9.tar.bz2 |
build: Add type annotations for BuildTarget.include_dirs
The gnome module uses these, so to be able to fully type that we need
this.
-rw-r--r-- | mesonbuild/build.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index dd55fc6..6423a11 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -685,7 +685,7 @@ class BuildTarget(Target): self.compilers = OrderedDict() # type: OrderedDict[str, Compiler] self.objects: T.List[T.Union[str, 'File', 'ExtractedObjects']] = [] self.external_deps: T.List[dependencies.Dependency] = [] - self.include_dirs = [] + self.include_dirs: T.List['IncludeDirs'] = [] self.link_language = kwargs.get('link_language') self.link_targets: T.List[BuildTarget] = [] self.link_whole_targets = [] @@ -1276,7 +1276,7 @@ class BuildTarget(Target): def get_pch(self, language: str) -> T.List[str]: return self.pch.get(language, []) - def get_include_dirs(self): + def get_include_dirs(self) -> T.List['IncludeDirs']: return self.include_dirs def add_deps(self, deps): @@ -1423,8 +1423,8 @@ You probably should put it in link_with instead.''') raise MesonException(f'File {f} does not exist.') self.pch[language] = pchlist - def add_include_dirs(self, args, set_is_system: T.Optional[str] = None): - ids = [] + def add_include_dirs(self, args: T.Sequence['IncludeDirs'], set_is_system: T.Optional[str] = None) -> None: + ids: T.List['IncludeDirs'] = [] for a in args: if not isinstance(a, IncludeDirs): raise InvalidArguments('Include directory to be added is not an include directory object.') |