From 684549202be873fbf16c2bb73448ceda6cdaf4c9 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 12 May 2024 20:19:10 +0200 Subject: [PATCH] fix new mypy errors --- mesonbuild/utils/universal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index 904cbbcfe7d7..039b0d91e5f1 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1346,7 +1346,7 @@ def do_conf_str(src: str, data: T.List[str], confdata: 'ConfigurationData', raise MesonException('Invalid variable format') def do_conf_str_meson(src: str, data: T.List[str], confdata: 'ConfigurationData', subproject: T.Optional[SubProject] = None) -> T.Tuple[T.List[str], T.Set[str], bool]: - variable_format = "meson" + variable_format: Literal["meson"] = "meson" regex = get_variable_regex(variable_format) @@ -1372,10 +1372,10 @@ def do_conf_str_meson(src: str, data: T.List[str], confdata: 'ConfigurationData' return result, missing_variables, confdata_useless def do_conf_str_cmake(src: str, data: T.List[str], confdata: 'ConfigurationData', at_only: bool, subproject: T.Optional[SubProject] = None) -> T.Tuple[T.List[str], T.Set[str], bool]: + + variable_format: Literal["cmake", "cmake@"] = "cmake" if at_only: variable_format = "cmake@" - else: - variable_format = "cmake" regex = get_variable_regex(variable_format)