mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 01:17:39 +08:00
Import from collections.abc wherever possible (#7635)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Callable, Union
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Union
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_Macro: TypeAlias = Union[tuple[str], tuple[str, str | None]]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Iterable
|
||||
from distutils.dist import Distribution
|
||||
from typing import Any, Callable, Iterable
|
||||
from typing import Any
|
||||
|
||||
class Command:
|
||||
sub_commands: list[tuple[str, Callable[[Command], bool] | None]]
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from collections.abc import Mapping
|
||||
from distutils.cmd import Command as Command
|
||||
from distutils.dist import Distribution as Distribution
|
||||
from distutils.extension import Extension as Extension
|
||||
from typing import Any, Mapping
|
||||
from typing import Any
|
||||
|
||||
def setup(
|
||||
*,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import StrOrBytesPath, SupportsWrite
|
||||
from collections.abc import Iterable, Mapping
|
||||
from distutils.cmd import Command
|
||||
from typing import IO, Any, Iterable, Mapping
|
||||
from typing import IO, Any
|
||||
|
||||
class DistributionMetadata:
|
||||
def __init__(self, path: int | StrOrBytesPath | None = ...) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Iterable, Mapping, overload
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_Option: TypeAlias = tuple[str, str | None, str]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Sequence
|
||||
from collections.abc import Sequence
|
||||
|
||||
def copy_file(
|
||||
src: str,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Iterable, Pattern, overload
|
||||
from collections.abc import Iterable
|
||||
from typing import Pattern, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
# class is entirely undocumented
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections.abc import Mapping
|
||||
from distutils.ccompiler import CCompiler
|
||||
from typing import Mapping
|
||||
|
||||
PREFIX: str
|
||||
EXEC_PREFIX: str
|
||||
|
||||
Reference in New Issue
Block a user