summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-03-04 17:16:11 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-03-04 17:16:11 -0500
commit6a0fabc6472f49621260de215f128a31ae70219b (patch)
tree6a67908358a2c5e5baa215fe0201dfe213dd8a01 /mesonbuild/compilers/c.py
parent4340bf34faca7eed8076ba4c388fbe15355f2183 (diff)
downloadmeson-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.py6
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']