From bb171c2dffd64724803c9a43d7b01e80c3a96064 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 13 Feb 2022 20:15:35 -0500 Subject: pyupgrade --py37-plus Some more old style code crept in again. Additionally, pyupgrade learned to catch more if/elsed code based on the python version, and delete it. --- mesonbuild/scripts/itstool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/scripts/itstool.py') diff --git a/mesonbuild/scripts/itstool.py b/mesonbuild/scripts/itstool.py index 72ac3e529..b23ad8a0b 100644 --- a/mesonbuild/scripts/itstool.py +++ b/mesonbuild/scripts/itstool.py @@ -40,10 +40,10 @@ def run_join(build_dir: str, itstool: str, its_files: T.List[str], mo_files: T.L locale_mo_files = [] for mo_file in mo_files: if not os.path.exists(mo_file): - print('Could not find mo file {}'.format(mo_file)) + print(f'Could not find mo file {mo_file}') return 1 if not mo_file.endswith('.mo'): - print('File is not a mo file: {}'.format(mo_file)) + print(f'File is not a mo file: {mo_file}') return 1 # determine locale of this mo file parts = mo_file.partition('LC_MESSAGES') -- cgit v1.3