diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 7aea22927..e97cc427d 100644 --- a/mesonbuild/build.py +++ b/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