Fix type hint for xml.sax.saxutils.XMLGenerator.__init__(). (#10979)

The `out` parameter accepts objects with `write(__o: bytes)`, not `write(__o: str)` methods.
This commit is contained in:
Andrey Rakhmatullin
2023-11-06 17:31:50 +04:00
committed by GitHub
parent 8023ba764a
commit 7b18a0be91

View File

@@ -11,7 +11,7 @@ def quoteattr(data: str, entities: Mapping[str, str] = {}) -> str: ...
class XMLGenerator(handler.ContentHandler):
def __init__(
self,
out: TextIOBase | RawIOBase | StreamWriter | StreamReaderWriter | SupportsWrite[str] | None = None,
out: TextIOBase | RawIOBase | StreamWriter | StreamReaderWriter | SupportsWrite[bytes] | None = None,
encoding: str = "iso-8859-1",
short_empty_elements: bool = False,
) -> None: ...