build: fix some type annotations for get_install_dir

pull/12057/merge
Dylan Baker 9 months ago
parent a35d4d368a
commit 477783a65b
  1. 5
      mesonbuild/build.py

@ -570,10 +570,11 @@ class Target(HoldableObject, metaclass=abc.ABCMeta):
def get_custom_install_dir(self) -> T.List[T.Union[str, Literal[False]]]:
raise NotImplementedError
def get_install_dir(self) -> T.Tuple[T.List[T.Union[str, Literal[False]]], str, Literal[False]]:
def get_install_dir(self) -> T.Tuple[T.List[T.Union[str, Literal[False]]], T.List[T.Optional[str]], bool]:
# Find the installation directory.
default_install_dir, default_install_dir_name = self.get_default_install_dir()
outdirs = self.get_custom_install_dir()
outdirs: T.List[T.Union[str, Literal[False]]] = self.get_custom_install_dir()
install_dir_names: T.List[T.Optional[str]]
if outdirs and outdirs[0] != default_install_dir and outdirs[0] is not True:
# Either the value is set to a non-default value, or is set to
# False (which means we want this specific output out of many

Loading…
Cancel
Save