jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Use set in Page.templatesWithParams

Set membership lookups are faster.

Change-Id: I6cf46fdfe6c8494857f38acc468fc4b90c03b56a
---
M pywikibot/page/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index a4605a0..31468ae 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -2429,7 +2429,7 @@
"""
# WARNING: may not return all templates used in particularly
# intricate cases such as template substitution
- titles = [t.title() for t in self.templates()]
+ titles = {t.title() for t in self.templates()}
templates = self.raw_extracted_templates
# backwards-compatibility: convert the dict returned as the second
# element into a list in the format used by old scripts

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I6cf46fdfe6c8494857f38acc468fc4b90c03b56a
Gerrit-Change-Number: 609295
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged