mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Enable pycodestyle W605 (invalid escape sequence).
The only changes visible at the AST level, checked using https://github.com/asottile/astpretty, are zerver/lib/test_fixtures.py: '\x1b\\[(1|0)m' ↦ '\\x1b\\[(1|0)m' '\\[[X| ]\\] (\\d+_.+)\n' ↦ '\\[[X| ]\\] (\\d+_.+)\\n' which is fine because re treats '\\x1b' and '\\n' the same way as '\x1b' and '\n'. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Tim Abbott
parent
7b8d3023f5
commit
037f696d26
@@ -120,7 +120,7 @@ def fix_emojis(content: str, base_url: str, emojiset: str) -> str:
|
||||
def make_emoji_img_elem(emoji_span_elem: CSSSelector) -> Dict[str, Any]:
|
||||
# Convert the emoji spans to img tags.
|
||||
classes = emoji_span_elem.get('class')
|
||||
match = re.search('emoji-(?P<emoji_code>\S+)', classes)
|
||||
match = re.search(r'emoji-(?P<emoji_code>\S+)', classes)
|
||||
# re.search is capable of returning None,
|
||||
# but since the parent function should only be called with a valid css element
|
||||
# we assert that it does not.
|
||||
|
||||
Reference in New Issue
Block a user