mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +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:
4
third_party/2/six/__init__.pyi
vendored
4
third_party/2/six/__init__.pyi
vendored
@@ -5,7 +5,7 @@ import typing
|
||||
import unittest
|
||||
from __builtin__ import unichr as unichr
|
||||
from functools import wraps as wraps
|
||||
from StringIO import StringIO as BytesIO, StringIO as StringIO
|
||||
from StringIO import StringIO as StringIO
|
||||
from typing import (
|
||||
Any,
|
||||
AnyStr,
|
||||
@@ -29,6 +29,8 @@ from typing import (
|
||||
|
||||
from . import moves
|
||||
|
||||
BytesIO = StringIO
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_K = TypeVar("_K")
|
||||
_V = TypeVar("_V")
|
||||
|
||||
37
third_party/2/six/moves/__init__.pyi
vendored
37
third_party/2/six/moves/__init__.pyi
vendored
@@ -2,19 +2,12 @@
|
||||
#
|
||||
# Note: Commented out items means they weren't implemented at the time.
|
||||
# Uncomment them when the modules have been added to the typeshed.
|
||||
import __builtin__ as builtins
|
||||
from __builtin__ import (
|
||||
intern as intern,
|
||||
raw_input as input,
|
||||
reduce as reduce,
|
||||
reload as reload_module,
|
||||
xrange as range,
|
||||
xrange as xrange,
|
||||
)
|
||||
from cStringIO import StringIO as cStringIO
|
||||
from itertools import ifilter as filter, ifilterfalse as filterfalse, imap as map, izip as zip, izip_longest as zip_longest
|
||||
from os import getcwd as getcwdb, getcwdu as getcwd
|
||||
from pipes import quote as shlex_quote
|
||||
import __builtin__
|
||||
import itertools
|
||||
import os
|
||||
import pipes
|
||||
from __builtin__ import intern as intern, reduce as reduce, xrange as xrange
|
||||
from cStringIO import StringIO as _cStringIO
|
||||
from StringIO import StringIO as StringIO
|
||||
from UserDict import UserDict as UserDict
|
||||
from UserList import UserList as UserList
|
||||
@@ -65,3 +58,21 @@ from . import (
|
||||
)
|
||||
|
||||
# import SimpleXMLRPCServer as xmlrpc_server
|
||||
|
||||
builtins = __builtin__
|
||||
input = __builtin__.raw_input
|
||||
reload_module = __builtin__.reload
|
||||
range = __builtin__.xrange
|
||||
|
||||
cStringIO = _cStringIO
|
||||
|
||||
filter = itertools.ifilter
|
||||
filterfalse = itertools.ifilterfalse
|
||||
map = itertools.imap
|
||||
zip = itertools.izip
|
||||
zip_longest = itertools.izip_longest
|
||||
|
||||
getcwdb = os.getcwd
|
||||
getcwd = os.getcwdu
|
||||
|
||||
shlex_quote = pipes.quote
|
||||
|
||||
3
third_party/2/six/moves/urllib/parse.pyi
vendored
3
third_party/2/six/moves/urllib/parse.pyi
vendored
@@ -6,7 +6,6 @@ from urllib import (
|
||||
splittag as splittag,
|
||||
splituser as splituser,
|
||||
unquote as unquote,
|
||||
unquote as unquote_to_bytes,
|
||||
unquote_plus as unquote_plus,
|
||||
urlencode as urlencode,
|
||||
)
|
||||
@@ -27,3 +26,5 @@ from urlparse import (
|
||||
uses_query as uses_query,
|
||||
uses_relative as uses_relative,
|
||||
)
|
||||
|
||||
unquote_to_bytes = unquote
|
||||
|
||||
13
third_party/3/six/moves/__init__.pyi
vendored
13
third_party/3/six/moves/__init__.pyi
vendored
@@ -2,14 +2,14 @@
|
||||
#
|
||||
# Note: Commented out items means they weren't implemented at the time.
|
||||
# Uncomment them when the modules have been added to the typeshed.
|
||||
from builtins import filter as filter, input as input, map as map, range as range, range as xrange, zip as zip
|
||||
import importlib
|
||||
import shlex
|
||||
from builtins import filter as filter, input as input, map as map, range as range, zip as zip
|
||||
from collections import UserDict as UserDict, UserList as UserList, UserString as UserString
|
||||
from functools import reduce as reduce
|
||||
from importlib import reload as reload_module
|
||||
from io import StringIO as StringIO, StringIO as cStringIO
|
||||
from io import StringIO as StringIO
|
||||
from itertools import filterfalse as filterfalse, zip_longest as zip_longest
|
||||
from os import getcwd as getcwd, getcwdb as getcwdb
|
||||
from shlex import quote as shlex_quote
|
||||
from sys import intern as intern
|
||||
|
||||
# import tkinter.font as tkinter_font
|
||||
@@ -58,3 +58,8 @@ from . import (
|
||||
|
||||
# import xmlrpc.client as xmlrpc_client
|
||||
# import xmlrpc.server as xmlrpc_server
|
||||
|
||||
xrange = range
|
||||
reload_module = importlib.reload
|
||||
cStringIO = StringIO
|
||||
shlex_quote = shlex.quote
|
||||
|
||||
Reference in New Issue
Block a user