diff options
author | David Robertson <davidr@element.io> | 2022-05-24 19:17:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 18:17:21 +0000 |
commit | e7c77a8750094616419720379afa02506e716c7d (patch) | |
tree | 0ab7c73fc6faeee9e1178e1a21a60033c453232a | |
parent | Fixes to MSC3787 implementation (#12858) (diff) | |
download | synapse-e7c77a8750094616419720379afa02506e716c7d.tar.xz |
Correct annotation of `_iterate_over_text` (#12860)
-rw-r--r-- | changelog.d/12860.misc | 1 | ||||
-rw-r--r-- | synapse/rest/media/v1/preview_html.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/12860.misc b/changelog.d/12860.misc new file mode 100644 index 0000000000..b7d2943023 --- /dev/null +++ b/changelog.d/12860.misc @@ -0,0 +1 @@ +Correct a type annotation in the URL preview source code. diff --git a/synapse/rest/media/v1/preview_html.py b/synapse/rest/media/v1/preview_html.py index ca73965fc2..e72c8987cc 100644 --- a/synapse/rest/media/v1/preview_html.py +++ b/synapse/rest/media/v1/preview_html.py @@ -281,7 +281,7 @@ def parse_html_description(tree: "etree.Element") -> Optional[str]: def _iterate_over_text( - tree: "etree.Element", *tags_to_ignore: Iterable[Union[str, "etree.Comment"]] + tree: "etree.Element", *tags_to_ignore: Union[str, "etree.Comment"] ) -> Generator[str, None, None]: """Iterate over the tree returning text nodes in a depth first fashion, skipping text nodes inside certain tags. |