diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-03-17 15:07:07 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-09-26 15:39:06 -0400 |
commit | fa254229b717d921c64f182cba33b30a10e19ace (patch) | |
tree | d70d40d520792353d44ac4ec0edfe9077b2fc882 /mesonbuild/mesonlib/universal.py | |
parent | 462759dd3319d47f4c09a63ee8dfc5deab7eef63 (diff) | |
download | meson-fa254229b717d921c64f182cba33b30a10e19ace.zip meson-fa254229b717d921c64f182cba33b30a10e19ace.tar.gz meson-fa254229b717d921c64f182cba33b30a10e19ace.tar.bz2 |
ninjabackend: Fix get_target_generated_sources() return type
Type annotation, documentation string, and implementation were doing 3
different things. Change implementation to match type annotation which
makes the most sense because it match what get_target_sources() does.
All callers only use keys from the returned dictionary any way, but
that's going to change in next commits.
Diffstat (limited to 'mesonbuild/mesonlib/universal.py')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index f5a69a6..bdf3d49 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -419,6 +419,11 @@ class File(HoldableObject): return File(True, subdir, fname) @staticmethod + def from_built_relative(relative: str) -> 'File': + dirpart, fnamepart = os.path.split(relative) + return File(True, dirpart, fnamepart) + + @staticmethod def from_absolute_file(fname: str) -> 'File': return File(False, '', fname) |