mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-11 12:11:30 +08:00
pep 484: explicit reexport as intended (#4586)
See discussion on typing-sig. This doesn't take care of some third_party libraries, will follow up on those. Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# These are not exported.
|
||||
# These are exported.
|
||||
from typing import (
|
||||
AbstractSet as Set,
|
||||
AbstractSet,
|
||||
Any,
|
||||
Callable as Callable,
|
||||
Container as Container,
|
||||
@@ -30,6 +30,8 @@ from typing import (
|
||||
overload,
|
||||
)
|
||||
|
||||
Set = AbstractSet
|
||||
|
||||
_S = TypeVar("_S")
|
||||
_T = TypeVar("_T")
|
||||
_KT = TypeVar("_KT")
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
from itertools import ifilter as filter, imap as map, izip as zip
|
||||
from itertools import ifilter, imap, izip
|
||||
from typing import Any
|
||||
|
||||
filter = ifilter
|
||||
map = imap
|
||||
zip = izip
|
||||
|
||||
def ascii(obj: Any) -> str: ...
|
||||
def hex(x: int) -> str: ...
|
||||
def oct(x: int) -> str: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Stubs for Python 2.7 md5 stdlib module
|
||||
|
||||
from hashlib import md5 as md5, md5 as new
|
||||
from hashlib import md5 as md5
|
||||
|
||||
new = md5
|
||||
blocksize: int
|
||||
digest_size: int
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import AnyPath, FileDescriptorLike
|
||||
from builtins import OSError as error
|
||||
from builtins import OSError
|
||||
from io import TextIOWrapper as _TextIOWrapper
|
||||
from posix import listdir as listdir, stat_result as stat_result # TODO: use this, see https://github.com/python/mypy/issues/3078
|
||||
from typing import (
|
||||
@@ -35,6 +35,8 @@ _T = TypeVar("_T")
|
||||
|
||||
# ----- os variables -----
|
||||
|
||||
error = OSError
|
||||
|
||||
if sys.version_info >= (3, 2):
|
||||
supports_bytes_environ: bool
|
||||
|
||||
@@ -152,7 +154,9 @@ TMP_MAX: int # Undocumented, but used by tempfile
|
||||
|
||||
# ----- os classes (structures) -----
|
||||
if sys.version_info >= (3, 6):
|
||||
from builtins import _PathLike as PathLike # See comment in builtins
|
||||
from builtins import _PathLike
|
||||
|
||||
PathLike = _PathLike # See comment in builtins
|
||||
|
||||
class _StatVFS(NamedTuple):
|
||||
f_bsize: int
|
||||
|
||||
Reference in New Issue
Block a user