diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-07-04 17:51:42 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-07-05 17:55:04 +0300 |
commit | dd31891c1fd6d3b9c955e73bd80170242b6423e5 (patch) | |
tree | b6bfd47a74e3ac4f71904afe2ba1996453ce221b /mesonbuild/interpreterbase/interpreterbase.py | |
parent | 566efba216b865bff670901aed98d34f09f8d930 (diff) | |
download | meson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.zip meson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.tar.gz meson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.tar.bz2 |
more f-strings too complex to be caught by pyupgrade
Diffstat (limited to 'mesonbuild/interpreterbase/interpreterbase.py')
-rw-r--r-- | mesonbuild/interpreterbase/interpreterbase.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/interpreterbase/interpreterbase.py b/mesonbuild/interpreterbase/interpreterbase.py index 91cb7aa..5204813 100644 --- a/mesonbuild/interpreterbase/interpreterbase.py +++ b/mesonbuild/interpreterbase/interpreterbase.py @@ -675,13 +675,13 @@ The result of this is undefined and will become a hard error in a future Meson r @staticmethod def _get_one_string_posarg(posargs: T.List[TYPE_var], method_name: str) -> str: if len(posargs) > 1: - m = '{}() must have zero or one arguments' - raise InterpreterException(m.format(method_name)) + m = f'{method_name}() must have zero or one arguments' + raise InterpreterException(m) elif len(posargs) == 1: s = posargs[0] if not isinstance(s, str): - m = '{}() argument must be a string' - raise InterpreterException(m.format(method_name)) + m = f'{method_name}() argument must be a string' + raise InterpreterException(m) return s return None @@ -820,8 +820,8 @@ The result of this is undefined and will become a hard error in a future Meson r return self.evaluate_statement(fallback) return fallback return obj[index] - m = 'Arrays do not have a method called {!r}.' - raise InterpreterException(m.format(method_name)) + m = f'Arrays do not have a method called {method_name!r}.' + raise InterpreterException(m) @builtinMethodNoKwargs def dict_method_call(self, |