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: ...