jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/793850 )

Change subject: [flake8] use set comprehension instead of map
......................................................................

[flake8] use set comprehension instead of map

Bug: T308849
Change-Id: I877d21774112269d2fa3761fa9e4018e37c64037
---
M pywikibot/page/_links.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/page/_links.py b/pywikibot/page/_links.py
index 1594253..8c1a59e 100644
--- a/pywikibot/page/_links.py
+++ b/pywikibot/page/_links.py
@@ -819,8 +819,8 @@
         ignore = []
     # ensuring that illegal   and &#157, which have no known
     # values, don't get converted to chr(129), chr(141) or chr(157)
-    ignore = (set(map(lambda x: _ILLEGAL_HTML_ENTITIES_MAPPING.get(x, x),
-                      ignore)) | {129, 141, 157})
+    ignore = {_ILLEGAL_HTML_ENTITIES_MAPPING.get(x, x)
+              for x in ignore} | {129, 141, 157}

     def handle_entity(match):
         if textlib.isDisabled(match.string, match.start(), tags=exceptions):

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/793850
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I877d21774112269d2fa3761fa9e4018e37c64037
Gerrit-Change-Number: 793850
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to