jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1328316?usp=email )
Change subject: checkimages: Reuse lowercased description
......................................................................
checkimages: Reuse lowercased description
Lower the image description once and reuse it across additional settings
searches.
Change-Id: I1c17f49f10d0333409b67a351ac22bcc7cfae361
---
M scripts/checkimages.py
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index ef979f7..adc7a83 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1369,6 +1369,7 @@
def find_additional_problems(self) -> None:
"""Extract additional settings from configuration page."""
+ image_check_text_lower = self.image_check_text.lower()
# In every tuple there's a setting configuration
for tupla in self.settings_data:
name = tupla[1]
@@ -1393,9 +1394,9 @@
for k in find_list:
if find_type.lower() == 'findonly':
search_results = re.findall(fr'{k.lower()}',
- self.image_check_text.lower())
+ image_check_text_lower)
if search_results \
- and search_results[0] == self.image_check_text.lower():
+ and search_results[0] == image_check_text_lower:
self.some_problem = True
self.text_used = text
self.head_used = head_2
@@ -1406,7 +1407,7 @@
break
elif find_type.lower() == 'find' \
and re.findall(fr'{k.lower()}',
- self.image_check_text.lower()):
+ image_check_text_lower):
self.some_problem = True
self.text_used = text
self.head_used = head_2
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1328316?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I1c17f49f10d0333409b67a351ac22bcc7cfae361
Gerrit-Change-Number: 1328316
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]