jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/463249 )
Change subject: scripts/maintenance/diff_checker.py: Fix a bug in detecting "" as error ......................................................................
scripts/maintenance/diff_checker.py: Fix a bug in detecting "" as error
Single-quoted empty strings are preferred to double-quotes ones, but diff_checker did not detect such cases because the ending quotation marks were being detected as part of the starting quotation marks.
STRING_MATCH: Require at list one character after the starting quotation mark.
Change-Id: Id215527268c286d7f228dbef0e030a93843e9bdf --- M scripts/maintenance/diff_checker.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/maintenance/diff_checker.py b/scripts/maintenance/diff_checker.py index 608f501..1bc2727 100644 --- a/scripts/maintenance/diff_checker.py +++ b/scripts/maintenance/diff_checker.py @@ -46,7 +46,7 @@ IGNORABLE_LONG_LINE = re_compile(r'\s*(# )?<?https?://\S+>?$').match
STRING_MATCH = re_compile( - r'(?P<prefix>[bfru]*)?(?P<quote>'+|"+)', IGNORECASE, + r'(?P<prefix>[bfru]*)?(?P<quote>'+|"+).', IGNORECASE, ).match
pywikibot-commits@lists.wikimedia.org