diff --git a/stubs/et_xmlfile/et_xmlfile/xmlfile.pyi b/stubs/et_xmlfile/et_xmlfile/xmlfile.pyi index 9e1f55e25689..ffa96d78670c 100644 --- a/stubs/et_xmlfile/et_xmlfile/xmlfile.pyi +++ b/stubs/et_xmlfile/et_xmlfile/xmlfile.pyi @@ -1,8 +1,7 @@ import types import xml.etree.ElementTree as ET -from _typeshed import Incomplete -from collections.abc import Generator -from contextlib import contextmanager +from collections.abc import Callable, Generator +from contextlib import _GeneratorContextManager, contextmanager from typing import Any class LxmlSyntaxError(Exception): ... @@ -10,7 +9,7 @@ class LxmlSyntaxError(Exception): ... class _IncrementalFileWriter: global_nsmap: dict[str, str] is_html: bool - def __init__(self, output_file: ET._FileWrite) -> None: ... + def __init__(self, output_file: Callable[[str], object]) -> None: ... @contextmanager def element( self, @@ -27,7 +26,7 @@ class _IncrementalFileWriter: class xmlfile: encoding: str - writer_cm: Incomplete + writer_cm: _GeneratorContextManager[tuple[Callable[[str], object], str]] | None def __init__( self, output_file: ET._FileWrite, buffered: bool = False, encoding: str = "utf-8", close: bool = False ) -> None: ...