diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
commit | 6a0fabc6472f49621260de215f128a31ae70219b (patch) | |
tree | 6a67908358a2c5e5baa215fe0201dfe213dd8a01 /mesonbuild/compilers/c.py | |
parent | 4340bf34faca7eed8076ba4c388fbe15355f2183 (diff) | |
download | meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.gz |
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 0a2d47890..759b9694b 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -58,7 +58,7 @@ class CCompiler(CLikeCompiler, Compiler): try: return C_FUNC_ATTRIBUTES[name] except KeyError: - raise MesonException('Unknown function attribute "{}"'.format(name)) + raise MesonException(f'Unknown function attribute "{name}"') language = 'c' @@ -474,7 +474,7 @@ class ClangClCCompiler(_ClangCStds, ClangClCompiler, VisualStudioLikeCCompilerMi key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key].value if std != "none": - return ['/clang:-std={}'.format(std)] + return [f'/clang:-std={std}'] return [] @@ -654,7 +654,7 @@ class CompCertCCompiler(CompCertCompiler, CCompiler): return ['-O0'] def get_output_args(self, target: str) -> T.List[str]: - return ['-o{}'.format(target)] + return [f'-o{target}'] def get_werror_args(self) -> T.List[str]: return ['-Werror'] |