aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-05-04 10:16:41 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2021-05-19 23:28:17 +0300
commitf2ae92368a384cb3cc310f40c2cb43dec5979912 (patch)
tree41edc6154ada78fb48ae32bf7f9345b30581f481 /mesonbuild/modules
parent4ca9a16288f51cce99624a2ef595d879acdc02d8 (diff)
downloadmeson-f2ae92368a384cb3cc310f40c2cb43dec5979912.zip
meson-f2ae92368a384cb3cc310f40c2cb43dec5979912.tar.gz
meson-f2ae92368a384cb3cc310f40c2cb43dec5979912.tar.bz2
interpreter: Add docstring and fix types of source_strings_to_files
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/unstable_rust.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/unstable_rust.py b/mesonbuild/modules/unstable_rust.py
index 7ae12c4..1db6722 100644
--- a/mesonbuild/modules/unstable_rust.py
+++ b/mesonbuild/modules/unstable_rust.py
@@ -27,6 +27,7 @@ if T.TYPE_CHECKING:
from . import ModuleState
from ..interpreter import Interpreter
from ..programs import ExternalProgram
+ from ..interpreter.interpreter import SourceOutputs
class RustModule(ExtensionModule):
@@ -139,8 +140,8 @@ class RustModule(ExtensionModule):
The main thing this simplifies is the use of `include_directory`
objects, instead of having to pass a plethora of `-I` arguments.
"""
- header: T.Union[File, CustomTarget, GeneratedList, CustomTargetIndex]
- _deps: T.Sequence[T.Union[File, CustomTarget, GeneratedList, CustomTargetIndex]]
+ header: 'SourceOutputs'
+ _deps: T.Sequence['SourceOutputs']
try:
header, *_deps = unholder(self.interpreter.source_strings_to_files(listify(kwargs['input'])))
except KeyError:
@@ -158,7 +159,7 @@ class RustModule(ExtensionModule):
bind_args: T.List[str] = stringlistify(listify(kwargs.get('args', [])))
# Split File and Target dependencies to add pass to CustomTarget
- depends: T.List[BuildTarget] = []
+ depends: T.List[T.Union[GeneratedList, BuildTarget, CustomTargetIndex]] = []
depend_files: T.List[File] = []
for d in _deps:
if isinstance(d, File):