mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
use _typeshed's Path aliases (#4214)
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
|
||||
import sys
|
||||
|
||||
from typing import List, Optional, Union
|
||||
from _typeshed import AnyPath
|
||||
from typing import List, Optional
|
||||
from types import FrameType
|
||||
from . import tasks
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from builtins import _PathLike
|
||||
_PathType = Union[bytes, str, _PathLike]
|
||||
else:
|
||||
_PathType = Union[bytes, str]
|
||||
|
||||
def _task_repr_info(task: tasks.Task) -> List[str]: ... # undocumented
|
||||
def _task_get_stack(task: tasks.Task, limit: Optional[int]) -> List[FrameType]: ... # undocumented
|
||||
def _task_print_stack(task: tasks.Task, limit: Optional[int], file: _PathType): ... # undocumented
|
||||
def _task_print_stack(task: tasks.Task, limit: Optional[int], file: AnyPath): ... # undocumented
|
||||
|
||||
@@ -1,20 +1,9 @@
|
||||
import sys
|
||||
from socket import socket
|
||||
from typing import Any, Mapping, Optional, Union
|
||||
from typing import Any, Mapping, Optional
|
||||
from typing_extensions import Literal
|
||||
|
||||
from . import base_events, constants, events, futures, streams, transports
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from os import PathLike
|
||||
_Path = Union[str, PathLike[str]]
|
||||
else:
|
||||
_Path = str
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
|
||||
class _ProactorBasePipeTransport(transports._FlowControlMixin, transports.BaseTransport):
|
||||
|
||||
def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ...
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
import selectors
|
||||
import sys
|
||||
from socket import socket
|
||||
from typing import Any, Optional, Union
|
||||
from typing import Optional
|
||||
|
||||
from . import base_events, events
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from os import PathLike
|
||||
_Path = Union[str, PathLike[str]]
|
||||
else:
|
||||
_Path = str
|
||||
from . import base_events
|
||||
|
||||
class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||
def __init__(self, selector: Optional[selectors.BaseSelector] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user