mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 22:01:14 +08:00
Import from collections.abc wherever possible (#7635)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed.xml import DOMImplementation
|
||||
from typing import Callable, Iterable
|
||||
from collections.abc import Callable, Iterable
|
||||
|
||||
well_known_implementations: dict[str, str]
|
||||
registered: dict[str, Callable[[], DOMImplementation]]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Iterable, TypeVar
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, TypeVar
|
||||
|
||||
__all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"]
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import SupportsRead
|
||||
from typing import Any, Sequence
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from xml.dom.minidom import Document, DOMImplementation, Element, Text
|
||||
from xml.sax.handler import ContentHandler
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
XINCLUDE: str
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Callable, Generator, Pattern, TypeVar
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import Pattern, TypeVar
|
||||
from typing_extensions import TypeAlias
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import FileDescriptor, StrOrBytesPath, SupportsRead, SupportsWrite
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Generator,
|
||||
ItemsView,
|
||||
Iterable,
|
||||
Iterator,
|
||||
KeysView,
|
||||
Mapping,
|
||||
MutableSequence,
|
||||
Sequence,
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
from collections.abc import Callable, Generator, ItemsView, Iterable, Iterator, KeysView, Mapping, MutableSequence, Sequence
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, SupportsIndex, TypeAlias, TypeGuard
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import SupportsRead, _T_co
|
||||
from typing import Any, Iterable, NoReturn, Protocol
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, NoReturn, Protocol
|
||||
from xml.sax.handler import ContentHandler, ErrorHandler
|
||||
from xml.sax.xmlreader import Locator, XMLReader
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import SupportsWrite
|
||||
from codecs import StreamReaderWriter, StreamWriter
|
||||
from collections.abc import Mapping
|
||||
from io import RawIOBase, TextIOBase
|
||||
from typing import Mapping
|
||||
from xml.sax import handler, xmlreader
|
||||
|
||||
def escape(data: str, entities: Mapping[str, str] = ...) -> str: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Mapping
|
||||
from collections.abc import Mapping
|
||||
|
||||
class XMLReader:
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user