diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-09-30 12:41:09 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-10-04 19:33:43 -0700 |
commit | 0f9ec8bc8819793dd46b053b11577a5718c1c50b (patch) | |
tree | 4cd8c50cdb1aec84e7e742bc8003c30abbfa43eb /mesonbuild/mesonlib | |
parent | c2d053674d8f0b2274d4c5d872f1aaf84cf31563 (diff) | |
download | meson-0f9ec8bc8819793dd46b053b11577a5718c1c50b.zip meson-0f9ec8bc8819793dd46b053b11577a5718c1c50b.tar.gz meson-0f9ec8bc8819793dd46b053b11577a5718c1c50b.tar.bz2 |
mesonlib: ConfigurationData can also be a `Dict[str, Tuple[Str, Optional[str]]]`
Diffstat (limited to 'mesonbuild/mesonlib')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index ec92990..a1ca677 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -1092,7 +1092,7 @@ def join_args(args: T.Iterable[str]) -> str: def do_replacement(regex: T.Pattern[str], line: str, variable_format: str, - confdata: 'ConfigurationData') -> T.Tuple[str, T.Set[str]]: + confdata: T.Union[T.Dict[str, T.Tuple[str, T.Optional[str]]], 'ConfigurationData']) -> T.Tuple[str, T.Set[str]]: missing_variables = set() # type: T.Set[str] if variable_format == 'cmake': start_tag = '${' @@ -1115,7 +1115,7 @@ def do_replacement(regex: T.Pattern[str], line: str, variable_format: str, varname = match.group(1) var_str = '' if varname in confdata: - (var, desc) = confdata.get(varname) + var, _ = confdata.get(varname) if isinstance(var, str): var_str = var elif isinstance(var, int): |