aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-08-28 18:00:50 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-09-08 20:15:55 +0200
commit3489442848c84c05ce0fb8a696d3b5ae0e46daaa (patch)
tree5f30565dd585841cae06726b93d3c41548f2e288 /mesonbuild/ast/introspection.py
parent9c1e72202de8015e16a4ba2ccf8ea50c10f474f7 (diff)
downloadmeson-3489442848c84c05ce0fb8a696d3b5ae0e46daaa.zip
meson-3489442848c84c05ce0fb8a696d3b5ae0e46daaa.tar.gz
meson-3489442848c84c05ce0fb8a696d3b5ae0e46daaa.tar.bz2
typing: completely type ast
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r--mesonbuild/ast/introspection.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index 6e6927f..73cd422 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -21,7 +21,7 @@ from .. import compilers, environment, mesonlib, optinterpreter
from .. import coredata as cdata
from ..mesonlib import MachineChoice
from ..interpreterbase import InvalidArguments, TYPE_nvar
-from ..build import Executable, Jar, SharedLibrary, SharedModule, StaticLibrary
+from ..build import BuildTarget, Executable, Jar, SharedLibrary, SharedModule, StaticLibrary
from ..mparser import BaseNode, ArithmeticNode, ArrayNode, ElementaryNode, IdNode, FunctionNode, StringNode
import typing as T
import os
@@ -173,7 +173,7 @@ class IntrospectionInterpreter(AstInterpreter):
'node': node
}]
- def build_target(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs_raw: T.Dict[str, TYPE_nvar], targetclass) -> T.Optional[T.Dict[str, T.Any]]:
+ def build_target(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs_raw: T.Dict[str, TYPE_nvar], targetclass: T.Type[BuildTarget]) -> T.Optional[T.Dict[str, T.Any]]:
args = self.flatten_args(args)
if not args or not isinstance(args[0], str):
return None
@@ -295,7 +295,7 @@ class IntrospectionInterpreter(AstInterpreter):
return None
def is_subproject(self) -> bool:
- return self.subproject != ''
+ return str(self.subproject) != ''
def analyze(self) -> None:
self.load_root_meson_file()