jenkins-bot merged this change.

View Change

Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
[bugfix] Recognize more than one escape sequences

Change-Id: I0dfe6eac74bf66ba3827138c003ac38959b4b88d
---
M scripts/maintenance/diff_checker.py
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/maintenance/diff_checker.py b/scripts/maintenance/diff_checker.py
index 081236e..59d12b8 100644
--- a/scripts/maintenance/diff_checker.py
+++ b/scripts/maintenance/diff_checker.py
@@ -78,8 +78,7 @@
elif quote == "'":
if (
'r' not in match.group('prefix')
- and r'\'' in string
- and not string.endswith(r'\'')
+ and string.count(r'\'') - int(string.endswith(r'\''))
and '"' not in string
):
print_error(

To view, visit change 446227. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0dfe6eac74bf66ba3827138c003ac38959b4b88d
Gerrit-Change-Number: 446227
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot