jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[flake8] use set comprehension instead of map

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

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 change 793850. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I877d21774112269d2fa3761fa9e4018e37c64037
Gerrit-Change-Number: 793850
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged