diff options
| author | Tristan Partin <tristan@partin.io> | 2023-07-12 18:17:08 -0500 |
|---|---|---|
| committer | Tristan Partin <tristan@partin.io> | 2023-07-12 18:56:06 -0500 |
| commit | 020692b9d9496d98703dd8685c80a71cdab9d862 (patch) | |
| tree | 3d0e8ef5e073ebd90654bbbe5937df5b40e028e4 /mesonbuild/utils | |
| parent | 24edddb412dfa6cbf48d1c31b73d4d4903aa0fa0 (diff) | |
| download | meson-020692b9d9496d98703dd8685c80a71cdab9d862.tar.gz | |
Use underscore for variables that we don't reference
This pleases pyright/pylance and is a pattern that we use in other
portions of the code.
Diffstat (limited to 'mesonbuild/utils')
| -rw-r--r-- | mesonbuild/utils/universal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index f4c37ad92..5db75eaf1 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1214,7 +1214,7 @@ def do_define(regex: T.Pattern[str], line: str, confdata: 'ConfigurationData', define_value: T.List[str] = [] for token in arr[2:]: try: - (v, desc) = confdata.get(token) + v, _ = confdata.get(token) define_value += [str(v)] except KeyError: define_value += [token] @@ -1230,7 +1230,7 @@ def do_define(regex: T.Pattern[str], line: str, confdata: 'ConfigurationData', varname = arr[1] try: - (v, desc) = confdata.get(varname) + v, _ = confdata.get(varname) except KeyError: return '/* #undef %s */\n' % varname if isinstance(v, bool): @@ -1246,7 +1246,7 @@ def do_define(regex: T.Pattern[str], line: str, confdata: 'ConfigurationData', else: result = get_cmake_define(line, confdata) result = f'#define {varname} {result}\n' - (result, missing_variable) = do_replacement(regex, result, variable_format, confdata) + result, _ = do_replacement(regex, result, variable_format, confdata) return result else: raise MesonException('#mesondefine argument "%s" is of unknown type.' % varname) |
