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/modules/hotdoc.py | |
parent | 4340bf34faca7eed8076ba4c388fbe15355f2183 (diff) | |
download | meson-6a0fabc6472f49621260de215f128a31ae70219b.zip meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.gz meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.bz2 |
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
Diffstat (limited to 'mesonbuild/modules/hotdoc.py')
-rw-r--r-- | mesonbuild/modules/hotdoc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index eda411c..51da31c 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -100,7 +100,7 @@ class HotdocTargetBuilder: # When an option expects a single value, the unambiguous way # to specify it is with = if isinstance(value, str): - self.cmd.extend(['%s=%s' % (option, value)]) + self.cmd.extend([f'{option}={value}']) else: self.cmd.extend([option, value]) @@ -113,7 +113,7 @@ class HotdocTargetBuilder: valid_types = (str, bool, mesonlib.File, build.IncludeDirs, build.CustomTarget, build.BuildTarget) if not isinstance(value, valid_types): - raise InvalidArguments('Argument "%s=%s" should be of type: %s.' % ( + raise InvalidArguments('Argument "{}={}" should be of type: {}.'.format( arg, value, [t.__name__ for t in valid_types])) def process_extra_args(self): @@ -403,7 +403,7 @@ class HotDocModule(ExtensionModule): from hotdoc.run_hotdoc import run # noqa: F401 self.hotdoc.run_hotdoc = run except Exception as e: - raise MesonException('hotdoc %s required but not found. (%s)' % ( + raise MesonException('hotdoc {} required but not found. ({})'.format( MIN_HOTDOC_VERSION, e)) @noKwargs |