jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1323962?usp=email )

Change subject: checkimages: Simplify license exclusion
......................................................................

checkimages: Simplify license exclusion

Use set.discard() to exclude license-related tags without a redundant 
membership check.

Change-Id: I372644ceaa58794a54b0900c965ab29ede2793aa
---
M scripts/checkimages.py
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 7048490..ae781f9 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1119,8 +1119,7 @@
             no_licenses_to_skip = pywikibot.Category(self.site,
                                                      'License-related tags')
             for license_given in no_licenses_to_skip.articles():
-                if license_given in licenses:
-                    licenses.remove(license_given)
+                licenses.discard(license_given)

         # Add the licenses set in the default page as licenses to check
         if self.page_allowed:

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1323962?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: I372644ceaa58794a54b0900c965ab29ede2793aa
Gerrit-Change-Number: 1323962
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]

Reply via email to