From c60d26ffe90e0051e76098e510ecdc25ea09ee7f Mon Sep 17 00:00:00 2001 From: Tatarize Date: Mon, 8 Nov 2021 08:17:25 -0800 Subject: [PATCH] Fix Printf checker --- src/poboy.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/poboy.py b/src/poboy.py index 79d4e68..8fc2897 100644 --- a/src/poboy.py +++ b/src/poboy.py @@ -1086,16 +1086,15 @@ def message_classify(self, catalog, message): if msgid[-1] == " " or msgstr[-1] == " ": classes.append(catalog.warning_end_space) - if message.python_format: - p0 = list(PRINTF_RE.findall(msgid)) - p1 = list(PRINTF_RE.findall(msgstr)) - if len(p0) == len(p0): - for a, b in zip(p0,p1): - if a != b: - classes.append(catalog.error_printf) - break - else: - classes.append(catalog.error_printf) + p0 = list(PRINTF_RE.findall(msgid)) + p1 = list(PRINTF_RE.findall(msgstr)) + if len(p0) == len(p1): + for a, b in zip(p0,p1): + if a != b: + classes.append(catalog.error_printf) + break + else: + classes.append(catalog.error_printf) if msgid[0].isupper() != msgstr[0].isupper(): classes.append(catalog.warning_start_capital)