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 , 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):
pywikibot-commits@lists.wikimedia.org