summaryrefslogtreecommitdiff
path: root/src/buildstream/_variables.pyi
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2020-08-29 10:22:49 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2020-08-30 15:36:34 +0000
commitdb537b1b23a0d52a764a1e03111a9ebdcc278fa4 (patch)
treeedc5acf5b05ead982888941c290e10a506377175 /src/buildstream/_variables.pyi
parent9c3d147a0267ebbe39e91ed7f638e2ed76494b51 (diff)
downloadbuildstream-db537b1b23a0d52a764a1e03111a9ebdcc278fa4.tar.gz
_variables.pyi: Add type annotations for _variables.pyx
This enables type checking from mypy on the cython module
Diffstat (limited to 'src/buildstream/_variables.pyi')
-rw-r--r--src/buildstream/_variables.pyi9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buildstream/_variables.pyi b/src/buildstream/_variables.pyi
new file mode 100644
index 000000000..1e2f47325
--- /dev/null
+++ b/src/buildstream/_variables.pyi
@@ -0,0 +1,9 @@
+from typing import Optional
+
+from .node import MappingNode, Node
+
+class Variables:
+ def __init__(self, node: MappingNode) -> None: ...
+ def check(self) -> None: ...
+ def expand(self, node: Node) -> None: ...
+ def get(self, name: str) -> Optional[str]: ...