From e646d446f5b293e08f72b4d15d778b4b19671df3 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Thu, 17 Oct 2024 16:10:23 -0400 Subject: [PATCH] Add a return to html5lib.HTMLSerializer.serialize() (#12838) Signed-off-by: Mike Fiedler --- stubs/html5lib/html5lib/serializer.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/html5lib/html5lib/serializer.pyi b/stubs/html5lib/html5lib/serializer.pyi index 5e230a05c..12ae9db51 100644 --- a/stubs/html5lib/html5lib/serializer.pyi +++ b/stubs/html5lib/html5lib/serializer.pyi @@ -1,4 +1,5 @@ from _typeshed import Incomplete +from collections.abc import Generator from typing import Any, overload def htmlentityreplace_errors(exc: Exception) -> tuple[str | bytes, int]: ... @@ -31,7 +32,7 @@ class HTMLSerializer: def encode(self, string): ... def encodeStrict(self, string): ... encoding: Any - def serialize(self, treewalker, encoding: Incomplete | None = None) -> None: ... + def serialize(self, treewalker, encoding: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... def render(self, treewalker, encoding: Incomplete | None = None): ... def serializeError(self, data: str = "XXX ERROR MESSAGE NEEDED") -> None: ...