From d06cc042eb21bc16a4a5cc957a3615e5e3a9743a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 8 Jul 2021 00:06:10 -0400 Subject: f-strings --- mesonbuild/minit.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mesonbuild/minit.py') 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 -- cgit v1.1