mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
ruff: Fix UP007 Use X | Y for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e08a24e47f
commit
531b34cb4c
@@ -1,4 +1,4 @@
|
||||
from typing import Mapping, Union
|
||||
from typing import Mapping
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from django.utils.html import escape
|
||||
@@ -6,7 +6,7 @@ from django.utils.html import escape
|
||||
from zerver.lib.cache import cache_with_key, open_graph_description_cache_key
|
||||
|
||||
|
||||
def html_to_text(content: Union[str, bytes], tags: Mapping[str, str] = {"p": " | "}) -> str:
|
||||
def html_to_text(content: str | bytes, tags: Mapping[str, str] = {"p": " | "}) -> str:
|
||||
bs = BeautifulSoup(content, features="lxml")
|
||||
# Skip any admonition (warning) blocks, since they're
|
||||
# usually something about users needing to be an
|
||||
|
||||
Reference in New Issue
Block a user