mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Remove symlinks! (#2132)
This commit is contained in:
committed by
Jelle Zijlstra
parent
537b97ed39
commit
e9600db2ec
@@ -1 +0,0 @@
|
||||
../3/socketserver.pyi
|
||||
99
stdlib/2/SocketServer.pyi
Normal file
99
stdlib/2/SocketServer.pyi
Normal file
@@ -0,0 +1,99 @@
|
||||
# NB: SocketServer.pyi and socketserver.pyi must remain consistent!
|
||||
# Stubs for socketserver
|
||||
|
||||
from typing import Any, BinaryIO, Optional, Tuple, Type
|
||||
from socket import SocketType
|
||||
import sys
|
||||
import types
|
||||
|
||||
class BaseServer:
|
||||
address_family = ... # type: int
|
||||
RequestHandlerClass = ... # type: type
|
||||
server_address = ... # type: Tuple[str, int]
|
||||
socket = ... # type: SocketType
|
||||
allow_reuse_address = ... # type: bool
|
||||
request_queue_size = ... # type: int
|
||||
socket_type = ... # type: int
|
||||
timeout = ... # type: Optional[float]
|
||||
def __init__(self, server_address: Tuple[str, int],
|
||||
RequestHandlerClass: type) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def handle_request(self) -> None: ...
|
||||
def serve_forever(self, poll_interval: float = ...) -> None: ...
|
||||
def shutdown(self) -> None: ...
|
||||
def server_close(self) -> None: ...
|
||||
def finish_request(self, request: bytes,
|
||||
client_address: Tuple[str, int]) -> None: ...
|
||||
def get_request(self) -> None: ...
|
||||
def handle_error(self, request: bytes,
|
||||
client_address: Tuple[str, int]) -> None: ...
|
||||
def handle_timeout(self) -> None: ...
|
||||
def process_request(self, request: bytes,
|
||||
client_address: Tuple[str, int]) -> None: ...
|
||||
def server_activate(self) -> None: ...
|
||||
def server_bind(self) -> None: ...
|
||||
def verify_request(self, request: bytes,
|
||||
client_address: Tuple[str, int]) -> bool: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __enter__(self) -> 'BaseServer': ...
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]],
|
||||
exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[types.TracebackType]) -> bool: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def service_actions(self) -> None: ...
|
||||
|
||||
class TCPServer(BaseServer):
|
||||
def __init__(self, server_address: Tuple[str, int],
|
||||
RequestHandlerClass: type,
|
||||
bind_and_activate: bool = ...) -> None: ...
|
||||
|
||||
class UDPServer(BaseServer):
|
||||
def __init__(self, server_address: Tuple[str, int],
|
||||
RequestHandlerClass: type,
|
||||
bind_and_activate: bool = ...) -> None: ...
|
||||
|
||||
if sys.platform != 'win32':
|
||||
class UnixStreamServer(BaseServer):
|
||||
def __init__(self, server_address: Tuple[str, int],
|
||||
RequestHandlerClass: type,
|
||||
bind_and_activate: bool = ...) -> None: ...
|
||||
|
||||
class UnixDatagramServer(BaseServer):
|
||||
def __init__(self, server_address: Tuple[str, int],
|
||||
RequestHandlerClass: type,
|
||||
bind_and_activate: bool = ...) -> None: ...
|
||||
|
||||
class ForkingMixIn: ...
|
||||
class ThreadingMixIn: ...
|
||||
|
||||
class ForkingTCPServer(ForkingMixIn, TCPServer): ...
|
||||
class ForkingUDPServer(ForkingMixIn, UDPServer): ...
|
||||
class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...
|
||||
class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...
|
||||
if sys.platform != 'win32':
|
||||
class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ...
|
||||
class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ...
|
||||
|
||||
|
||||
class BaseRequestHandler:
|
||||
# Those are technically of types, respectively:
|
||||
# * Union[SocketType, Tuple[bytes, SocketType]]
|
||||
# * Union[Tuple[str, int], str]
|
||||
# But there are some concerns that having unions here would cause
|
||||
# too much inconvenience to people using it (see
|
||||
# https://github.com/python/typeshed/pull/384#issuecomment-234649696)
|
||||
request = ... # type: Any
|
||||
client_address = ... # type: Any
|
||||
|
||||
server = ... # type: BaseServer
|
||||
def setup(self) -> None: ...
|
||||
def handle(self) -> None: ...
|
||||
def finish(self) -> None: ...
|
||||
|
||||
class StreamRequestHandler(BaseRequestHandler):
|
||||
rfile = ... # type: BinaryIO
|
||||
wfile = ... # type: BinaryIO
|
||||
|
||||
class DatagramRequestHandler(BaseRequestHandler):
|
||||
rfile = ... # type: BinaryIO
|
||||
wfile = ... # type: BinaryIO
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: __builtin__.pyi and builtins.pyi must remain consistent!
|
||||
# Stubs for builtins (Python 2.7)
|
||||
|
||||
# True and False are deliberately omitted because they are keywords in
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
__builtin__.pyi
|
||||
1085
stdlib/2/builtins.pyi
Normal file
1085
stdlib/2/builtins.pyi
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
posixpath.pyi
|
||||
37
stdlib/2/macpath.pyi
Normal file
37
stdlib/2/macpath.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
# NB: os2emxpath.pyi, posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
from typing import Any
|
||||
from genericpath import * # noqa: F403
|
||||
|
||||
curdir = ... # type: Any
|
||||
pardir = ... # type: Any
|
||||
extsep = ... # type: Any
|
||||
sep = ... # type: Any
|
||||
pathsep = ... # type: Any
|
||||
defpath = ... # type: Any
|
||||
altsep = ... # type: Any
|
||||
devnull = ... # type: Any
|
||||
|
||||
def normcase(s): ...
|
||||
def isabs(s): ...
|
||||
def join(a, *p): ...
|
||||
def split(p): ...
|
||||
def splitext(p): ...
|
||||
def splitdrive(p): ...
|
||||
def basename(p): ...
|
||||
def dirname(p): ...
|
||||
def islink(path): ...
|
||||
def lexists(path): ...
|
||||
def samefile(f1, f2): ...
|
||||
def sameopenfile(fp1, fp2): ...
|
||||
def samestat(s1, s2): ...
|
||||
def ismount(path): ...
|
||||
def walk(top, func, arg): ...
|
||||
def expanduser(path): ...
|
||||
def expandvars(path): ...
|
||||
def normpath(path): ...
|
||||
def abspath(path): ...
|
||||
def realpath(filename): ...
|
||||
|
||||
supports_unicode_filenames = ... # type: Any
|
||||
|
||||
def relpath(path, start=...): ...
|
||||
@@ -1 +0,0 @@
|
||||
posixpath.pyi
|
||||
37
stdlib/2/ntpath.pyi
Normal file
37
stdlib/2/ntpath.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
# NB: os2emxpath.pyi, posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
from typing import Any
|
||||
from genericpath import * # noqa: F403
|
||||
|
||||
curdir = ... # type: Any
|
||||
pardir = ... # type: Any
|
||||
extsep = ... # type: Any
|
||||
sep = ... # type: Any
|
||||
pathsep = ... # type: Any
|
||||
defpath = ... # type: Any
|
||||
altsep = ... # type: Any
|
||||
devnull = ... # type: Any
|
||||
|
||||
def normcase(s): ...
|
||||
def isabs(s): ...
|
||||
def join(a, *p): ...
|
||||
def split(p): ...
|
||||
def splitext(p): ...
|
||||
def splitdrive(p): ...
|
||||
def basename(p): ...
|
||||
def dirname(p): ...
|
||||
def islink(path): ...
|
||||
def lexists(path): ...
|
||||
def samefile(f1, f2): ...
|
||||
def sameopenfile(fp1, fp2): ...
|
||||
def samestat(s1, s2): ...
|
||||
def ismount(path): ...
|
||||
def walk(top, func, arg): ...
|
||||
def expanduser(path): ...
|
||||
def expandvars(path): ...
|
||||
def normpath(path): ...
|
||||
def abspath(path): ...
|
||||
def realpath(filename): ...
|
||||
|
||||
supports_unicode_filenames = ... # type: Any
|
||||
|
||||
def relpath(path, start=...): ...
|
||||
@@ -1 +0,0 @@
|
||||
posixpath.pyi
|
||||
37
stdlib/2/os2emxpath.pyi
Normal file
37
stdlib/2/os2emxpath.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
# NB: os2emxpath.pyi, posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
from typing import Any
|
||||
from genericpath import * # noqa: F403
|
||||
|
||||
curdir = ... # type: Any
|
||||
pardir = ... # type: Any
|
||||
extsep = ... # type: Any
|
||||
sep = ... # type: Any
|
||||
pathsep = ... # type: Any
|
||||
defpath = ... # type: Any
|
||||
altsep = ... # type: Any
|
||||
devnull = ... # type: Any
|
||||
|
||||
def normcase(s): ...
|
||||
def isabs(s): ...
|
||||
def join(a, *p): ...
|
||||
def split(p): ...
|
||||
def splitext(p): ...
|
||||
def splitdrive(p): ...
|
||||
def basename(p): ...
|
||||
def dirname(p): ...
|
||||
def islink(path): ...
|
||||
def lexists(path): ...
|
||||
def samefile(f1, f2): ...
|
||||
def sameopenfile(fp1, fp2): ...
|
||||
def samestat(s1, s2): ...
|
||||
def ismount(path): ...
|
||||
def walk(top, func, arg): ...
|
||||
def expanduser(path): ...
|
||||
def expandvars(path): ...
|
||||
def normpath(path): ...
|
||||
def abspath(path): ...
|
||||
def realpath(filename): ...
|
||||
|
||||
supports_unicode_filenames = ... # type: Any
|
||||
|
||||
def relpath(path, start=...): ...
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: os2emxpath.pyi, posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
from typing import Any
|
||||
from genericpath import * # noqa: F403
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: third_party/3/enum.pyi and stdlib/3.4/enum.pyi must remain consistent!
|
||||
import sys
|
||||
from typing import List, Any, TypeVar, Union, Iterator, TypeVar, Generic, Type, Sized, Mapping
|
||||
from abc import ABCMeta
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
posixpath.pyi
|
||||
48
stdlib/3/macpath.pyi
Normal file
48
stdlib/3/macpath.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
# NB: posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
# based on http://docs.python.org/3.2/library/os.path.html
|
||||
import sys
|
||||
from typing import Any, List, Tuple, IO
|
||||
|
||||
# ----- os.path variables -----
|
||||
supports_unicode_filenames = False
|
||||
|
||||
# ----- os.path function stubs -----
|
||||
def abspath(path: str) -> str: ...
|
||||
def basename(path) -> str: ...
|
||||
def commonprefix(list: List[str]) -> str: ...
|
||||
def dirname(path: str) -> str: ...
|
||||
def exists(path: str) -> bool: ...
|
||||
def lexists(path: str) -> bool: ...
|
||||
def expanduser(path: str) -> str: ...
|
||||
def expandvars(path: str) -> str: ...
|
||||
def getatime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getmtime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getctime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getsize(path: str) -> int: ...
|
||||
def isabs(path: str) -> bool: ...
|
||||
def isfile(path: str) -> bool: ...
|
||||
def isdir(path: str) -> bool: ...
|
||||
def islink(path: str) -> bool: ...
|
||||
def ismount(path: str) -> bool: ...
|
||||
def join(path: str, *paths: str) -> str: ...
|
||||
def normcase(path: str) -> str: ...
|
||||
def normpath(path: str) -> str: ...
|
||||
def realpath(path: str) -> str: ...
|
||||
def relpath(path: str, start: str = ...) -> str: ...
|
||||
def samefile(path1: str, path2: str) -> bool: ...
|
||||
|
||||
def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ...
|
||||
|
||||
# def samestat(stat1: stat_result, stat2: stat_result) -> bool:
|
||||
# ... # Unix only
|
||||
def split(path: str) -> Tuple[str, str]: ...
|
||||
def splitdrive(path: str) -> Tuple[str, str]: ...
|
||||
def splitext(path: str) -> Tuple[str, str]: ...
|
||||
if sys.version_info < (3, 7) and sys.platform == 'win32':
|
||||
def splitunc(path: str) -> Tuple[str, str]: ...
|
||||
@@ -1 +0,0 @@
|
||||
posixpath.pyi
|
||||
48
stdlib/3/ntpath.pyi
Normal file
48
stdlib/3/ntpath.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
# NB: posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
# based on http://docs.python.org/3.2/library/os.path.html
|
||||
import sys
|
||||
from typing import Any, List, Tuple, IO
|
||||
|
||||
# ----- os.path variables -----
|
||||
supports_unicode_filenames = False
|
||||
|
||||
# ----- os.path function stubs -----
|
||||
def abspath(path: str) -> str: ...
|
||||
def basename(path) -> str: ...
|
||||
def commonprefix(list: List[str]) -> str: ...
|
||||
def dirname(path: str) -> str: ...
|
||||
def exists(path: str) -> bool: ...
|
||||
def lexists(path: str) -> bool: ...
|
||||
def expanduser(path: str) -> str: ...
|
||||
def expandvars(path: str) -> str: ...
|
||||
def getatime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getmtime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getctime(path: str) -> int:
|
||||
... # return float if os.stat_float_times() returns True
|
||||
def getsize(path: str) -> int: ...
|
||||
def isabs(path: str) -> bool: ...
|
||||
def isfile(path: str) -> bool: ...
|
||||
def isdir(path: str) -> bool: ...
|
||||
def islink(path: str) -> bool: ...
|
||||
def ismount(path: str) -> bool: ...
|
||||
def join(path: str, *paths: str) -> str: ...
|
||||
def normcase(path: str) -> str: ...
|
||||
def normpath(path: str) -> str: ...
|
||||
def realpath(path: str) -> str: ...
|
||||
def relpath(path: str, start: str = ...) -> str: ...
|
||||
def samefile(path1: str, path2: str) -> bool: ...
|
||||
|
||||
def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ...
|
||||
|
||||
# def samestat(stat1: stat_result, stat2: stat_result) -> bool:
|
||||
# ... # Unix only
|
||||
def split(path: str) -> Tuple[str, str]: ...
|
||||
def splitdrive(path: str) -> Tuple[str, str]: ...
|
||||
def splitext(path: str) -> Tuple[str, str]: ...
|
||||
if sys.version_info < (3, 7) and sys.platform == 'win32':
|
||||
def splitunc(path: str) -> Tuple[str, str]: ...
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: posixpath.pyi, ntpath.pyi, and macpath.pyi must remain consistent!
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: SocketServer.pyi and socketserver.pyi must remain consistent!
|
||||
# Stubs for socketserver
|
||||
|
||||
from typing import Any, BinaryIO, Optional, Tuple, Type
|
||||
|
||||
Reference in New Issue
Block a user