Skip to content

Commit

Permalink
fix new mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan200101 committed May 12, 2024
1 parent 0c8b686 commit 6845492
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mesonbuild/utils/universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 6845492

Please sign in to comment.