From dd31891c1fd6d3b9c955e73bd80170242b6423e5 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 4 Jul 2021 17:51:42 -0400 Subject: more f-strings too complex to be caught by pyupgrade --- mesonbuild/compilers/cpp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index c267c0f..44155d1 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -110,12 +110,11 @@ class CPPCompiler(CLikeCompiler, Compiler): # Check if it's a class or a template if extra_args is None: extra_args = [] - fargs = {'prefix': prefix, 'header': hname, 'symbol': symbol} - t = '''{prefix} - #include <{header}> + t = f'''{prefix} + #include <{hname}> using {symbol}; int main(void) {{ return 0; }}''' - return self.compiles(t.format(**fargs), env, extra_args=extra_args, + return self.compiles(t, env, extra_args=extra_args, dependencies=dependencies) def _test_cpp_std_arg(self, cpp_std_value: str) -> bool: -- cgit v1.1