diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-10 11:37:24 -0700 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-08-20 18:57:19 +0200 |
commit | e938ffb763cc7c050cff990e2e3e9774c28c8862 (patch) | |
tree | d8747ca3082c298484bd70ad0979ac96d7c5518b | |
parent | c9e827a6a187bed146cb76d1dd398739d27dd183 (diff) | |
download | meson-e938ffb763cc7c050cff990e2e3e9774c28c8862.zip meson-e938ffb763cc7c050cff990e2e3e9774c28c8862.tar.gz meson-e938ffb763cc7c050cff990e2e3e9774c28c8862.tar.bz2 |
build: Add annotations to the CustomTargetIndex class
These are not complete, and are just enough for backends/backends.py
-rw-r--r-- | mesonbuild/build.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 9cba677..494b6ba 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2587,7 +2587,7 @@ class CustomTargetIndex(HoldableObject): def get_subdir(self) -> str: return self.target.get_subdir() - def get_filename(self): + def get_filename(self) -> str: return self.output def get_id(self): @@ -2602,10 +2602,9 @@ class CustomTargetIndex(HoldableObject): def get_link_dep_subdirs(self): return self.target.get_link_dep_subdirs() - def is_linkable_target(self): + def is_linkable_target(self) -> bool: suf = os.path.splitext(self.output)[-1] - if suf == '.a' or suf == '.dll' or suf == '.lib' or suf == '.so': - return True + return suf in {'.a', '.dll', '.lib', '.so'} def should_install(self) -> bool: return self.target.should_install() @@ -2613,7 +2612,7 @@ class CustomTargetIndex(HoldableObject): def is_internal(self) -> bool: return self.target.is_internal() - def extract_all_objects_recurse(self): + def extract_all_objects_recurse(self) -> T.List[T.Union[str, 'ExtractedObjects']]: return self.target.extract_all_objects_recurse() def get_custom_install_dir(self): |