summaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-02-02 18:02:17 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-10-03 08:53:12 -0700
commita9146b2517e34e59328bc5b9bbffae1f3407ec04 (patch)
tree17abe707fc6812d8ef542e39d68b51ac6e44120a /mesonbuild/backend
parentbeef43283c03f64111117a9b973c517dbf093847 (diff)
downloadmeson-a9146b2517e34e59328bc5b9bbffae1f3407ec04.tar.gz
backend: fix typing of get_target_dir_relative_to
Which should be `Target | CustomTargetIndex`, not just `Target`
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 45b1374e8..dabc4c10d 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -378,7 +378,10 @@ class Backend:
dirname = 'meson-out'
return dirname
- def get_target_dir_relative_to(self, t: build.Target, o: build.Target) -> str:
+ def get_target_dir_relative_to(self,
+ t: T.Union[build.Target, build.CustomTargetIndex],
+ o: T.Union[build.Target, build.CustomTargetIndex],
+ ) -> str:
'''Get a target dir relative to another target's directory'''
target_dir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(t))
othert_dir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(o))