From 871f51c270726fb76502570dcbf919ce747721d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:29:17 +0000 Subject: Bump lxml-stubs from 0.4.0 to 0.5.1 (#16885) --- synapse/media/oembed.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'synapse/media/oembed.py') diff --git a/synapse/media/oembed.py b/synapse/media/oembed.py index 94ece30459..16d613d271 100644 --- a/synapse/media/oembed.py +++ b/synapse/media/oembed.py @@ -256,12 +256,11 @@ def calc_description_and_urls(open_graph_response: JsonDict, html_body: str) -> parser = etree.HTMLParser(recover=True, encoding="utf-8") # Attempt to parse the body. If this fails, log and return no metadata. - # TODO Develop of lxml-stubs has this correct. - tree = etree.fromstring(html_body, parser) # type: ignore[arg-type] + tree = etree.fromstring(html_body, parser) # The data was successfully parsed, but no tree was found. if tree is None: - return # type: ignore[unreachable] + return # Attempt to find interesting URLs (images, videos, embeds). if "og:image" not in open_graph_response: -- cgit 1.5.1