aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minit.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-07-08 00:06:10 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-10-04 16:29:32 -0400
commitd06cc042eb21bc16a4a5cc957a3615e5e3a9743a (patch)
tree0907391e3581d707770584f3416a87c0cea18f77 /mesonbuild/minit.py
parent47ae0b82f0483960fa7a3eabc68700b982688834 (diff)
downloadmeson-d06cc042eb21bc16a4a5cc957a3615e5e3a9743a.zip
meson-d06cc042eb21bc16a4a5cc957a3615e5e3a9743a.tar.gz
meson-d06cc042eb21bc16a4a5cc957a3615e5e3a9743a.tar.bz2
f-strings
Diffstat (limited to 'mesonbuild/minit.py')
-rw-r--r--mesonbuild/minit.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py
index 124e6c6..db4ab37 100644
--- a/mesonbuild/minit.py
+++ b/mesonbuild/minit.py
@@ -75,14 +75,12 @@ def autodetect_options(options: 'argparse.Namespace', sample: bool = False) -> N
if not options.name:
options.name = Path().resolve().stem
if not re.match('[a-zA-Z_][a-zA-Z0-9]*', options.name) and sample:
- raise SystemExit('Name of current directory "{}" is not usable as a sample project name.\n'
- 'Specify a project name with --name.'.format(options.name))
- print('Using "{}" (name of current directory) as project name.'
- .format(options.name))
+ raise SystemExit(f'Name of current directory "{options.name}" is not usable as a sample project name.\n'
+ 'Specify a project name with --name.')
+ print(f'Using "{options.name}" (name of current directory) as project name.')
if not options.executable:
options.executable = options.name
- print('Using "{}" (project name) as name of executable to build.'
- .format(options.executable))
+ print(f'Using "{options.executable}" (project name) as name of executable to build.')
if sample:
# The rest of the autodetection is not applicable to generating sample projects.
return