mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 04:52:23 +08:00
Add stubs for submodules of six.moves (#2108)
To support "from six.moves.cPickle import loads", we must add a stub for six.moves.cPickle as if it were a real submodule, even though it isn't implemented as such. This fixes python/mypy#1550. We don't apply this approach to six.moves.builtins on Python 2, because it seems to confuse mypy. We also add stubs for aliases in six.moves whose underlying modules have been added to typeshed. For Python 2: - six.moves.SimpleHTTPServer (alias for SimpleHTTPServer) For Python 3: - six.moves.tkinter_dialog (alias for tkinter.dialog) - six.moves.tkinter_filedialog (alias for tkinter.filedialog) - six.moves.tkinter_commondialog (alias for tkinter.commondialog) - six.moves.tkinter_tkfiledialog (alias for tkinter.filedialog)
This commit is contained in:
committed by
Jelle Zijlstra
parent
86f9472bc9
commit
56a31be7a7
1
third_party/2/six/moves/BaseHTTPServer.pyi
vendored
Normal file
1
third_party/2/six/moves/BaseHTTPServer.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from BaseHTTPServer import *
|
||||
1
third_party/2/six/moves/SimpleHTTPServer.pyi
vendored
Normal file
1
third_party/2/six/moves/SimpleHTTPServer.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from SimpleHTTPServer import *
|
||||
40
third_party/2/six/moves/__init__.pyi
vendored
40
third_party/2/six/moves/__init__.pyi
vendored
@@ -22,27 +22,27 @@ from __builtin__ import xrange as xrange
|
||||
from itertools import izip as zip
|
||||
from itertools import izip_longest as zip_longest
|
||||
import __builtin__ as builtins
|
||||
import ConfigParser as configparser
|
||||
from . import configparser
|
||||
# import copy_reg as copyreg
|
||||
# import gdbm as dbm_gnu
|
||||
import dummy_thread as _dummy_thread
|
||||
import cookielib as http_cookiejar
|
||||
import Cookie as http_cookies
|
||||
import htmlentitydefs as html_entities
|
||||
import HTMLParser as html_parser
|
||||
import httplib as http_client
|
||||
from . import _dummy_thread
|
||||
from . import http_cookiejar
|
||||
from . import http_cookies
|
||||
from . import html_entities
|
||||
from . import html_parser
|
||||
from . import http_client
|
||||
# import email.MIMEMultipart as email_mime_multipart
|
||||
# import email.MIMENonMultipart as email_mime_nonmultipart
|
||||
import email.MIMEText as email_mime_text
|
||||
from . import email_mime_text
|
||||
# import email.MIMEBase as email_mime_base
|
||||
import BaseHTTPServer as BaseHTTPServer
|
||||
from . import BaseHTTPServer
|
||||
# import CGIHTTPServer as CGIHTTPServer
|
||||
# import SimpleHTTPServer as SimpleHTTPServer
|
||||
import cPickle as cPickle
|
||||
import Queue as queue
|
||||
import repr as reprlib
|
||||
import SocketServer as socketserver
|
||||
import thread as _thread
|
||||
from . import SimpleHTTPServer
|
||||
from . import cPickle
|
||||
from . import queue
|
||||
from . import reprlib
|
||||
from . import socketserver
|
||||
from . import _thread
|
||||
# import Tkinter as tkinter
|
||||
# import Dialog as tkinter_dialog
|
||||
# import FileDialog as tkinter_filedialog
|
||||
@@ -58,9 +58,9 @@ import thread as _thread
|
||||
# import tkFont as tkinter_font
|
||||
# import tkMessageBox as tkinter_messagebox
|
||||
# import tkSimpleDialog as tkinter_tksimpledialog
|
||||
import six.moves.urllib.parse as urllib_parse
|
||||
import six.moves.urllib.error as urllib_error
|
||||
import six.moves.urllib as urllib
|
||||
import robotparser as urllib_robotparser
|
||||
import xmlrpclib as xmlrpc_client
|
||||
from . import urllib_parse
|
||||
from . import urllib_error
|
||||
from . import urllib
|
||||
from . import urllib_robotparser
|
||||
from . import xmlrpc_client
|
||||
# import SimpleXMLRPCServer as xmlrpc_server
|
||||
|
||||
1
third_party/2/six/moves/_dummy_thread.pyi
vendored
Normal file
1
third_party/2/six/moves/_dummy_thread.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from dummy_thread import *
|
||||
1
third_party/2/six/moves/_thread.pyi
vendored
Normal file
1
third_party/2/six/moves/_thread.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from thread import *
|
||||
1
third_party/2/six/moves/cPickle.pyi
vendored
Normal file
1
third_party/2/six/moves/cPickle.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from cPickle import *
|
||||
1
third_party/2/six/moves/configparser.pyi
vendored
Normal file
1
third_party/2/six/moves/configparser.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from ConfigParser import *
|
||||
1
third_party/2/six/moves/email_mime_text.pyi
vendored
Normal file
1
third_party/2/six/moves/email_mime_text.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from email.MIMEText import *
|
||||
1
third_party/2/six/moves/html_entities.pyi
vendored
Normal file
1
third_party/2/six/moves/html_entities.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from htmlentitydefs import *
|
||||
1
third_party/2/six/moves/html_parser.pyi
vendored
Normal file
1
third_party/2/six/moves/html_parser.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from HTMLParser import *
|
||||
1
third_party/2/six/moves/http_client.pyi
vendored
Normal file
1
third_party/2/six/moves/http_client.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from httplib import *
|
||||
1
third_party/2/six/moves/http_cookiejar.pyi
vendored
Normal file
1
third_party/2/six/moves/http_cookiejar.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from cookielib import *
|
||||
1
third_party/2/six/moves/http_cookies.pyi
vendored
Normal file
1
third_party/2/six/moves/http_cookies.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from Cookie import *
|
||||
1
third_party/2/six/moves/queue.pyi
vendored
Normal file
1
third_party/2/six/moves/queue.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from Queue import *
|
||||
1
third_party/2/six/moves/reprlib.pyi
vendored
Normal file
1
third_party/2/six/moves/reprlib.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from repr import *
|
||||
1
third_party/2/six/moves/socketserver.pyi
vendored
Normal file
1
third_party/2/six/moves/socketserver.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from SocketServer import *
|
||||
1
third_party/2/six/moves/urllib_error.pyi
vendored
Normal file
1
third_party/2/six/moves/urllib_error.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from .urllib.error import *
|
||||
1
third_party/2/six/moves/urllib_parse.pyi
vendored
Normal file
1
third_party/2/six/moves/urllib_parse.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from .urllib.parse import *
|
||||
1
third_party/2/six/moves/urllib_robotparser.pyi
vendored
Normal file
1
third_party/2/six/moves/urllib_robotparser.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from robotparser import *
|
||||
1
third_party/2/six/moves/xmlrpc_client.pyi
vendored
Normal file
1
third_party/2/six/moves/xmlrpc_client.pyi
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from xmlrpclib import *
|
||||
Reference in New Issue
Block a user