interpreter: fix mismatched type expectations

pull/10043/head
Dylan Baker 3 years ago
parent a760ef5b60
commit 643b3f227e
  1. 2
      mesonbuild/interpreter/interpreter.py
  2. 4
      mesonbuild/interpreter/interpreterobjects.py

@ -816,7 +816,7 @@ external dependencies (including libraries) must go to "dependencies".''')
return self.do_subproject(args[0], 'meson', kw)
def disabled_subproject(self, subp_name: str, disabled_feature: T.Optional[str] = None,
exception: T.Optional[mesonlib.MesonException] = None) -> SubprojectHolder:
exception: T.Optional[Exception] = None) -> SubprojectHolder:
sub = SubprojectHolder(NullSubprojectInterpreter(), os.path.join(self.subproject_dir, subp_name),
disabled_feature=disabled_feature, exception=exception)
self.subprojects[subp_name] = sub

@ -24,7 +24,7 @@ from ..interpreterbase import (
from ..interpreter.type_checking import NoneType, ENV_SEPARATOR_KW
from ..dependencies import Dependency, ExternalLibrary, InternalDependency
from ..programs import ExternalProgram
from ..mesonlib import HoldableObject, MesonException, OptionKey, listify, Popen_safe
from ..mesonlib import HoldableObject, OptionKey, listify, Popen_safe
import typing as T
@ -673,7 +673,7 @@ class SubprojectHolder(MesonInterpreterObject):
subdir: str,
warnings: int = 0,
disabled_feature: T.Optional[str] = None,
exception: T.Optional[MesonException] = None) -> None:
exception: T.Optional[Exception] = None) -> None:
super().__init__()
self.held_object = subinterpreter
self.warnings = warnings

Loading…
Cancel
Save