From 41f6ed14a9be1a81a06f9d1be40e30f95c861951 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 29 Sep 2015 15:07:41 -0700 Subject: [PATCH 01/12] add typeshed, and tweak default_lib_path accordingly --- .gitmodules | 3 + mypy/build.py | 33 +- stubs/2.7/Queue.pyi | 29 - stubs/2.7/StringIO.pyi | 28 - stubs/2.7/UserDict.pyi | 11 - stubs/2.7/__future__.pyi | 9 - stubs/2.7/_random.pyi | 12 - stubs/2.7/abc.pyi | 5 - stubs/2.7/argparse.pyi | 171 ---- stubs/2.7/atexit.pyi | 5 - stubs/2.7/base64.pyi | 25 - stubs/2.7/binascii.pyi | 21 - stubs/2.7/builtins.pyi | 801 ------------------ stubs/2.7/cStringIO.pyi | 34 - stubs/2.7/codecs.pyi | 165 ---- stubs/2.7/collections.pyi | 96 --- stubs/2.7/compileall.pyi | 7 - stubs/2.7/contextlib.pyi | 8 - stubs/2.7/copy.pyi | 10 - stubs/2.7/csv.pyi | 93 -- stubs/2.7/datetime.pyi | 220 ----- stubs/2.7/difflib.pyi | 63 -- stubs/2.7/distutils/__init__.pyi | 7 - stubs/2.7/distutils/version.pyi | 23 - stubs/2.7/email/MIMEText.pyi | 8 - stubs/2.7/email/__init__.pyi | 0 stubs/2.7/email/mime/__init__.pyi | 0 stubs/2.7/email/mime/base.pyi | 10 - stubs/2.7/email/mime/multipart.pyi | 8 - stubs/2.7/email/mime/nonmultipart.pyi | 8 - stubs/2.7/email/mime/text.pyi | 8 - stubs/2.7/errno.pyi | 126 --- stubs/2.7/fcntl.pyi | 38 - stubs/2.7/fnmatch.pyi | 6 - stubs/2.7/functools.pyi | 23 - stubs/2.7/gc.pyi | 27 - stubs/2.7/getpass.pyi | 8 - stubs/2.7/gettext.pyi | 40 - stubs/2.7/glob.pyi | 4 - stubs/2.7/gzip.pyi | 41 - stubs/2.7/hashlib.pyi | 27 - stubs/2.7/hmac.pyi | 11 - stubs/2.7/htmlentitydefs.pyi | 9 - stubs/2.7/imp.pyi | 35 - stubs/2.7/importlib.pyi | 3 - stubs/2.7/inspect.pyi | 11 - stubs/2.7/io.pyi | 101 --- stubs/2.7/itertools.pyi | 81 -- stubs/2.7/json.pyi | 12 - stubs/2.7/logging/__init__.pyi | 239 ------ stubs/2.7/logging/handlers.pyi | 200 ----- stubs/2.7/marshal.pyi | 8 - stubs/2.7/math.pyi | 52 -- stubs/2.7/md5.pyi | 11 - stubs/2.7/numbers.pyi | 77 -- stubs/2.7/operator.pyi | 16 - stubs/2.7/os/__init__.pyi | 184 ---- stubs/2.7/os/path.pyi | 65 -- stubs/2.7/pickle.pyi | 8 - stubs/2.7/pipes.pyi | 13 - stubs/2.7/pprint.pyi | 21 - stubs/2.7/random.pyi | 79 -- stubs/2.7/re.pyi | 63 -- stubs/2.7/resource.pyi | 33 - stubs/2.7/select.pyi | 109 --- stubs/2.7/sha.pyi | 12 - stubs/2.7/shlex.pyi | 27 - stubs/2.7/shutil.pyi | 30 - stubs/2.7/signal.pyi | 60 -- stubs/2.7/simplejson.pyi | 12 - stubs/2.7/smtplib.pyi | 90 -- stubs/2.7/socket.pyi | 388 --------- stubs/2.7/stat.pyi | 58 -- stubs/2.7/string.pyi | 74 -- stubs/2.7/struct.pyi | 28 - stubs/2.7/subprocess.pyi | 79 -- stubs/2.7/sys.pyi | 152 ---- stubs/2.7/tarfile.pyi | 237 ------ stubs/2.7/tempfile.pyi | 42 - stubs/2.7/textwrap.pyi | 33 - stubs/2.7/thread.pyi | 16 - stubs/2.7/threading.pyi | 98 --- stubs/2.7/time.pyi | 48 -- stubs/2.7/traceback.pyi | 16 - stubs/2.7/types.pyi | 20 - stubs/2.7/typing.pyi | 299 ------- stubs/2.7/unicodedata.pyi | 37 - stubs/2.7/urllib.pyi | 134 --- stubs/2.7/urlparse.pyi | 47 - stubs/2.7/uuid.pyi | 36 - stubs/2.7/xml/__init__.py | 0 stubs/2.7/xml/sax/__init__.py | 0 stubs/2.7/xml/sax/handler.pyi | 50 -- stubs/2.7/xml/sax/saxutils.pyi | 58 -- stubs/2.7/xml/sax/xmlreader.pyi | 75 -- stubs/2.7/zlib.pyi | 30 - stubs/3.2/__future__.pyi | 9 - stubs/3.2/_dummy_thread.pyi | 11 - stubs/3.2/_io.pyi | 48 -- stubs/3.2/_locale.pyi | 84 -- stubs/3.2/_posixsubprocess.pyi | 13 - stubs/3.2/_random.pyi | 12 - stubs/3.2/_subprocess.pyi | 38 - stubs/3.2/_thread.pyi | 14 - stubs/3.2/abc.pyi | 5 - stubs/3.2/argparse.pyi | 161 ---- stubs/3.2/array.pyi | 50 -- stubs/3.2/atexit.pyi | 5 - stubs/3.2/base64.pyi | 25 - stubs/3.2/binascii.pyi | 26 - stubs/3.2/builtins.pyi | 801 ------------------ stubs/3.2/bz2.pyi | 0 stubs/3.2/calendar.pyi | 15 - stubs/3.2/cgi.pyi | 1 - stubs/3.2/codecs.pyi | 31 - stubs/3.2/collections.pyi | 112 --- stubs/3.2/contextlib.pyi | 8 - stubs/3.2/copy.pyi | 10 - stubs/3.2/csv.pyi | 77 -- stubs/3.2/datetime.pyi | 221 ----- stubs/3.2/decimal.pyi | 255 ------ stubs/3.2/difflib.pyi | 61 -- stubs/3.2/distutils/__init__.pyi | 0 stubs/3.2/distutils/errors.pyi | 4 - stubs/3.2/distutils/spawn.pyi | 6 - stubs/3.2/doctest.pyi | 9 - stubs/3.2/docutils/__init__.pyi | 1 - stubs/3.2/docutils/examples.pyi | 3 - stubs/3.2/docutils/nodes.pyi | 8 - stubs/3.2/docutils/parsers/__init__.pyi | 1 - stubs/3.2/docutils/parsers/rst/__init__.pyi | 0 stubs/3.2/docutils/parsers/rst/nodes.pyi | 1 - stubs/3.2/docutils/parsers/rst/roles.pyi | 10 - stubs/3.2/docutils/parsers/rst/states.pyi | 5 - stubs/3.2/email/__init__.pyi | 23 - stubs/3.2/email/_header_value_parser.pyi | 397 --------- stubs/3.2/email/_parseaddr.pyi | 44 - stubs/3.2/email/_policybase.pyi | 34 - stubs/3.2/email/base64mime.pyi | 13 - stubs/3.2/email/charset.pyi | 25 - stubs/3.2/email/contentmanager.pyi | 27 - stubs/3.2/email/encoders.pyi | 8 - stubs/3.2/email/errors.pyi | 44 - stubs/3.2/email/feedparser.pyi | 26 - stubs/3.2/email/generator.pyi | 19 - stubs/3.2/email/header.pyi | 29 - stubs/3.2/email/headerregistry.pyi | 133 --- stubs/3.2/email/iterators.pyi | 7 - stubs/3.2/email/message.pyi | 74 -- stubs/3.2/email/mime/__init__.pyi | 4 - stubs/3.2/email/mime/application.pyi | 8 - stubs/3.2/email/mime/audio.pyi | 8 - stubs/3.2/email/mime/base.pyi | 8 - stubs/3.2/email/mime/image.pyi | 8 - stubs/3.2/email/mime/message.pyi | 8 - stubs/3.2/email/mime/multipart.pyi | 8 - stubs/3.2/email/mime/nonmultipart.pyi | 8 - stubs/3.2/email/mime/text.pyi | 8 - stubs/3.2/email/parser.pyi | 29 - stubs/3.2/email/policy.pyi | 26 - stubs/3.2/email/quoprimime.pyi | 18 - stubs/3.2/email/utils.pyi | 22 - stubs/3.2/encodings.pyi | 6 - stubs/3.2/errno.pyi | 132 --- stubs/3.2/fcntl.pyi | 11 - stubs/3.2/fnmatch.pyi | 11 - stubs/3.2/functools.pyi | 12 - stubs/3.2/gc.pyi | 10 - stubs/3.2/getopt.pyi | 19 - stubs/3.2/getpass.pyi | 5 - stubs/3.2/gettext.pyi | 39 - stubs/3.2/glob.pyi | 8 - stubs/3.2/grp.pyi | 13 - stubs/3.2/hashlib.pyi | 25 - stubs/3.2/heapq.pyi | 18 - stubs/3.2/http/__init__.pyi | 0 stubs/3.2/http/client.pyi | 101 --- stubs/3.2/http/cookiejar.pyi | 121 --- stubs/3.2/imp.pyi | 10 - stubs/3.2/importlib.pyi | 9 - stubs/3.2/inspect.pyi | 31 - stubs/3.2/io.pyi | 150 ---- stubs/3.2/itertools.pyi | 57 -- stubs/3.2/json.pyi | 12 - stubs/3.2/linecache.pyi | 5 - stubs/3.2/locale.pyi | 17 - stubs/3.2/logging/__init__.pyi | 239 ------ stubs/3.2/logging/handlers.pyi | 200 ----- stubs/3.2/math.pyi | 53 -- stubs/3.2/msvcrt.pyi | 8 - stubs/3.2/multiprocessing/__init__.pyi | 12 - stubs/3.2/multiprocessing/managers.pyi | 8 - stubs/3.2/multiprocessing/pool.pyi | 6 - stubs/3.2/operator.pyi | 7 - stubs/3.2/os/__init__.pyi | 338 -------- stubs/3.2/os/path.pyi | 61 -- stubs/3.2/pickle.pyi | 12 - stubs/3.2/platform.pyi | 9 - stubs/3.2/posix.pyi | 7 - stubs/3.2/posixpath.pyi | 46 - stubs/3.2/pprint.pyi | 23 - stubs/3.2/pwd.pyi | 18 - stubs/3.2/queue.pyi | 20 - stubs/3.2/random.pyi | 70 -- stubs/3.2/re.pyi | 58 -- stubs/3.2/resource.pyi | 13 - stubs/3.2/select.pyi | 27 - stubs/3.2/shlex.pyi | 36 - stubs/3.2/shutil.pyi | 46 - stubs/3.2/signal.pyi | 51 -- stubs/3.2/smtplib.pyi | 94 -- stubs/3.2/socket.pyi | 387 --------- stubs/3.2/socketserver.pyi | 15 - stubs/3.2/ssl.pyi | 202 ----- stubs/3.2/stat.pyi | 71 -- stubs/3.2/string.pyi | 27 - stubs/3.2/struct.pyi | 30 - stubs/3.2/subprocess.pyi | 71 -- stubs/3.2/sys.pyi | 154 ---- stubs/3.2/sysconfig.pyi | 8 - stubs/3.2/tarfile.pyi | 33 - stubs/3.2/tempfile.pyi | 45 - stubs/3.2/threading.pyi | 56 -- stubs/3.2/time.pyi | 64 -- stubs/3.2/traceback.pyi | 10 - stubs/3.2/types.pyi | 19 - stubs/3.2/typing.pyi | 336 -------- stubs/3.2/unicodedata.pyi | 37 - stubs/3.2/unittest.pyi | 167 ---- stubs/3.2/urllib/__init__.pyi | 0 stubs/3.2/urllib/error.pyi | 6 - stubs/3.2/urllib/parse.pyi | 123 --- stubs/3.2/urllib/request.pyi | 13 - stubs/3.2/uuid.pyi | 73 -- stubs/3.2/warnings.pyi | 33 - stubs/3.2/weakref.pyi | 71 -- stubs/3.2/webbrowser.pyi | 98 --- stubs/3.2/xml/__init__.pyi | 0 stubs/3.2/xml/etree/ElementInclude.pyi | 14 - stubs/3.2/xml/etree/ElementPath.pyi | 28 - stubs/3.2/xml/etree/ElementTree.pyi | 127 --- stubs/3.2/xml/etree/__init__.pyi | 0 stubs/3.2/xml/etree/cElementTree.pyi | 5 - stubs/3.2/zipfile.pyi | 29 - stubs/3.2/zlib.pyi | 32 - stubs/3.3/do-not-remove | 0 stubs/3.3/ipaddress.pyi | 201 ----- stubs/3.4/asyncio/__init__.pyi | 13 - stubs/3.4/asyncio/events.pyi | 172 ---- stubs/3.4/asyncio/futures.pyi | 41 - stubs/3.4/asyncio/queues.pyi | 47 - stubs/3.4/asyncio/tasks.pyi | 38 - stubs/3.4/enum.pyi | 19 - stubs/3.4/pathlib.pyi | 164 ---- stubs/third-party-2.7/Crypto/Cipher/AES.pyi | 0 .../Crypto/Cipher/__init__.pyi | 15 - .../Crypto/Random/__init__.pyi | 5 - .../third-party-2.7/Crypto/Random/random.pyi | 3 - stubs/third-party-2.7/Crypto/__init__.py | 0 stubs/third-party-2.7/OpenSSL/__init__.pyi | 0 stubs/third-party-2.7/OpenSSL/crypto.pyi | 6 - stubs/third-party-2.7/boto/__init__.pyi | 78 -- stubs/third-party-2.7/boto/connection.pyi | 108 --- stubs/third-party-2.7/boto/ec2/__init__.pyi | 11 - .../third-party-2.7/boto/ec2/elb/__init__.pyi | 43 - stubs/third-party-2.7/concurrent/__init__.pyi | 0 .../concurrent/futures/__init__.pyi | 35 - stubs/third-party-2.7/croniter.pyi | 27 - .../third-party-2.7/fb303/FacebookService.pyi | 301 ------- stubs/third-party-2.7/fb303/__init__.pyi | 0 stubs/third-party-2.7/gflags.pyi | 216 ----- stubs/third-party-2.7/google/__init__.pyi | 0 .../google/protobuf/__init__.pyi | 0 .../google/protobuf/descriptor.pyi | 163 ---- .../google/protobuf/descriptor_pb2.pyi | 2 - .../google/protobuf/internal/__init__.pyi | 0 .../google/protobuf/internal/decoder.pyi | 34 - .../google/protobuf/internal/encoder.pyi | 38 - .../protobuf/internal/enum_type_wrapper.pyi | 11 - .../google/protobuf/internal/wire_format.pyi | 54 -- .../google/protobuf/message.pyi | 36 - .../google/protobuf/reflection.pyi | 10 - stubs/third-party-2.7/kazoo/__init__.pyi | 4 - stubs/third-party-2.7/kazoo/client.pyi | 100 --- stubs/third-party-2.7/kazoo/exceptions.pyi | 62 -- .../third-party-2.7/kazoo/recipe/__init__.pyi | 4 - .../third-party-2.7/kazoo/recipe/watchers.pyi | 25 - stubs/third-party-2.7/pycurl.pyi | 81 -- stubs/third-party-2.7/redis/__init__.pyi | 28 - stubs/third-party-2.7/redis/client.pyi | 293 ------- stubs/third-party-2.7/redis/connection.pyi | 135 --- stubs/third-party-2.7/redis/exceptions.pyi | 21 - stubs/third-party-2.7/redis/utils.pyi | 12 - stubs/third-party-2.7/requests/__init__.pyi | 38 - stubs/third-party-2.7/requests/adapters.pyi | 69 -- stubs/third-party-2.7/requests/api.pyi | 14 - stubs/third-party-2.7/requests/auth.pyi | 41 - stubs/third-party-2.7/requests/compat.pyi | 6 - stubs/third-party-2.7/requests/cookies.pyi | 61 -- stubs/third-party-2.7/requests/exceptions.pyi | 26 - stubs/third-party-2.7/requests/hooks.pyi | 8 - stubs/third-party-2.7/requests/models.pyi | 133 --- .../requests/packages/__init__.pyi | 8 - .../requests/packages/urllib3/__init__.pyi | 12 - .../packages/urllib3/_collections.pyi | 51 -- .../requests/packages/urllib3/connection.pyi | 48 -- .../packages/urllib3/connectionpool.pyi | 87 -- .../packages/urllib3/contrib/__init__.pyi | 4 - .../requests/packages/urllib3/exceptions.pyi | 54 -- .../requests/packages/urllib3/fields.pyi | 16 - .../requests/packages/urllib3/filepost.pyi | 19 - .../packages/urllib3/packages/__init__.pyi | 4 - .../ssl_match_hostname/_implementation.pyi | 7 - .../requests/packages/urllib3/poolmanager.pyi | 31 - .../requests/packages/urllib3/request.pyi | 13 - .../requests/packages/urllib3/response.pyi | 58 -- .../packages/urllib3/util/__init__.pyi | 7 - .../packages/urllib3/util/connection.pyi | 11 - .../packages/urllib3/util/request.pyi | 12 - .../packages/urllib3/util/response.pyi | 5 - .../requests/packages/urllib3/util/retry.pyi | 36 - .../packages/urllib3/util/timeout.pyi | 24 - .../requests/packages/urllib3/util/url.pyi | 26 - stubs/third-party-2.7/requests/sessions.pyi | 92 -- .../third-party-2.7/requests/status_codes.pyi | 8 - stubs/third-party-2.7/requests/structures.pyi | 21 - stubs/third-party-2.7/requests/utils.pyi | 52 -- stubs/third-party-2.7/routes/__init__.pyi | 19 - stubs/third-party-2.7/routes/mapper.pyi | 70 -- stubs/third-party-2.7/routes/util.pyi | 24 - stubs/third-party-2.7/scribe/__init__.pyi | 0 stubs/third-party-2.7/scribe/scribe.pyi | 41 - stubs/third-party-2.7/scribe/ttypes.pyi | 22 - stubs/third-party-2.7/sqlalchemy/__init__.pyi | 113 --- .../sqlalchemy/databases/__init__.pyi | 12 - .../sqlalchemy/databases/mysql.pyi | 1 - .../sqlalchemy/dialects/__init__.pyi | 12 - .../sqlalchemy/dialects/mysql/__init__.pyi | 42 - .../sqlalchemy/dialects/mysql/base.pyi | 350 -------- .../sqlalchemy/engine/__init__.pyi | 6 - .../sqlalchemy/engine/strategies.pyi | 39 - .../third-party-2.7/sqlalchemy/engine/url.pyi | 27 - stubs/third-party-2.7/sqlalchemy/exc.pyi | 77 -- .../third-party-2.7/sqlalchemy/inspection.pyi | 5 - .../sqlalchemy/orm/__init__.pyi | 96 --- .../sqlalchemy/orm/session.pyi | 93 -- stubs/third-party-2.7/sqlalchemy/pool.pyi | 109 --- stubs/third-party-2.7/sqlalchemy/schema.pyi | 51 -- .../sqlalchemy/sql/__init__.pyi | 66 -- .../sqlalchemy/sql/expression.pyi | 67 -- .../sqlalchemy/sql/visitors.pyi | 33 - stubs/third-party-2.7/sqlalchemy/types.pyi | 51 -- .../sqlalchemy/util/__init__.pyi | 133 --- .../sqlalchemy/util/_collections.pyi | 214 ----- .../sqlalchemy/util/compat.pyi | 73 -- .../sqlalchemy/util/deprecations.pyi | 13 - .../sqlalchemy/util/langhelpers.pyi | 137 --- stubs/third-party-2.7/thrift/Thrift.pyi | 55 -- stubs/third-party-2.7/thrift/__init__.pyi | 0 .../thrift/protocol/TBinaryProtocol.pyi | 63 -- .../thrift/protocol/TProtocol.pyi | 77 -- .../thrift/protocol/__init__.pyi | 11 - .../thrift/transport/TSocket.pyi | 30 - .../thrift/transport/TTransport.pyi | 111 --- .../thrift/transport/__init__.pyi | 9 - stubs/third-party-2.7/tornado/__init__.pyi | 0 stubs/third-party-2.7/tornado/concurrent.pyi | 47 - stubs/third-party-2.7/tornado/gen.pyi | 113 --- stubs/third-party-2.7/tornado/httpclient.pyi | 112 --- stubs/third-party-2.7/tornado/httpserver.pyi | 45 - stubs/third-party-2.7/tornado/httputil.pyi | 93 -- stubs/third-party-2.7/tornado/ioloop.pyi | 88 -- stubs/third-party-2.7/tornado/netutil.pyi | 49 -- stubs/third-party-2.7/tornado/tcpserver.pyi | 21 - stubs/third-party-2.7/tornado/util.pyi | 50 -- stubs/third-party-2.7/tornado/web.pyi | 261 ------ stubs/third-party-2.7/yaml/__init__.pyi | 51 -- stubs/third-party-2.7/yaml/composer.pyi | 21 - stubs/third-party-2.7/yaml/constructor.pyi | 70 -- stubs/third-party-2.7/yaml/dumper.pyi | 17 - stubs/third-party-2.7/yaml/emitter.pyi | 110 --- stubs/third-party-2.7/yaml/error.pyi | 25 - stubs/third-party-2.7/yaml/events.pyi | 66 -- stubs/third-party-2.7/yaml/loader.pyi | 19 - stubs/third-party-2.7/yaml/nodes.pyi | 35 - stubs/third-party-2.7/yaml/parser.pyi | 48 -- stubs/third-party-2.7/yaml/reader.pyi | 38 - stubs/third-party-2.7/yaml/representer.pyi | 56 -- stubs/third-party-2.7/yaml/resolver.pyi | 26 - stubs/third-party-2.7/yaml/scanner.pyi | 100 --- stubs/third-party-2.7/yaml/serializer.pyi | 27 - stubs/third-party-2.7/yaml/tokens.pyi | 97 --- stubs/third-party-3.2/requests/__init__.pyi | 38 - stubs/third-party-3.2/requests/adapters.pyi | 69 -- stubs/third-party-3.2/requests/api.pyi | 14 - stubs/third-party-3.2/requests/auth.pyi | 41 - stubs/third-party-3.2/requests/compat.pyi | 6 - stubs/third-party-3.2/requests/cookies.pyi | 65 -- stubs/third-party-3.2/requests/exceptions.pyi | 26 - stubs/third-party-3.2/requests/hooks.pyi | 8 - stubs/third-party-3.2/requests/models.pyi | 134 --- .../requests/packages/__init__.pyi | 8 - .../requests/packages/urllib3/__init__.pyi | 35 - .../packages/urllib3/_collections.pyi | 51 -- .../requests/packages/urllib3/connection.pyi | 64 -- .../packages/urllib3/connectionpool.pyi | 87 -- .../packages/urllib3/contrib/__init__.pyi | 4 - .../requests/packages/urllib3/exceptions.pyi | 54 -- .../requests/packages/urllib3/fields.pyi | 16 - .../requests/packages/urllib3/filepost.pyi | 19 - .../packages/urllib3/packages/__init__.pyi | 4 - .../packages/ssl_match_hostname/__init__.pyi | 8 - .../ssl_match_hostname/_implementation.pyi | 7 - .../requests/packages/urllib3/poolmanager.pyi | 31 - .../requests/packages/urllib3/request.pyi | 13 - .../requests/packages/urllib3/response.pyi | 60 -- .../packages/urllib3/util/__init__.pyi | 29 - .../packages/urllib3/util/connection.pyi | 11 - .../packages/urllib3/util/request.pyi | 12 - .../packages/urllib3/util/response.pyi | 5 - .../requests/packages/urllib3/util/retry.pyi | 36 - .../requests/packages/urllib3/util/ssl_.pyi | 24 - .../packages/urllib3/util/timeout.pyi | 24 - .../requests/packages/urllib3/util/url.pyi | 26 - stubs/third-party-3.2/requests/sessions.pyi | 92 -- .../third-party-3.2/requests/status_codes.pyi | 8 - stubs/third-party-3.2/requests/structures.pyi | 21 - stubs/third-party-3.2/requests/utils.pyi | 52 -- travis.sh | 11 +- typeshed | 1 + 430 files changed, 25 insertions(+), 22847 deletions(-) create mode 100644 .gitmodules delete mode 100644 stubs/2.7/Queue.pyi delete mode 100644 stubs/2.7/StringIO.pyi delete mode 100644 stubs/2.7/UserDict.pyi delete mode 100644 stubs/2.7/__future__.pyi delete mode 100644 stubs/2.7/_random.pyi delete mode 100644 stubs/2.7/abc.pyi delete mode 100644 stubs/2.7/argparse.pyi delete mode 100644 stubs/2.7/atexit.pyi delete mode 100644 stubs/2.7/base64.pyi delete mode 100644 stubs/2.7/binascii.pyi delete mode 100644 stubs/2.7/builtins.pyi delete mode 100644 stubs/2.7/cStringIO.pyi delete mode 100644 stubs/2.7/codecs.pyi delete mode 100644 stubs/2.7/collections.pyi delete mode 100644 stubs/2.7/compileall.pyi delete mode 100644 stubs/2.7/contextlib.pyi delete mode 100644 stubs/2.7/copy.pyi delete mode 100644 stubs/2.7/csv.pyi delete mode 100644 stubs/2.7/datetime.pyi delete mode 100644 stubs/2.7/difflib.pyi delete mode 100644 stubs/2.7/distutils/__init__.pyi delete mode 100644 stubs/2.7/distutils/version.pyi delete mode 100644 stubs/2.7/email/MIMEText.pyi delete mode 100644 stubs/2.7/email/__init__.pyi delete mode 100644 stubs/2.7/email/mime/__init__.pyi delete mode 100644 stubs/2.7/email/mime/base.pyi delete mode 100644 stubs/2.7/email/mime/multipart.pyi delete mode 100644 stubs/2.7/email/mime/nonmultipart.pyi delete mode 100644 stubs/2.7/email/mime/text.pyi delete mode 100644 stubs/2.7/errno.pyi delete mode 100644 stubs/2.7/fcntl.pyi delete mode 100644 stubs/2.7/fnmatch.pyi delete mode 100644 stubs/2.7/functools.pyi delete mode 100644 stubs/2.7/gc.pyi delete mode 100644 stubs/2.7/getpass.pyi delete mode 100644 stubs/2.7/gettext.pyi delete mode 100644 stubs/2.7/glob.pyi delete mode 100644 stubs/2.7/gzip.pyi delete mode 100644 stubs/2.7/hashlib.pyi delete mode 100644 stubs/2.7/hmac.pyi delete mode 100644 stubs/2.7/htmlentitydefs.pyi delete mode 100644 stubs/2.7/imp.pyi delete mode 100644 stubs/2.7/importlib.pyi delete mode 100644 stubs/2.7/inspect.pyi delete mode 100644 stubs/2.7/io.pyi delete mode 100644 stubs/2.7/itertools.pyi delete mode 100644 stubs/2.7/json.pyi delete mode 100644 stubs/2.7/logging/__init__.pyi delete mode 100644 stubs/2.7/logging/handlers.pyi delete mode 100644 stubs/2.7/marshal.pyi delete mode 100644 stubs/2.7/math.pyi delete mode 100644 stubs/2.7/md5.pyi delete mode 100644 stubs/2.7/numbers.pyi delete mode 100644 stubs/2.7/operator.pyi delete mode 100644 stubs/2.7/os/__init__.pyi delete mode 100644 stubs/2.7/os/path.pyi delete mode 100644 stubs/2.7/pickle.pyi delete mode 100644 stubs/2.7/pipes.pyi delete mode 100644 stubs/2.7/pprint.pyi delete mode 100644 stubs/2.7/random.pyi delete mode 100644 stubs/2.7/re.pyi delete mode 100644 stubs/2.7/resource.pyi delete mode 100644 stubs/2.7/select.pyi delete mode 100644 stubs/2.7/sha.pyi delete mode 100644 stubs/2.7/shlex.pyi delete mode 100644 stubs/2.7/shutil.pyi delete mode 100644 stubs/2.7/signal.pyi delete mode 100644 stubs/2.7/simplejson.pyi delete mode 100644 stubs/2.7/smtplib.pyi delete mode 100644 stubs/2.7/socket.pyi delete mode 100644 stubs/2.7/stat.pyi delete mode 100644 stubs/2.7/string.pyi delete mode 100644 stubs/2.7/struct.pyi delete mode 100644 stubs/2.7/subprocess.pyi delete mode 100644 stubs/2.7/sys.pyi delete mode 100644 stubs/2.7/tarfile.pyi delete mode 100644 stubs/2.7/tempfile.pyi delete mode 100644 stubs/2.7/textwrap.pyi delete mode 100644 stubs/2.7/thread.pyi delete mode 100644 stubs/2.7/threading.pyi delete mode 100644 stubs/2.7/time.pyi delete mode 100644 stubs/2.7/traceback.pyi delete mode 100644 stubs/2.7/types.pyi delete mode 100644 stubs/2.7/typing.pyi delete mode 100644 stubs/2.7/unicodedata.pyi delete mode 100644 stubs/2.7/urllib.pyi delete mode 100644 stubs/2.7/urlparse.pyi delete mode 100644 stubs/2.7/uuid.pyi delete mode 100644 stubs/2.7/xml/__init__.py delete mode 100644 stubs/2.7/xml/sax/__init__.py delete mode 100644 stubs/2.7/xml/sax/handler.pyi delete mode 100644 stubs/2.7/xml/sax/saxutils.pyi delete mode 100644 stubs/2.7/xml/sax/xmlreader.pyi delete mode 100644 stubs/2.7/zlib.pyi delete mode 100644 stubs/3.2/__future__.pyi delete mode 100644 stubs/3.2/_dummy_thread.pyi delete mode 100644 stubs/3.2/_io.pyi delete mode 100644 stubs/3.2/_locale.pyi delete mode 100644 stubs/3.2/_posixsubprocess.pyi delete mode 100644 stubs/3.2/_random.pyi delete mode 100644 stubs/3.2/_subprocess.pyi delete mode 100644 stubs/3.2/_thread.pyi delete mode 100644 stubs/3.2/abc.pyi delete mode 100644 stubs/3.2/argparse.pyi delete mode 100644 stubs/3.2/array.pyi delete mode 100644 stubs/3.2/atexit.pyi delete mode 100644 stubs/3.2/base64.pyi delete mode 100644 stubs/3.2/binascii.pyi delete mode 100644 stubs/3.2/builtins.pyi delete mode 100644 stubs/3.2/bz2.pyi delete mode 100644 stubs/3.2/calendar.pyi delete mode 100644 stubs/3.2/cgi.pyi delete mode 100644 stubs/3.2/codecs.pyi delete mode 100644 stubs/3.2/collections.pyi delete mode 100644 stubs/3.2/contextlib.pyi delete mode 100644 stubs/3.2/copy.pyi delete mode 100644 stubs/3.2/csv.pyi delete mode 100644 stubs/3.2/datetime.pyi delete mode 100644 stubs/3.2/decimal.pyi delete mode 100644 stubs/3.2/difflib.pyi delete mode 100644 stubs/3.2/distutils/__init__.pyi delete mode 100644 stubs/3.2/distutils/errors.pyi delete mode 100644 stubs/3.2/distutils/spawn.pyi delete mode 100644 stubs/3.2/doctest.pyi delete mode 100644 stubs/3.2/docutils/__init__.pyi delete mode 100644 stubs/3.2/docutils/examples.pyi delete mode 100644 stubs/3.2/docutils/nodes.pyi delete mode 100644 stubs/3.2/docutils/parsers/__init__.pyi delete mode 100644 stubs/3.2/docutils/parsers/rst/__init__.pyi delete mode 100644 stubs/3.2/docutils/parsers/rst/nodes.pyi delete mode 100644 stubs/3.2/docutils/parsers/rst/roles.pyi delete mode 100644 stubs/3.2/docutils/parsers/rst/states.pyi delete mode 100644 stubs/3.2/email/__init__.pyi delete mode 100644 stubs/3.2/email/_header_value_parser.pyi delete mode 100644 stubs/3.2/email/_parseaddr.pyi delete mode 100644 stubs/3.2/email/_policybase.pyi delete mode 100644 stubs/3.2/email/base64mime.pyi delete mode 100644 stubs/3.2/email/charset.pyi delete mode 100644 stubs/3.2/email/contentmanager.pyi delete mode 100644 stubs/3.2/email/encoders.pyi delete mode 100644 stubs/3.2/email/errors.pyi delete mode 100644 stubs/3.2/email/feedparser.pyi delete mode 100644 stubs/3.2/email/generator.pyi delete mode 100644 stubs/3.2/email/header.pyi delete mode 100644 stubs/3.2/email/headerregistry.pyi delete mode 100644 stubs/3.2/email/iterators.pyi delete mode 100644 stubs/3.2/email/message.pyi delete mode 100644 stubs/3.2/email/mime/__init__.pyi delete mode 100644 stubs/3.2/email/mime/application.pyi delete mode 100644 stubs/3.2/email/mime/audio.pyi delete mode 100644 stubs/3.2/email/mime/base.pyi delete mode 100644 stubs/3.2/email/mime/image.pyi delete mode 100644 stubs/3.2/email/mime/message.pyi delete mode 100644 stubs/3.2/email/mime/multipart.pyi delete mode 100644 stubs/3.2/email/mime/nonmultipart.pyi delete mode 100644 stubs/3.2/email/mime/text.pyi delete mode 100644 stubs/3.2/email/parser.pyi delete mode 100644 stubs/3.2/email/policy.pyi delete mode 100644 stubs/3.2/email/quoprimime.pyi delete mode 100644 stubs/3.2/email/utils.pyi delete mode 100644 stubs/3.2/encodings.pyi delete mode 100644 stubs/3.2/errno.pyi delete mode 100644 stubs/3.2/fcntl.pyi delete mode 100644 stubs/3.2/fnmatch.pyi delete mode 100644 stubs/3.2/functools.pyi delete mode 100644 stubs/3.2/gc.pyi delete mode 100644 stubs/3.2/getopt.pyi delete mode 100644 stubs/3.2/getpass.pyi delete mode 100644 stubs/3.2/gettext.pyi delete mode 100644 stubs/3.2/glob.pyi delete mode 100644 stubs/3.2/grp.pyi delete mode 100644 stubs/3.2/hashlib.pyi delete mode 100644 stubs/3.2/heapq.pyi delete mode 100644 stubs/3.2/http/__init__.pyi delete mode 100644 stubs/3.2/http/client.pyi delete mode 100644 stubs/3.2/http/cookiejar.pyi delete mode 100644 stubs/3.2/imp.pyi delete mode 100644 stubs/3.2/importlib.pyi delete mode 100644 stubs/3.2/inspect.pyi delete mode 100644 stubs/3.2/io.pyi delete mode 100644 stubs/3.2/itertools.pyi delete mode 100644 stubs/3.2/json.pyi delete mode 100644 stubs/3.2/linecache.pyi delete mode 100644 stubs/3.2/locale.pyi delete mode 100644 stubs/3.2/logging/__init__.pyi delete mode 100644 stubs/3.2/logging/handlers.pyi delete mode 100644 stubs/3.2/math.pyi delete mode 100644 stubs/3.2/msvcrt.pyi delete mode 100644 stubs/3.2/multiprocessing/__init__.pyi delete mode 100644 stubs/3.2/multiprocessing/managers.pyi delete mode 100644 stubs/3.2/multiprocessing/pool.pyi delete mode 100644 stubs/3.2/operator.pyi delete mode 100644 stubs/3.2/os/__init__.pyi delete mode 100644 stubs/3.2/os/path.pyi delete mode 100644 stubs/3.2/pickle.pyi delete mode 100644 stubs/3.2/platform.pyi delete mode 100644 stubs/3.2/posix.pyi delete mode 100644 stubs/3.2/posixpath.pyi delete mode 100644 stubs/3.2/pprint.pyi delete mode 100644 stubs/3.2/pwd.pyi delete mode 100644 stubs/3.2/queue.pyi delete mode 100644 stubs/3.2/random.pyi delete mode 100644 stubs/3.2/re.pyi delete mode 100644 stubs/3.2/resource.pyi delete mode 100644 stubs/3.2/select.pyi delete mode 100644 stubs/3.2/shlex.pyi delete mode 100644 stubs/3.2/shutil.pyi delete mode 100644 stubs/3.2/signal.pyi delete mode 100644 stubs/3.2/smtplib.pyi delete mode 100644 stubs/3.2/socket.pyi delete mode 100644 stubs/3.2/socketserver.pyi delete mode 100644 stubs/3.2/ssl.pyi delete mode 100644 stubs/3.2/stat.pyi delete mode 100644 stubs/3.2/string.pyi delete mode 100644 stubs/3.2/struct.pyi delete mode 100644 stubs/3.2/subprocess.pyi delete mode 100644 stubs/3.2/sys.pyi delete mode 100644 stubs/3.2/sysconfig.pyi delete mode 100644 stubs/3.2/tarfile.pyi delete mode 100644 stubs/3.2/tempfile.pyi delete mode 100644 stubs/3.2/threading.pyi delete mode 100644 stubs/3.2/time.pyi delete mode 100644 stubs/3.2/traceback.pyi delete mode 100644 stubs/3.2/types.pyi delete mode 100644 stubs/3.2/typing.pyi delete mode 100644 stubs/3.2/unicodedata.pyi delete mode 100644 stubs/3.2/unittest.pyi delete mode 100644 stubs/3.2/urllib/__init__.pyi delete mode 100644 stubs/3.2/urllib/error.pyi delete mode 100644 stubs/3.2/urllib/parse.pyi delete mode 100644 stubs/3.2/urllib/request.pyi delete mode 100644 stubs/3.2/uuid.pyi delete mode 100644 stubs/3.2/warnings.pyi delete mode 100644 stubs/3.2/weakref.pyi delete mode 100644 stubs/3.2/webbrowser.pyi delete mode 100644 stubs/3.2/xml/__init__.pyi delete mode 100644 stubs/3.2/xml/etree/ElementInclude.pyi delete mode 100644 stubs/3.2/xml/etree/ElementPath.pyi delete mode 100644 stubs/3.2/xml/etree/ElementTree.pyi delete mode 100644 stubs/3.2/xml/etree/__init__.pyi delete mode 100644 stubs/3.2/xml/etree/cElementTree.pyi delete mode 100644 stubs/3.2/zipfile.pyi delete mode 100644 stubs/3.2/zlib.pyi delete mode 100644 stubs/3.3/do-not-remove delete mode 100644 stubs/3.3/ipaddress.pyi delete mode 100644 stubs/3.4/asyncio/__init__.pyi delete mode 100644 stubs/3.4/asyncio/events.pyi delete mode 100644 stubs/3.4/asyncio/futures.pyi delete mode 100644 stubs/3.4/asyncio/queues.pyi delete mode 100644 stubs/3.4/asyncio/tasks.pyi delete mode 100644 stubs/3.4/enum.pyi delete mode 100644 stubs/3.4/pathlib.pyi delete mode 100644 stubs/third-party-2.7/Crypto/Cipher/AES.pyi delete mode 100644 stubs/third-party-2.7/Crypto/Cipher/__init__.pyi delete mode 100644 stubs/third-party-2.7/Crypto/Random/__init__.pyi delete mode 100644 stubs/third-party-2.7/Crypto/Random/random.pyi delete mode 100644 stubs/third-party-2.7/Crypto/__init__.py delete mode 100644 stubs/third-party-2.7/OpenSSL/__init__.pyi delete mode 100644 stubs/third-party-2.7/OpenSSL/crypto.pyi delete mode 100644 stubs/third-party-2.7/boto/__init__.pyi delete mode 100644 stubs/third-party-2.7/boto/connection.pyi delete mode 100644 stubs/third-party-2.7/boto/ec2/__init__.pyi delete mode 100644 stubs/third-party-2.7/boto/ec2/elb/__init__.pyi delete mode 100644 stubs/third-party-2.7/concurrent/__init__.pyi delete mode 100644 stubs/third-party-2.7/concurrent/futures/__init__.pyi delete mode 100644 stubs/third-party-2.7/croniter.pyi delete mode 100644 stubs/third-party-2.7/fb303/FacebookService.pyi delete mode 100644 stubs/third-party-2.7/fb303/__init__.pyi delete mode 100644 stubs/third-party-2.7/gflags.pyi delete mode 100644 stubs/third-party-2.7/google/__init__.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/__init__.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/descriptor.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/descriptor_pb2.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/internal/__init__.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/internal/decoder.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/internal/encoder.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/internal/enum_type_wrapper.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/internal/wire_format.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/message.pyi delete mode 100644 stubs/third-party-2.7/google/protobuf/reflection.pyi delete mode 100644 stubs/third-party-2.7/kazoo/__init__.pyi delete mode 100644 stubs/third-party-2.7/kazoo/client.pyi delete mode 100644 stubs/third-party-2.7/kazoo/exceptions.pyi delete mode 100644 stubs/third-party-2.7/kazoo/recipe/__init__.pyi delete mode 100644 stubs/third-party-2.7/kazoo/recipe/watchers.pyi delete mode 100644 stubs/third-party-2.7/pycurl.pyi delete mode 100644 stubs/third-party-2.7/redis/__init__.pyi delete mode 100644 stubs/third-party-2.7/redis/client.pyi delete mode 100644 stubs/third-party-2.7/redis/connection.pyi delete mode 100644 stubs/third-party-2.7/redis/exceptions.pyi delete mode 100644 stubs/third-party-2.7/redis/utils.pyi delete mode 100644 stubs/third-party-2.7/requests/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/adapters.pyi delete mode 100644 stubs/third-party-2.7/requests/api.pyi delete mode 100644 stubs/third-party-2.7/requests/auth.pyi delete mode 100644 stubs/third-party-2.7/requests/compat.pyi delete mode 100644 stubs/third-party-2.7/requests/cookies.pyi delete mode 100644 stubs/third-party-2.7/requests/exceptions.pyi delete mode 100644 stubs/third-party-2.7/requests/hooks.pyi delete mode 100644 stubs/third-party-2.7/requests/models.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/_collections.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/connection.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/connectionpool.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/contrib/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/exceptions.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/fields.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/filepost.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/packages/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/poolmanager.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/request.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/response.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/__init__.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/connection.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/request.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/response.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/retry.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/timeout.pyi delete mode 100644 stubs/third-party-2.7/requests/packages/urllib3/util/url.pyi delete mode 100644 stubs/third-party-2.7/requests/sessions.pyi delete mode 100644 stubs/third-party-2.7/requests/status_codes.pyi delete mode 100644 stubs/third-party-2.7/requests/structures.pyi delete mode 100644 stubs/third-party-2.7/requests/utils.pyi delete mode 100644 stubs/third-party-2.7/routes/__init__.pyi delete mode 100644 stubs/third-party-2.7/routes/mapper.pyi delete mode 100644 stubs/third-party-2.7/routes/util.pyi delete mode 100644 stubs/third-party-2.7/scribe/__init__.pyi delete mode 100644 stubs/third-party-2.7/scribe/scribe.pyi delete mode 100644 stubs/third-party-2.7/scribe/ttypes.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/databases/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/databases/mysql.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/dialects/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/dialects/mysql/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/dialects/mysql/base.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/engine/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/engine/strategies.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/engine/url.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/exc.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/inspection.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/orm/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/orm/session.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/pool.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/schema.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/sql/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/sql/expression.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/sql/visitors.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/types.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/util/__init__.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/util/_collections.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/util/compat.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/util/deprecations.pyi delete mode 100644 stubs/third-party-2.7/sqlalchemy/util/langhelpers.pyi delete mode 100644 stubs/third-party-2.7/thrift/Thrift.pyi delete mode 100644 stubs/third-party-2.7/thrift/__init__.pyi delete mode 100644 stubs/third-party-2.7/thrift/protocol/TBinaryProtocol.pyi delete mode 100644 stubs/third-party-2.7/thrift/protocol/TProtocol.pyi delete mode 100644 stubs/third-party-2.7/thrift/protocol/__init__.pyi delete mode 100644 stubs/third-party-2.7/thrift/transport/TSocket.pyi delete mode 100644 stubs/third-party-2.7/thrift/transport/TTransport.pyi delete mode 100644 stubs/third-party-2.7/thrift/transport/__init__.pyi delete mode 100644 stubs/third-party-2.7/tornado/__init__.pyi delete mode 100644 stubs/third-party-2.7/tornado/concurrent.pyi delete mode 100644 stubs/third-party-2.7/tornado/gen.pyi delete mode 100644 stubs/third-party-2.7/tornado/httpclient.pyi delete mode 100644 stubs/third-party-2.7/tornado/httpserver.pyi delete mode 100644 stubs/third-party-2.7/tornado/httputil.pyi delete mode 100644 stubs/third-party-2.7/tornado/ioloop.pyi delete mode 100644 stubs/third-party-2.7/tornado/netutil.pyi delete mode 100644 stubs/third-party-2.7/tornado/tcpserver.pyi delete mode 100644 stubs/third-party-2.7/tornado/util.pyi delete mode 100644 stubs/third-party-2.7/tornado/web.pyi delete mode 100644 stubs/third-party-2.7/yaml/__init__.pyi delete mode 100644 stubs/third-party-2.7/yaml/composer.pyi delete mode 100644 stubs/third-party-2.7/yaml/constructor.pyi delete mode 100644 stubs/third-party-2.7/yaml/dumper.pyi delete mode 100644 stubs/third-party-2.7/yaml/emitter.pyi delete mode 100644 stubs/third-party-2.7/yaml/error.pyi delete mode 100644 stubs/third-party-2.7/yaml/events.pyi delete mode 100644 stubs/third-party-2.7/yaml/loader.pyi delete mode 100644 stubs/third-party-2.7/yaml/nodes.pyi delete mode 100644 stubs/third-party-2.7/yaml/parser.pyi delete mode 100644 stubs/third-party-2.7/yaml/reader.pyi delete mode 100644 stubs/third-party-2.7/yaml/representer.pyi delete mode 100644 stubs/third-party-2.7/yaml/resolver.pyi delete mode 100644 stubs/third-party-2.7/yaml/scanner.pyi delete mode 100644 stubs/third-party-2.7/yaml/serializer.pyi delete mode 100644 stubs/third-party-2.7/yaml/tokens.pyi delete mode 100644 stubs/third-party-3.2/requests/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/adapters.pyi delete mode 100644 stubs/third-party-3.2/requests/api.pyi delete mode 100644 stubs/third-party-3.2/requests/auth.pyi delete mode 100644 stubs/third-party-3.2/requests/compat.pyi delete mode 100644 stubs/third-party-3.2/requests/cookies.pyi delete mode 100644 stubs/third-party-3.2/requests/exceptions.pyi delete mode 100644 stubs/third-party-3.2/requests/hooks.pyi delete mode 100644 stubs/third-party-3.2/requests/models.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/_collections.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/connection.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/connectionpool.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/contrib/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/exceptions.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/fields.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/filepost.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/packages/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/poolmanager.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/request.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/response.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/__init__.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/connection.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/request.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/response.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/retry.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/ssl_.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/timeout.pyi delete mode 100644 stubs/third-party-3.2/requests/packages/urllib3/util/url.pyi delete mode 100644 stubs/third-party-3.2/requests/sessions.pyi delete mode 100644 stubs/third-party-3.2/requests/status_codes.pyi delete mode 100644 stubs/third-party-3.2/requests/structures.pyi delete mode 100644 stubs/third-party-3.2/requests/utils.pyi create mode 160000 typeshed diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..6b366adc166c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "typeshed"] + path = typeshed + url = http://github.com/python/typeshed diff --git a/mypy/build.py b/mypy/build.py index c620ca838daf..1797d93b0f22 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -199,33 +199,28 @@ def default_lib_path(data_dir: str, target: int, pyversion: Tuple[int, int], if path_env is not None: path[:0] = path_env.split(os.pathsep) - # Add library stubs directory. By convention, they are stored in the - # stubs/x.y directory of the mypy installation. - version_dir = '3.2' - third_party_dir = 'third-party-3.2' - if pyversion[0] < 3: - version_dir = '2.7' - third_party_dir = 'third-party-2.7' - path.append(os.path.join(data_dir, 'stubs', version_dir)) - path.append(os.path.join(data_dir, 'stubs', third_party_dir)) - path.append(os.path.join(data_dir, 'stubs-auto', version_dir)) - if sys.version_info.major == 3: - # Add additional stub directories. - versions = ['3.3', '3.4', '3.5', '3.6'] - for v in versions: - stubdir = os.path.join(data_dir, 'stubs', v) + auto = os.path.join(data_dir, 'stubs-auto') + if os.path.isdir(auto): + data_dir = auto + + # We allow a module for e.g. version 3.5 to be in 3.4/. The assumption + # is that a module added with 3.4 will still be present in Python 3.5. + versions = ["%d.%d" % (pyversion[0], minor) + for minor in reversed(range(pyversion[1] + 1))] + # E.g. for Python 3.5, try 2and3/, then 3/, then 3.5/, then 3.4/, 3.3/, ... + for v in ['2and3', str(pyversion[0])] + versions: + for lib_type in ['stdlib', 'builtins', 'third-party']: + stubdir = os.path.join(data_dir, 'typeshed', lib_type, v) if os.path.isdir(stubdir): path.append(stubdir) - third_party_stubdir = os.path.join(data_dir, 'stubs', 'third-party-' + v) - if os.path.isdir(third_party_stubdir): - path.append(third_party_stubdir) - # Add fallback path that can be used if we have a broken installation. if sys.platform != 'win32': path.append('/usr/local/lib/mypy') # Contents of Python's sys.path go last, to prefer the stubs + # TODO: To more closely model what Python actually does, builtins should + # go first, then sys.path, then anything in stdlib and third_party. if python_path: path.extend(sys.path) diff --git a/stubs/2.7/Queue.pyi b/stubs/2.7/Queue.pyi deleted file mode 100644 index 2246a7c858e1..000000000000 --- a/stubs/2.7/Queue.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# Stubs for Queue (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Empty(Exception): ... -class Full(Exception): ... - -class Queue: - maxsize = ... # type: Any - mutex = ... # type: Any - not_empty = ... # type: Any - not_full = ... # type: Any - all_tasks_done = ... # type: Any - unfinished_tasks = ... # type: Any - def __init__(self, maxsize: int = 0) -> None: ... - def task_done(self) -> None: ... - def join(self) -> None: ... - def qsize(self) -> int: ... - def empty(self) -> bool: ... - def full(self) -> bool: ... - def put(self, item: Any, block: bool = ..., timeout: float = None) -> None: ... - def put_nowait(self, item) -> None: ... - def get(self, block: bool = ..., timeout: float = None) -> Any: ... - def get_nowait(self) -> Any: ... - -class PriorityQueue(Queue): ... -class LifoQueue(Queue): ... diff --git a/stubs/2.7/StringIO.pyi b/stubs/2.7/StringIO.pyi deleted file mode 100644 index 34da578a8dcd..000000000000 --- a/stubs/2.7/StringIO.pyi +++ /dev/null @@ -1,28 +0,0 @@ -# Stubs for StringIO (Python 2) - -from typing import Any, IO, AnyStr, Iterator, Iterable, Generic - -class StringIO(IO[AnyStr], Generic[AnyStr]): - closed = ... # type: bool - softspace = ... # type: int - def __init__(self, buf: AnyStr = '') -> None: ... - def __iter__(self) -> Iterator[AnyStr]: ... - def next(self) -> AnyStr: ... - def close(self) -> None: ... - def isatty(self) -> bool: ... - def seek(self, pos: int, mode: int = 0) -> None: ... - def tell(self) -> int: ... - def read(self, n: int = -1) -> AnyStr: ... - def readline(self, length: int = None) -> AnyStr: ... - def readlines(self, sizehint: int = 0) -> List[AnyStr]: ... - def truncate(self, size: int = None) -> int: ... - def write(self, s: AnyStr) -> None: ... - def writelines(self, iterable: Iterable[AnyStr]) -> None: ... - def flush(self) -> None: ... - def getvalue(self) -> AnyStr: ... - def __enter__(self) -> Any: ... - def __exit__(self, type: Any, value: Any, traceback: Any) -> Any: ... - def fileno(self) -> int: ... - def readable(self) -> bool: ... - def seekable(self) -> bool: ... - def writable(self) -> bool: ... diff --git a/stubs/2.7/UserDict.pyi b/stubs/2.7/UserDict.pyi deleted file mode 100644 index d80f55992b9b..000000000000 --- a/stubs/2.7/UserDict.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Dict, Generic, Mapping, TypeVar - -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') - -class UserDict(Dict[_KT, _VT], Generic[_KT, _VT]): - data = ... # type: Mapping[_KT, _VT] - - def __init__(self, initialdata: Mapping[_KT, _VT] = None) -> None: ... - - # TODO: DictMixin diff --git a/stubs/2.7/__future__.pyi b/stubs/2.7/__future__.pyi deleted file mode 100644 index e863874b010c..000000000000 --- a/stubs/2.7/__future__.pyi +++ /dev/null @@ -1,9 +0,0 @@ -class _Feature: ... - -absolute_import = None # type: _Feature -division = None # type: _Feature -generators = None # type: _Feature -nested_scopes = None # type: _Feature -print_function = None # type: _Feature -unicode_literals = None # type: _Feature -with_statement = None # type: _Feature diff --git a/stubs/2.7/_random.pyi b/stubs/2.7/_random.pyi deleted file mode 100644 index 465053c0124c..000000000000 --- a/stubs/2.7/_random.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for _random - -# NOTE: These are incomplete! - -from typing import Any - -class Random: - def seed(self, x: object = None) -> None: ... - def getstate(self) -> tuple: ... - def setstate(self, state: tuple) -> None: ... - def random(self) -> float: ... - def getrandbits(self, k: int) -> int: ... diff --git a/stubs/2.7/abc.pyi b/stubs/2.7/abc.pyi deleted file mode 100644 index 675f0b1621fe..000000000000 --- a/stubs/2.7/abc.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for abc. - -# Thesee definitions have special processing in type checker. -class ABCMeta: ... -abstractmethod = object() diff --git a/stubs/2.7/argparse.pyi b/stubs/2.7/argparse.pyi deleted file mode 100644 index 44fde2a5a532..000000000000 --- a/stubs/2.7/argparse.pyi +++ /dev/null @@ -1,171 +0,0 @@ -# Stubs for argparse (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Sequence - -SUPPRESS = ... # type: Any -OPTIONAL = ... # type: Any -ZERO_OR_MORE = ... # type: Any -ONE_OR_MORE = ... # type: Any -PARSER = ... # type: Any -REMAINDER = ... # type: Any - -class _AttributeHolder: ... - -class HelpFormatter: - def __init__(self, prog, indent_increment=2, max_help_position=24, width=None): ... - class _Section: - formatter = ... # type: Any - parent = ... # type: Any - heading = ... # type: Any - items = ... # type: Any - def __init__(self, formatter, parent, heading=None): ... - def format_help(self): ... - def start_section(self, heading): ... - def end_section(self): ... - def add_text(self, text): ... - def add_usage(self, usage, actions, groups, prefix=None): ... - def add_argument(self, action): ... - def add_arguments(self, actions): ... - def format_help(self): ... - -class RawDescriptionHelpFormatter(HelpFormatter): ... -class RawTextHelpFormatter(RawDescriptionHelpFormatter): ... -class ArgumentDefaultsHelpFormatter(HelpFormatter): ... - -class ArgumentError(Exception): - argument_name = ... # type: Any - message = ... # type: Any - def __init__(self, argument, message): ... - -class ArgumentTypeError(Exception): ... - -class Action(_AttributeHolder): - option_strings = ... # type: Any - dest = ... # type: Any - nargs = ... # type: Any - const = ... # type: Any - default = ... # type: Any - type = ... # type: Any - choices = ... # type: Any - required = ... # type: Any - help = ... # type: Any - metavar = ... # type: Any - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreAction(Action): - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreConstAction(Action): - def __init__(self, option_strings, dest, const, default=None, required=False, help=None, - metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreTrueAction(_StoreConstAction): - def __init__(self, option_strings, dest, default=False, required=False, help=None): ... - -class _StoreFalseAction(_StoreConstAction): - def __init__(self, option_strings, dest, default=True, required=False, help=None): ... - -class _AppendAction(Action): - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _AppendConstAction(Action): - def __init__(self, option_strings, dest, const, default=None, required=False, help=None, - metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _CountAction(Action): - def __init__(self, option_strings, dest, default=None, required=False, help=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _HelpAction(Action): - def __init__(self, option_strings, dest=..., default=..., help=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _VersionAction(Action): - version = ... # type: Any - def __init__(self, option_strings, version=None, dest=..., default=..., help=''): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _SubParsersAction(Action): - class _ChoicesPseudoAction(Action): - def __init__(self, name, help): ... - def __init__(self, option_strings, prog, parser_class, dest=..., help=None, metavar=None): ... - def add_parser(self, name, **kwargs): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class FileType: - def __init__(self, mode='', bufsize=-1): ... - def __call__(self, string): ... - -class Namespace(_AttributeHolder): - def __init__(self, **kwargs): ... - __hash__ = ... # type: Any - def __eq__(self, other): ... - def __ne__(self, other): ... - def __contains__(self, key): ... - -class _ActionsContainer: - description = ... # type: Any - argument_default = ... # type: Any - prefix_chars = ... # type: Any - conflict_handler = ... # type: Any - def __init__(self, description, prefix_chars, argument_default, conflict_handler): ... - def register(self, registry_name, value, object): ... - def set_defaults(self, **kwargs): ... - def get_default(self, dest): ... - def add_argument(self, - *args: str, - action: str = None, - nargs: str = None, - const: Any = None, - default: Any = None, - type: Any = None, - choices: Any = None, # TODO: Container? - required: bool = None, - help: str = None, - metavar: str = None, - dest: str = None, - ) -> None: ... - def add_argument_group(self, *args, **kwargs): ... - def add_mutually_exclusive_group(self, **kwargs): ... - -class _ArgumentGroup(_ActionsContainer): - title = ... # type: Any - def __init__(self, container, title=None, description=None, **kwargs): ... - -class _MutuallyExclusiveGroup(_ArgumentGroup): - required = ... # type: Any - def __init__(self, container, required=False): ... - -class ArgumentParser(_AttributeHolder, _ActionsContainer): - prog = ... # type: Any - usage = ... # type: Any - epilog = ... # type: Any - version = ... # type: Any - formatter_class = ... # type: Any - fromfile_prefix_chars = ... # type: Any - add_help = ... # type: Any - def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None, - parents=..., formatter_class=..., prefix_chars='', fromfile_prefix_chars=None, - argument_default=None, conflict_handler='', add_help=True): ... - def add_subparsers(self, **kwargs): ... - def parse_args(self, args: Sequence[str] = None, namespace=None): ... - def parse_known_args(self, args=None, namespace=None): ... - def convert_arg_line_to_args(self, arg_line): ... - def format_usage(self): ... - def format_help(self): ... - def format_version(self): ... - def print_usage(self, file=None): ... - def print_help(self, file=None): ... - def print_version(self, file=None): ... - def exit(self, status=0, message=None): ... - def error(self, message): ... diff --git a/stubs/2.7/atexit.pyi b/stubs/2.7/atexit.pyi deleted file mode 100644 index 13d2602b0dc4..000000000000 --- a/stubs/2.7/atexit.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import TypeVar, Any - -_FT = TypeVar('_FT') - -def register(func: _FT, *args: Any, **kargs: Any) -> _FT: ... diff --git a/stubs/2.7/base64.pyi b/stubs/2.7/base64.pyi deleted file mode 100644 index 2ee1bc2d8dc8..000000000000 --- a/stubs/2.7/base64.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for base64 - -# Based on http://docs.python.org/3.2/library/base64.html - -from typing import IO - -def b64encode(s: str, altchars: str = None) -> str: ... -def b64decode(s: str, altchars: str = None, - validate: bool = False) -> str: ... -def standard_b64encode(s: str) -> str: ... -def standard_b64decode(s: str) -> str: ... -def urlsafe_b64encode(s: str) -> str: ... -def urlsafe_b64decode(s: str) -> str: ... -def b32encode(s: str) -> str: ... -def b32decode(s: str, casefold: bool = False, - map01: str = None) -> str: ... -def b16encode(s: str) -> str: ... -def b16decode(s: str, casefold: bool = False) -> str: ... - -def decode(input: IO[str], output: IO[str]) -> None: ... -def decodebytes(s: str) -> str: ... -def decodestring(s: str) -> str: ... -def encode(input: IO[str], output: IO[str]) -> None: ... -def encodebytes(s: str) -> str: ... -def encodestring(s: str) -> str: ... diff --git a/stubs/2.7/binascii.pyi b/stubs/2.7/binascii.pyi deleted file mode 100644 index d26af165a515..000000000000 --- a/stubs/2.7/binascii.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for binascii (Python 2) - -def a2b_uu(string: str) -> str: ... -def b2a_uu(data: str) -> str: ... -def a2b_base64(string: str) -> str: ... -def b2a_base64(data: str) -> str: ... -def a2b_qp(string: str, header: bool = None) -> str: ... -def b2a_qp(data: str, quotetabs: bool = None, istext: bool = None, header: bool = None) -> str: ... -def a2b_hqx(string: str) -> str: ... -def rledecode_hqx(data: str) -> str: ... -def rlecode_hqx(data: str) -> str: ... -def b2a_hqx(data: str) -> str: ... -def crc_hqx(data: str, crc: int) -> int: ... -def crc32(data: str, crc: int) -> int: ... -def b2a_hex(data: str) -> str: ... -def hexlify(data: str) -> str: ... -def a2b_hex(hexstr: str) -> str: ... -def unhexlify(hexstr: str) -> str: ... - -class Error(Exception): ... -class Incomplete(Exception): ... diff --git a/stubs/2.7/builtins.pyi b/stubs/2.7/builtins.pyi deleted file mode 100644 index b01dbb3d8c8b..000000000000 --- a/stubs/2.7/builtins.pyi +++ /dev/null @@ -1,801 +0,0 @@ -# Stubs for builtins (Python 2.7) - -from typing import ( - TypeVar, Iterator, Iterable, overload, - Sequence, Mapping, Tuple, List, Any, Dict, Callable, Generic, Set, - AbstractSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs, - SupportsRound, IO, BinaryIO, Union, AnyStr, MutableSequence, MutableMapping, - MutableSet -) -from abc import abstractmethod, ABCMeta - -_T = TypeVar('_T') -_T_co = TypeVar('_T_co', covariant=True) -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') -_S = TypeVar('_S') -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') - -staticmethod = object() # Special, only valid as a decorator. -classmethod = object() # Special, only valid as a decorator. -property = object() - -class object: - __doc__ = '' - __class__ = ... # type: type - - def __init__(self) -> None: ... - def __eq__(self, o: object) -> bool: ... - def __ne__(self, o: object) -> bool: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __hash__(self) -> int: ... - -class type: - __name__ = '' - __module__ = '' - __dict__ = ... # type: Dict[unicode, Any] - - @overload - def __init__(self, o: object) -> None: ... - @overload - def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ... - # TODO: __new__ may have to be special and not a static method. - @staticmethod - def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ... - -class int(SupportsInt, SupportsFloat, SupportsAbs[int]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, x: SupportsInt) -> None: ... - @overload - def __init__(self, x: Union[str, unicode, bytearray], base: int = 10) -> None: ... - def bit_length(self) -> int: ... - - def __add__(self, x: int) -> int: ... - def __sub__(self, x: int) -> int: ... - def __mul__(self, x: int) -> int: ... - def __floordiv__(self, x: int) -> int: ... - def __div__(self, x: int) -> int: ... - def __truediv__(self, x: int) -> float: ... - def __mod__(self, x: int) -> int: ... - def __radd__(self, x: int) -> int: ... - def __rsub__(self, x: int) -> int: ... - def __rmul__(self, x: int) -> int: ... - def __rfloordiv__(self, x: int) -> int: ... - def __rdiv__(self, x: int) -> int: ... - def __rtruediv__(self, x: int) -> float: ... - def __rmod__(self, x: int) -> int: ... - def __pow__(self, x: int) -> Any: ... # Return type can be int or float, depending on x. - def __rpow__(self, x: int) -> Any: ... - def __and__(self, n: int) -> int: ... - def __or__(self, n: int) -> int: ... - def __xor__(self, n: int) -> int: ... - def __lshift__(self, n: int) -> int: ... - def __rshift__(self, n: int) -> int: ... - def __rand__(self, n: int) -> int: ... - def __ror__(self, n: int) -> int: ... - def __rxor__(self, n: int) -> int: ... - def __rlshift__(self, n: int) -> int: ... - def __rrshift__(self, n: int) -> int: ... - def __neg__(self) -> int: ... - def __pos__(self) -> int: ... - def __invert__(self) -> int: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: int) -> bool: ... - def __le__(self, x: int) -> bool: ... - def __gt__(self, x: int) -> bool: ... - def __ge__(self, x: int) -> bool: ... - - def __str__(self) -> str: ... - def __float__(self) -> float: ... - def __int__(self) -> int: return self - def __abs__(self) -> int: ... - def __hash__(self) -> int: ... - -class float(SupportsFloat, SupportsInt, SupportsAbs[float]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, x: SupportsFloat) -> None: ... - @overload - def __init__(self, x: unicode) -> None: ... - @overload - def __init__(self, x: bytearray) -> None: ... - def as_integer_ratio(self) -> Tuple[int, int]: ... - def hex(self) -> str: ... - def is_integer(self) -> bool: ... - @classmethod - def fromhex(cls, s: str) -> float: ... - - def __add__(self, x: float) -> float: ... - def __sub__(self, x: float) -> float: ... - def __mul__(self, x: float) -> float: ... - def __floordiv__(self, x: float) -> float: ... - def __div__(self, x: float) -> float: ... - def __truediv__(self, x: float) -> float: ... - def __mod__(self, x: float) -> float: ... - def __pow__(self, x: float) -> float: ... - def __radd__(self, x: float) -> float: ... - def __rsub__(self, x: float) -> float: ... - def __rmul__(self, x: float) -> float: ... - def __rfloordiv__(self, x: float) -> float: ... - def __rdiv__(self, x: float) -> float: ... - def __rtruediv__(self, x: float) -> float: ... - def __rmod__(self, x: float) -> float: ... - def __rpow__(self, x: float) -> float: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: float) -> bool: ... - def __le__(self, x: float) -> bool: ... - def __gt__(self, x: float) -> bool: ... - def __ge__(self, x: float) -> bool: ... - def __neg__(self) -> float: ... - def __pos__(self) -> float: ... - - def __str__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: return self - def __abs__(self) -> float: ... - def __hash__(self) -> int: ... - -class complex(SupportsAbs[float]): - @overload - def __init__(self, re: float = 0.0, im: float = 0.0) -> None: ... - @overload - def __init__(self, s: str) -> None: ... - - @property - def real(self) -> float: ... - @property - def imag(self) -> float: ... - - def conjugate(self) -> complex: ... - - def __add__(self, x: complex) -> complex: ... - def __sub__(self, x: complex) -> complex: ... - def __mul__(self, x: complex) -> complex: ... - def __pow__(self, x: complex) -> complex: ... - def __div__(self, x: complex) -> complex: ... - def __truediv__(self, x: complex) -> complex: ... - def __radd__(self, x: complex) -> complex: ... - def __rsub__(self, x: complex) -> complex: ... - def __rmul__(self, x: complex) -> complex: ... - def __rpow__(self, x: complex) -> complex: ... - def __rdiv__(self, x: complex) -> complex: ... - def __rtruediv__(self, x: complex) -> complex: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __neg__(self) -> complex: ... - def __pos__(self) -> complex: ... - - def __str__(self) -> str: ... - def __abs__(self) -> float: ... - def __hash__(self) -> int: ... - -class basestring(metaclass=ABCMeta): ... - -class unicode(basestring, Sequence[unicode]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, o: object) -> None: ... - @overload - def __init__(self, o: str, encoding: unicode = ..., errors: unicode = 'strict') -> None: ... - def capitalize(self) -> unicode: ... - def center(self, width: int, fillchar: unicode = u' ') -> unicode: ... - def count(self, x: unicode) -> int: ... - def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> unicode: ... - def encode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ... - def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = 0, - end: int = ...) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> unicode: ... - def find(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def format(self, *args: Any, **kwargs: Any) -> unicode: ... - def format_map(self, map: Mapping[unicode, Any]) -> unicode: ... - def index(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdecimal(self) -> bool: ... - def isdigit(self) -> bool: ... - def isidentifier(self) -> bool: ... - def islower(self) -> bool: ... - def isnumeric(self) -> bool: ... - def isprintable(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[unicode]) -> unicode: ... - def ljust(self, width: int, fillchar: unicode = u' ') -> unicode: ... - def lower(self) -> unicode: ... - def lstrip(self, chars: unicode = ...) -> unicode: ... - def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... - def replace(self, old: unicode, new: unicode, count: int = ...) -> unicode: ... - def rfind(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def rjust(self, width: int, fillchar: unicode = u' ') -> unicode: ... - def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... - def rsplit(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ... - def rstrip(self, chars: unicode = ...) -> unicode: ... - def split(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ... - def splitlines(self, keepends: bool = False) -> List[unicode]: ... - def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = 0, - end: int = ...) -> bool: ... - def strip(self, chars: unicode = ...) -> unicode: ... - def swapcase(self) -> unicode: ... - def title(self) -> unicode: ... - def translate(self, table: Union[Dict[int, Any], unicode]) -> unicode: ... - def upper(self) -> unicode: ... - def zfill(self, width: int) -> unicode: ... - - @overload - def __getitem__(self, i: int) -> unicode: ... - @overload - def __getitem__(self, s: slice) -> unicode: ... - def __getslice__(self, start: int, stop: int) -> unicode: ... - def __add__(self, s: unicode) -> unicode: ... - def __mul__(self, n: int) -> unicode: ... - def __mod__(self, x: Any) -> unicode: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: unicode) -> bool: ... - def __le__(self, x: unicode) -> bool: ... - def __gt__(self, x: unicode) -> bool: ... - def __ge__(self, x: unicode) -> bool: ... - - def __len__(self) -> int: ... - def __contains__(self, s: object) -> bool: ... - def __iter__(self) -> Iterator[unicode]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - -class str(basestring, Sequence[str]): - def __init__(self, object: object) -> None: ... - def capitalize(self) -> str: ... - def center(self, width: int, fillchar: str = ...) -> str: ... - def count(self, x: unicode) -> int: ... - def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> unicode: ... - def encode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ... - def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]]) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> str: ... - def find(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def format(self, *args: Any, **kwargs: Any) -> str: ... - def index(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdigit(self) -> bool: ... - def islower(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[AnyStr]) -> AnyStr: ... - def ljust(self, width: int, fillchar: str = ...) -> str: ... - def lower(self) -> str: ... - @overload - def lstrip(self, chars: str = ...) -> str: ... - @overload - def lstrip(self, chars: unicode) -> unicode: ... - @overload - def partition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... - @overload - def partition(self, sep: str) -> Tuple[str, str, str]: ... - @overload - def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... - def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ... - def rfind(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def rjust(self, width: int, fillchar: str = ...) -> str: ... - @overload - def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... - @overload - def rpartition(self, sep: str) -> Tuple[str, str, str]: ... - @overload - def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... - @overload - def rsplit(self, sep: str = ..., maxsplit: int = ...) -> List[str]: ... - @overload - def rsplit(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... - @overload - def rstrip(self, chars: str = ...) -> str: ... - @overload - def rstrip(self, chars: unicode) -> unicode: ... - @overload - def split(self, sep: str = ..., maxsplit: int = ...) -> List[str]: ... - @overload - def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... - def splitlines(self, keepends: bool = False) -> List[str]: ... - def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]]) -> bool: ... - @overload - def strip(self, chars: str = ...) -> str: ... - @overload - def strip(self, chars: unicode) -> unicode: ... - def swapcase(self) -> str: ... - def title(self) -> str: ... - def translate(self, table: AnyStr, deletechars: AnyStr = None) -> AnyStr: ... - def upper(self) -> str: ... - def zfill(self, width: int) -> str: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[str]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> str: ... - @overload - def __getitem__(self, s: slice) -> str: ... - def __getslice__(self, start: int, stop: int) -> str: ... - def __add__(self, s: AnyStr) -> AnyStr: ... - def __mul__(self, n: int) -> str: ... - def __rmul__(self, n: int) -> str: ... - def __contains__(self, o: object) -> bool: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: unicode) -> bool: ... - def __le__(self, x: unicode) -> bool: ... - def __gt__(self, x: unicode) -> bool: ... - def __ge__(self, x: unicode) -> bool: ... - def __mod__(self, x: Any) -> str: ... - -class bytearray(Sequence[int]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, x: Union[Iterable[int], str]) -> None: ... - @overload - def __init__(self, x: unicode, encoding: unicode, - errors: unicode = 'strict') -> None: ... - @overload - def __init__(self, length: int) -> None: ... - def capitalize(self) -> bytearray: ... - def center(self, width: int, fillchar: str = ...) -> bytearray: ... - def count(self, x: str) -> int: ... - def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ... - def endswith(self, suffix: Union[str, Tuple[str, ...]]) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> bytearray: ... - def find(self, sub: str, start: int = 0, end: int = ...) -> int: ... - def index(self, sub: str, start: int = 0, end: int = ...) -> int: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdigit(self) -> bool: ... - def islower(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[str]) -> bytearray: ... - def ljust(self, width: int, fillchar: str = ...) -> bytearray: ... - def lower(self) -> bytearray: ... - def lstrip(self, chars: str = ...) -> bytearray: ... - def partition(self, sep: str) -> Tuple[bytearray, bytearray, bytearray]: ... - def replace(self, old: str, new: str, count: int = ...) -> bytearray: ... - def rfind(self, sub: str, start: int = 0, end: int = ...) -> int: ... - def rindex(self, sub: str, start: int = 0, end: int = ...) -> int: ... - def rjust(self, width: int, fillchar: str = ...) -> bytearray: ... - def rpartition(self, sep: str) -> Tuple[bytearray, bytearray, bytearray]: ... - def rsplit(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ... - def rstrip(self, chars: str = ...) -> bytearray: ... - def split(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ... - def splitlines(self, keepends: bool = False) -> List[bytearray]: ... - def startswith(self, prefix: Union[str, Tuple[str, ...]]) -> bool: ... - def strip(self, chars: str = ...) -> bytearray: ... - def swapcase(self) -> bytearray: ... - def title(self) -> bytearray: ... - def translate(self, table: str) -> bytearray: ... - def upper(self) -> bytearray: ... - def zfill(self, width: int) -> bytearray: ... - @staticmethod - def fromhex(self, x: str) -> bytearray: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[int]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> int: ... - @overload - def __getitem__(self, s: slice) -> bytearray: ... - def __getslice__(self, start: int, stop: int) -> bytearray: ... - @overload - def __setitem__(self, i: int, x: int) -> None: ... - @overload - def __setitem__(self, s: slice, x: Union[Sequence[int], str]) -> None: ... - def __setslice__(self, start: int, stop: int, x: Union[Sequence[int], str]) -> None: ... - @overload - def __delitem__(self, i: int) -> None: ... - @overload - def __delitem__(self, s: slice) -> None: ... - def __delslice__(self, start: int, stop: int) -> None: ... - def __add__(self, s: str) -> bytearray: ... - def __mul__(self, n: int) -> bytearray: ... - def __contains__(self, o: object) -> bool: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: str) -> bool: ... - def __le__(self, x: str) -> bool: ... - def __gt__(self, x: str) -> bool: ... - def __ge__(self, x: str) -> bool: ... - -class bool(int, SupportsInt, SupportsFloat): - def __init__(self, o: object = False) -> None: ... - -class slice: - start = 0 - step = 0 - stop = 0 - def __init__(self, start: int, stop: int, step: int) -> None: ... - -class tuple(Sequence[_T_co], Generic[_T_co]): - def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... - def __len__(self) -> int: ... - def __contains__(self, x: object) -> bool: ... - @overload - def __getitem__(self, x: int) -> _T_co: ... - @overload - def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... - def __iter__(self) -> Iterator[_T_co]: ... - def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... - def __mul__(self, n: int) -> Tuple[_T_co, ...]: ... - def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ... - def count(self, x: Any) -> int: ... - def index(self, x: Any) -> int: ... - -class function: - # TODO name of the class (corresponds to Python 'function' class) - __name__ = '' - __module__ = '' - -class list(MutableSequence[_T], Reversible[_T], Generic[_T]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - def append(self, object: _T) -> None: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def pop(self, index: int = -1) -> _T: ... - def index(self, object: _T, start: int = 0, stop: int = ...) -> int: ... - def count(self, object: _T) -> int: ... - def insert(self, index: int, object: _T) -> None: ... - def remove(self, object: _T) -> None: ... - def reverse(self) -> None: ... - def sort(self, *, key: Callable[[_T], Any] = ..., reverse: bool = False) -> None: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> _T: ... - @overload - def __getitem__(self, s: slice) -> List[_T]: ... - def __getslice__(self, start: int, stop: int) -> List[_T]: ... - @overload - def __setitem__(self, i: int, o: _T) -> None: ... - @overload - def __setitem__(self, s: slice, o: Sequence[_T]) -> None: ... - def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ... - def __delitem__(self, i: Union[int, slice]) -> None: ... - def __delslice(self, start: int, stop: int) -> None: ... - def __add__(self, x: List[_T]) -> List[_T]: ... - def __mul__(self, n: int) -> List[_T]: ... - def __rmul__(self, n: int) -> List[_T]: ... - def __contains__(self, o: object) -> bool: ... - def __reversed__(self) -> Iterator[_T]: ... - def __gt__(self, x: List[_T]) -> bool: ... - def __ge__(self, x: List[_T]) -> bool: ... - def __lt__(self, x: List[_T]) -> bool: ... - def __le__(self, x: List[_T]) -> bool: ... - -class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... # TODO keyword args - - def has_key(self, k: _KT) -> bool: ... - def clear(self) -> None: ... - def copy(self) -> Dict[_KT, _VT]: ... - def get(self, k: _KT, default: _VT = None) -> _VT: ... - def pop(self, k: _KT, default: _VT = ...) -> _VT: ... - def popitem(self) -> Tuple[_KT, _VT]: ... - def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... - def update(self, m: Union[Mapping[_KT, _VT], - Iterable[Tuple[_KT, _VT]]]) -> None: ... - def keys(self) -> List[_KT]: ... - def values(self) -> List[_VT]: ... - def items(self) -> List[Tuple[_KT, _VT]]: ... - def iterkeys(self) -> Iterator[_KT]: ... - def itervalues(self) -> Iterator[_VT]: ... - def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... - def __len__(self) -> int: ... - def __getitem__(self, k: _KT) -> _VT: ... - def __setitem__(self, k: _KT, v: _VT) -> None: ... - def __delitem__(self, v: _KT) -> None: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_KT]: ... - def __str__(self) -> str: ... - -class set(MutableSet[_T], Generic[_T]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - def add(self, element: _T) -> None: ... - def remove(self, element: _T) -> None: ... - def copy(self) -> AbstractSet[_T]: ... - def isdisjoint(self, s: AbstractSet[_T]) -> bool: ... - def issuperset(self, s: AbstractSet[_T]) -> bool: ... - def issubset(self, s: AbstractSet[_T]) -> bool: ... - def update(self, s: AbstractSet[_T]) -> None: ... - def difference_update(self, s: AbstractSet[_T]) -> None: ... - def intersection_update(self, s: AbstractSet[_T]) -> None: ... - def __len__(self) -> int: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __and__(self, s: AbstractSet[_T]) -> AbstractSet[_T]: ... - def __or__(self, s: AbstractSet[_S]) -> AbstractSet[Union[_T, _S]]: ... - def __sub__(self, s: AbstractSet[_T]) -> AbstractSet[_T]: ... - def __xor__(self, s: AbstractSet[_S]) -> AbstractSet[Union[_T, _S]]: ... - # TODO more set operations - -class frozenset(AbstractSet[_T], Generic[_T]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - def isdisjoint(self, s: AbstractSet[_T]) -> bool: ... - def __len__(self) -> int: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __and__(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def __or__(self, s: AbstractSet[_S]) -> frozenset[Union[_T, _S]]: ... - def __sub__(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def __xor__(self, s: AbstractSet[_S]) -> frozenset[Union[_T, _S]]: ... - # TODO more set operations - -class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): - def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ... - def __iter__(self) -> Iterator[Tuple[int, _T]]: ... - def next(self) -> Tuple[int, _T]: ... - # TODO __getattribute__ - -class xrange(Sized, Iterable[int], Reversible[int]): - @overload - def __init__(self, stop: int) -> None: ... - @overload - def __init__(self, start: int, stop: int, step: int = 1) -> None: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[int]: ... - def __getitem__(self, i: int) -> int: ... - def __reversed__(self) -> Iterator[int]: ... - -class module: - __name__ = '' - __file__ = '' - __dict__ = ... # type: Dict[unicode, Any] - -True = ... # type: bool -False = ... # type: bool -__debug__ = False - -long = int -bytes = str - -NotImplemented = ... # type: Any - -def abs(n: SupportsAbs[_T]) -> _T: ... -def all(i: Iterable) -> bool: ... -def any(i: Iterable) -> bool: ... -def bin(number: int) -> str: ... -def callable(o: object) -> bool: ... -def chr(code: int) -> str: ... -def delattr(o: Any, name: unicode) -> None: ... -def dir(o: object = ...) -> List[str]: ... -@overload -def divmod(a: int, b: int) -> Tuple[int, int]: ... -@overload -def divmod(a: float, b: float) -> Tuple[float, float]: ... -def exit(code: int = ...) -> None: ... -def filter(function: Callable[[_T], Any], - iterable: Iterable[_T]) -> List[_T]: ... -def format(o: object, format_spec: str = '') -> str: ... # TODO unicode -def getattr(o: Any, name: unicode, default: Any = None) -> Any: ... -def hasattr(o: Any, name: unicode) -> bool: ... -def hash(o: object) -> int: ... -def hex(i: int) -> str: ... # TODO __index__ -def id(o: object) -> int: ... -def input(prompt: unicode = ...) -> Any: ... -def intern(string: str) -> str: ... -@overload -def iter(iterable: Iterable[_T]) -> Iterator[_T]: ... -@overload -def iter(function: Callable[[], _T], sentinel: _T) -> Iterator[_T]: ... -def isinstance(o: object, t: Union[type, Tuple[type, ...]]) -> bool: ... -def issubclass(cls: type, classinfo: type) -> bool: ... -# TODO support this -#def issubclass(type cld, classinfo: Sequence[type]) -> bool: ... -def len(o: Sized) -> int: ... -@overload -def map(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> List[_S]: ... -@overload -def map(func: Callable[[_T1, _T2], _S], - iter1: Iterable[_T1], - iter2: Iterable[_T2]) -> List[_S]: ... # TODO more than two iterables -@overload -def max(iterable: Iterable[_T], key: Callable[[_T], Any] = None) -> _T: ... -@overload -def max(arg1: _T, arg2: _T, *args: _T) -> _T: ... -# TODO memoryview -@overload -def min(iterable: Iterable[_T]) -> _T: ... -@overload -def min(arg1: _T, arg2: _T, *args: _T) -> _T: ... -@overload -def next(i: Iterator[_T]) -> _T: ... -@overload -def next(i: Iterator[_T], default: _T) -> _T: ... -def oct(i: int) -> str: ... # TODO __index__ -@overload -def open(file: str, mode: str = 'r', buffering: int = ...) -> BinaryIO: ... -@overload -def open(file: unicode, mode: str = 'r', buffering: int = ...) -> BinaryIO: ... -@overload -def open(file: int, mode: str = 'r', buffering: int = ...) -> BinaryIO: ... -def ord(c: unicode) -> int: ... -# This is only available after from __future__ import print_function. -def print(*values: Any, sep: unicode = u' ', end: unicode = u'\n', - file: IO[Any] = ...) -> None: ... -@overload -def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y. -@overload -def pow(x: int, y: int, z: int) -> Any: ... -@overload -def pow(x: float, y: float) -> float: ... -@overload -def pow(x: float, y: float, z: float) -> float: ... -def quit(code: int = ...) -> None: ... -def range(x: int, y: int = 0, step: int = 1) -> List[int]: ... -def raw_input(prompt: unicode = ...) -> str: ... - -def reduce(function: Callable[[_T, _T], _T], iterable: Iterable[_T], initializer: _T = None) -> _T: ... - -def reload(module: Any) -> Any: ... -@overload -def reversed(object: Reversible[_T]) -> Iterator[_T]: ... -@overload -def reversed(object: Sequence[_T]) -> Iterator[_T]: ... -def repr(o: object) -> str: ... -@overload -def round(number: float) -> int: ... -@overload -def round(number: float, ndigits: int) -> float: ... # Always return a float if given ndigits. -@overload -def round(number: SupportsRound[_T]) -> _T: ... -@overload -def round(number: SupportsRound[_T], ndigits: int) -> _T: ... -def setattr(object: Any, name: unicode, value: Any) -> None: ... -def sorted(iterable: Iterable[_T], *, - cmp: Callable[[_T, _T], int] = ..., - key: Callable[[_T], Any] = ..., - reverse: bool = False) -> List[_T]: ... -def sum(iterable: Iterable[_T], start: _T = ...) -> _T: ... -def unichr(i: int) -> unicode: ... -def vars(object: Any = ...) -> Dict[str, Any]: ... -@overload -def zip(iter1: Iterable[_T1]) -> List[Tuple[_T1]]: ... -@overload -def zip(iter1: Iterable[_T1], - iter2: Iterable[_T2]) -> List[Tuple[_T1, _T2]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], - iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], - iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, - _T3, _T4]]: ... # TODO more than four iterables -def __import__(name: unicode, - globals: Dict[str, Any] = ..., - locals: Dict[str, Any] = ..., - fromlist: List[str] = ..., level: int = ...) -> Any: ... - -def globals() -> Dict[str, Any]: ... -def locals() -> Dict[str, Any]: ... - -# TODO: buffer support is incomplete; e.g. some_string.startswith(some_buffer) doesn't type check. -AnyBuffer = TypeVar('AnyBuffer', str, unicode, bytearray, buffer) - -class buffer(Sized): - def __init__(self, object: AnyBuffer, offset: int = ..., size: int = ...) -> None: ... - def __add__(self, other: AnyBuffer) -> str: ... - def __cmp__(self, other: AnyBuffer) -> bool: ... - def __getitem__(self, key: Union[int, slice]) -> str: ... - def __getslice__(self, i: int, j: int) -> str: ... - def __len__(self) -> int: ... - def __mul__(self, x: int) -> str: ... - -class BaseException: - args = ... # type: Any - def __init__(self, *args: Any) -> None: ... - def with_traceback(self, tb: Any) -> BaseException: ... -class GeneratorExit(BaseException): ... -class KeyboardInterrupt(BaseException): ... -class SystemExit(BaseException): - code = 0 -class Exception(BaseException): ... -class StopIteration(Exception): ... -class StandardError(Exception): ... -class ArithmeticError(StandardError): ... -class EnvironmentError(StandardError): - errno = 0 - strerror = '' - filename = '' # TODO can this be unicode? -class LookupError(StandardError): ... -class RuntimeError(StandardError): ... -class ValueError(StandardError): ... -class AssertionError(StandardError): ... -class AttributeError(StandardError): ... -class EOFError(StandardError): ... -class FloatingPointError(ArithmeticError): ... -class IOError(EnvironmentError): ... -class ImportError(StandardError): ... -class IndexError(LookupError): ... -class KeyError(LookupError): ... -class MemoryError(StandardError): ... -class NameError(StandardError): ... -class NotImplementedError(RuntimeError): ... -class OSError(EnvironmentError): ... -class WindowsError(OSError): ... -class OverflowError(ArithmeticError): ... -class ReferenceError(StandardError): ... -class SyntaxError(StandardError): ... -class IndentationError(SyntaxError): ... -class TabError(IndentationError): ... -class SystemError(StandardError): ... -class TypeError(StandardError): ... -class UnboundLocalError(NameError): ... -class UnicodeError(ValueError): ... -class UnicodeDecodeError(UnicodeError): ... -class UnicodeEncodeError(UnicodeError): ... -class UnicodeTranslateError(UnicodeError): ... -class ZeroDivisionError(ArithmeticError): ... - -class Warning(Exception): ... -class UserWarning(Warning): ... -class DeprecationWarning(Warning): ... -class SyntaxWarning(Warning): ... -class RuntimeWarning(Warning): ... -class FutureWarning(Warning): ... -class PendingDeprecationWarning(Warning): ... -class ImportWarning(Warning): ... -class UnicodeWarning(Warning): ... -class BytesWarning(Warning): ... -class ResourceWarning(Warning): ... - -def eval(s: str) -> Any: ... - -def cmp(x: Any, y: Any) -> int: ... - -def execfile(filename: str, globals: Dict[str, Any] = None, locals: Dict[str, Any] = None) -> None: ... diff --git a/stubs/2.7/cStringIO.pyi b/stubs/2.7/cStringIO.pyi deleted file mode 100644 index cdb946242246..000000000000 --- a/stubs/2.7/cStringIO.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# Stubs for cStringIO (Python 2.7) -# Built from https://docs.python.org/2/library/stringio.html - -from typing import IO, List, Iterable, Iterator, Any - -InputType = ... # type: type -OutputType = ... # type: type - -class StringIO(IO[str]): - softspace = ... # type: int - - def __init__(self, s: str = None) -> None: ... - def getvalue(self) -> str: ... - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, size: int = -1) -> str: ... - def write(self, b: str) -> None: ... - def readable(self) -> bool: ... - def readline(self, size: int = -1) -> str: ... - def readlines(self, hint: int = -1) -> List[str]: ... - def seek(self, offset: int, whence: int = ...) -> None: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def writelines(self, lines: Iterable[str]) -> None: ... - def next(self) -> str: ... - def __iter__(self) -> Iterator[str]: ... - def __enter__(self) -> Any: ... - def __exit__(self, exc_type: type, exc_val: Any, exc_tb: Any) -> Any: ... diff --git a/stubs/2.7/codecs.pyi b/stubs/2.7/codecs.pyi deleted file mode 100644 index 78d89cfd5418..000000000000 --- a/stubs/2.7/codecs.pyi +++ /dev/null @@ -1,165 +0,0 @@ -# Stubs for codecs (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -BOM_UTF8 = ... # type: Any -BOM_LE = ... # type: Any -BOM_BE = ... # type: Any -BOM_UTF32_LE = ... # type: Any -BOM_UTF32_BE = ... # type: Any -BOM = ... # type: Any -BOM_UTF32 = ... # type: Any -BOM32_LE = ... # type: Any -BOM32_BE = ... # type: Any -BOM64_LE = ... # type: Any -BOM64_BE = ... # type: Any - -class CodecInfo(tuple): - name = ... # type: Any - encode = ... # type: Any - decode = ... # type: Any - incrementalencoder = ... # type: Any - incrementaldecoder = ... # type: Any - streamwriter = ... # type: Any - streamreader = ... # type: Any - def __new__(cls, encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None): ... - -class Codec: - def encode(self, input, errors=''): ... - def decode(self, input, errors=''): ... - -class IncrementalEncoder: - errors = ... # type: Any - buffer = ... # type: Any - def __init__(self, errors=''): ... - def encode(self, input, final=False): ... - def reset(self): ... - def getstate(self): ... - def setstate(self, state): ... - -class BufferedIncrementalEncoder(IncrementalEncoder): - buffer = ... # type: Any - def __init__(self, errors=''): ... - def encode(self, input, final=False): ... - def reset(self): ... - def getstate(self): ... - def setstate(self, state): ... - -class IncrementalDecoder: - errors = ... # type: Any - def __init__(self, errors=''): ... - def decode(self, input, final=False): ... - def reset(self): ... - def getstate(self): ... - def setstate(self, state): ... - -class BufferedIncrementalDecoder(IncrementalDecoder): - buffer = ... # type: Any - def __init__(self, errors=''): ... - def decode(self, input, final=False): ... - def reset(self): ... - def getstate(self): ... - def setstate(self, state): ... - -class StreamWriter(Codec): - stream = ... # type: Any - errors = ... # type: Any - def __init__(self, stream, errors=''): ... - def write(self, object): ... - def writelines(self, list): ... - def reset(self): ... - def seek(self, offset, whence=0): ... - def __getattr__(self, name, getattr=...): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -class StreamReader(Codec): - stream = ... # type: Any - errors = ... # type: Any - bytebuffer = ... # type: Any - charbuffer = ... # type: Any - linebuffer = ... # type: Any - def __init__(self, stream, errors=''): ... - def decode(self, input, errors=''): ... - def read(self, size=-1, chars=-1, firstline=False): ... - def readline(self, size=None, keepends=True): ... - def readlines(self, sizehint=None, keepends=True): ... - def reset(self): ... - def seek(self, offset, whence=0): ... - def next(self): ... - def __iter__(self): ... - def __getattr__(self, name, getattr=...): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -class StreamReaderWriter: - encoding = ... # type: Any - stream = ... # type: Any - reader = ... # type: Any - writer = ... # type: Any - errors = ... # type: Any - def __init__(self, stream, Reader, Writer, errors=''): ... - def read(self, size=-1): ... - def readline(self, size=None): ... - def readlines(self, sizehint=None): ... - def next(self): ... - def __iter__(self): ... - def write(self, data): ... - def writelines(self, list): ... - def reset(self): ... - def seek(self, offset, whence=0): ... - def __getattr__(self, name, getattr=...): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -class StreamRecoder: - data_encoding = ... # type: Any - file_encoding = ... # type: Any - stream = ... # type: Any - encode = ... # type: Any - decode = ... # type: Any - reader = ... # type: Any - writer = ... # type: Any - errors = ... # type: Any - def __init__(self, stream, encode, decode, Reader, Writer, errors=''): ... - def read(self, size=-1): ... - def readline(self, size=None): ... - def readlines(self, sizehint=None): ... - def next(self): ... - def __iter__(self): ... - def write(self, data): ... - def writelines(self, list): ... - def reset(self): ... - def __getattr__(self, name, getattr=...): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -def open(filename, mode='', encoding=None, errors='', buffering=1): ... -def EncodedFile(file, data_encoding, file_encoding=None, errors=''): ... -def getencoder(encoding): ... -def getdecoder(encoding): ... -def getincrementalencoder(encoding): ... -def getincrementaldecoder(encoding): ... -def getreader(encoding): ... -def getwriter(encoding): ... -def iterencode(iterator, encoding, errors='', **kwargs): ... -def iterdecode(iterator, encoding, errors='', **kwargs): ... - -strict_errors = ... # type: Any -ignore_errors = ... # type: Any -replace_errors = ... # type: Any -xmlcharrefreplace_errors = ... # type: Any -backslashreplace_errors = ... # type: Any - -# Names in __all__ with no definition: -# BOM_UTF16 -# BOM_UTF16_BE -# BOM_UTF16_LE -# decode -# encode -# lookup -# lookup_error -# register -# register_error diff --git a/stubs/2.7/collections.pyi b/stubs/2.7/collections.pyi deleted file mode 100644 index a2185a65643c..000000000000 --- a/stubs/2.7/collections.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# Stubs for collections - -# Based on http://docs.python.org/2.7/library/collections.html - -# TODO UserDict -# TODO UserList -# TODO UserString -# TODO more abstract base classes (interfaces in mypy) - -# NOTE: These are incomplete! - -from typing import ( - Dict, Generic, TypeVar, Iterable, Tuple, Callable, Mapping, overload, Iterator, Sized, - Optional, List, Set, Sequence, Union, Reversible -) -import typing - -_T = TypeVar('_T') -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') - -# namedtuple is special-cased in the type checker; the initializer is ignored. -namedtuple = object() - -MutableMapping = typing.MutableMapping - -class deque(Sized, Iterable[_T], Reversible[_T], Generic[_T]): - def __init__(self, iterable: Iterable[_T] = None, - maxlen: int = None) -> None: ... - @property - def maxlen(self) -> Optional[int]: ... - def append(self, x: _T) -> None: ... - def appendleft(self, x: _T) -> None: ... - def clear(self) -> None: ... - def count(self, x: _T) -> int: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def extendleft(self, iterable: Iterable[_T]) -> None: ... - def pop(self) -> _T: ... - def popleft(self) -> _T: ... - def remove(self, value: _T) -> None: ... - def reverse(self) -> None: ... - def rotate(self, n: int) -> None: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - def __getitem__(self, i: int) -> _T: ... - def __setitem__(self, i: int, x: _T) -> None: ... - def __contains__(self, o: _T) -> bool: ... - def __reversed__(self) -> Iterator[_T]: ... - -class Counter(Dict[_T, int], Generic[_T]): - # TODO: __init__ keyword arguments - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, Mapping: Mapping[_T, int]) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - def elements(self) -> Iterator[_T]: ... - def most_common(self, n: int = ...) -> List[_T]: ... - @overload - def subtract(self, mapping: Mapping[_T, int]) -> None: ... - @overload - def subtract(self, iterable: Iterable[_T]) -> None: ... - # The Iterable[Tuple[...]] argument type is not actually desirable - # (the tuples will be added as keys, breaking type safety) but - # it's included so that the signature is compatible with - # Dict.update. Not sure if we should use '# type: ignore' instead - # and omit the type from the union. - def update(self, m: Union[Mapping[_T, int], - Iterable[Tuple[_T, int]], - Iterable[_T]]) -> None: ... - -class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): - def popitem(self, last: bool = True) -> Tuple[_KT, _VT]: ... - def move_to_end(self, key: _KT, last: bool = True) -> None: ... - -class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): - default_factory = ... # type: Callable[[], _VT] - # TODO: __init__ keyword args - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT], - map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT], - iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... - def __missing__(self, key: _KT) -> _VT: ... diff --git a/stubs/2.7/compileall.pyi b/stubs/2.7/compileall.pyi deleted file mode 100644 index ee4fedc7fa23..000000000000 --- a/stubs/2.7/compileall.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for compileall (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None, quiet=0): ... -def compile_file(fullname, ddir=None, force=0, rx=None, quiet=0): ... -def compile_path(skip_curdir=1, maxlevels=0, force=0, quiet=0): ... diff --git a/stubs/2.7/contextlib.pyi b/stubs/2.7/contextlib.pyi deleted file mode 100644 index cebbfb13297d..000000000000 --- a/stubs/2.7/contextlib.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for contextlib - -# NOTE: These are incomplete! - -from typing import Any - -# TODO more precise type? -def contextmanager(func: Any) -> Any: ... diff --git a/stubs/2.7/copy.pyi b/stubs/2.7/copy.pyi deleted file mode 100644 index 237f4203a2f5..000000000000 --- a/stubs/2.7/copy.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for copy - -# NOTE: These are incomplete! - -from typing import TypeVar - -_T = TypeVar('_T') - -def deepcopy(x: _T) -> _T: ... -def copy(x: _T) -> _T: ... diff --git a/stubs/2.7/csv.pyi b/stubs/2.7/csv.pyi deleted file mode 100644 index d1d573ac0e2f..000000000000 --- a/stubs/2.7/csv.pyi +++ /dev/null @@ -1,93 +0,0 @@ -# Stubs for csv (Python 2.7) -# -# NOTE: Based on a dynamically typed stub automatically generated by stubgen. - -from abc import ABCMeta, abstractmethod -from typing import Any, Dict, Iterable, List, Sequence, Union - -# Public interface of _csv.reader -class Reader(Iterable[List[str]], metaclass=ABCMeta): - dialect = ... # type: Dialect - line_num = ... # type: int - - @abstractmethod - def next(self) -> List[str]: ... - -_Row = Sequence[Union[str, int]] - -# Public interface of _csv.writer -class Writer(metaclass=ABCMeta): - dialect = ... # type: Dialect - - @abstractmethod - def writerow(self, row: _Row) -> None: ... - - @abstractmethod - def writerows(self, rows: Iterable[_Row]) -> None: ... - -QUOTE_ALL = ... # type: int -QUOTE_MINIMAL = ... # type: int -QUOTE_NONE = ... # type: int -QUOTE_NONNUMERIC = ... # type: int - -class Error(Exception): ... - -_Dialect = Union[str, Dialect] - -def writer(csvfile: Any, dialect: _Dialect = ..., **fmtparams) -> Writer: ... -def reader(csvfile: Iterable[str], dialect: _Dialect = ..., **fmtparams) -> Reader: ... -def register_dialect(name, dialect=..., **fmtparams): ... -def unregister_dialect(name): ... -def get_dialect(name: str) -> Dialect: ... -def list_dialects(): ... -def field_size_limit(new_limit: int = ...) -> int: ... - -class Dialect: - delimiter = ... # type: str - quotechar = ... # type: str - escapechar = ... # type: str - doublequote = ... # type: bool - skipinitialspace = ... # type: bool - lineterminator = ... # type: str - quoting = ... # type: int - def __init__(self) -> None: ... - -class excel(Dialect): - pass - -class excel_tab(excel): - pass - -class unix_dialect(Dialect): - pass - -class DictReader: - restkey = ... # type: Any - restval = ... # type: Any - reader = ... # type: Any - dialect = ... # type: _Dialect - line_num = ... # type: int - fieldnames = ... # type: Sequence[Any] - def __init__(self, f: Iterable[str], fieldnames: Sequence[Any] = None, restkey=None, - restval=None, dialect: _Dialect = '', *args, **kwds) -> None: ... - def __iter__(self): ... - def __next__(self): ... - -_DictRow = Dict[Any, Union[str, int]] - -class DictWriter: - fieldnames = ... # type: Any - restval = ... # type: Any - extrasaction = ... # type: Any - writer = ... # type: Any - def __init__(self, f: Any, fieldnames: Sequence[Any], restval='', extrasaction: str = ..., - dialect: _Dialect = '', *args, **kwds) -> None: ... - def writeheader(self) -> None: ... - def writerow(self, rowdict: _DictRow) -> None: ... - def writerows(self, rowdicts: Iterable[_DictRow]) -> None: ... - -class Sniffer: - preferred = ... # type: Any - def __init__(self) -> None: ... - def sniff(self, sample: str, delimiters: str = None) -> Dialect: ... - def has_header(self, sample: str) -> bool: ... diff --git a/stubs/2.7/datetime.pyi b/stubs/2.7/datetime.pyi deleted file mode 100644 index 62d451c018c0..000000000000 --- a/stubs/2.7/datetime.pyi +++ /dev/null @@ -1,220 +0,0 @@ -# Stubs for datetime - -# NOTE: These are incomplete! - -from typing import Optional, SupportsAbs, Tuple, Union, overload - -MINYEAR = 0 -MAXYEAR = 0 - -class tzinfo(object): - def tzname(self, dt: Optional[datetime]) -> str: ... - def utcoffset(self, dt: Optional[datetime]) -> int: ... - def dst(self, dt: Optional[datetime]) -> int: ... - def fromutc(self, dt: datetime) -> datetime: ... - -class timezone(tzinfo): - utc = ... # type: tzinfo - min = ... # type: tzinfo - max = ... # type: tzinfo - - def __init__(self, offset: timedelta, name: str = '') -> None: ... - def __hash__(self) -> int: ... - -_tzinfo = tzinfo -_timezone = timezone - -class date(object): - min = ... # type: date - max = ... # type: date - resolution = ... # type: timedelta - - def __init__(self, year: int, month: int = None, day: int = None) -> None: ... - - @classmethod - def fromtimestamp(cls, t: float) -> date: ... - @classmethod - def today(cls) -> date: ... - @classmethod - def fromordinal(cls, n: int) -> date: ... - - @property - def year(self) -> int: ... - @property - def month(self) -> int: ... - @property - def day(self) -> int: ... - - def ctime(self) -> str: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def isoformat(self) -> str: ... - def timetuple(self) -> tuple: ... # TODO return type - def toordinal(self) -> int: ... - def replace(self, year: int = None, month: int = None, day: int = None) -> date: ... - def __le__(self, other: date) -> bool: ... - def __lt__(self, other: date) -> bool: ... - def __ge__(self, other: date) -> bool: ... - def __gt__(self, other: date) -> bool: ... - def __add__(self, other: timedelta) -> date: ... - @overload - def __sub__(self, other: timedelta) -> date: ... - @overload - def __sub__(self, other: date) -> timedelta: ... - def __hash__(self) -> int: ... - def weekday(self) -> int: ... - def isoweekday(self) -> int: ... - def isocalendar(self) -> Tuple[int, int, int]: ... - -class time: - min = ... # type: time - max = ... # type: time - resolution = ... # type: timedelta - - def __init__(self, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0, - tzinfo: tzinfo = None) -> None: ... - - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _tzinfo: ... - - def __le__(self, other: time) -> bool: ... - def __lt__(self, other: time) -> bool: ... - def __ge__(self, other: time) -> bool: ... - def __gt__(self, other: time) -> bool: ... - def __hash__(self) -> int: ... - def isoformat(self) -> str: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def utcoffset(self) -> Optional[int]: ... - def tzname(self) -> Optional[str]: ... - def dst(self) -> Optional[int]: ... - def replace(self, hour: int = None, minute: int = None, second: int = None, - microsecond: int = None, tzinfo: Union[_tzinfo, bool] = True) -> time: ... - -_date = date -_time = time - -class timedelta(SupportsAbs[timedelta]): - min = ... # type: timedelta - max = ... # type: timedelta - resolution = ... # type: timedelta - - def __init__(self, days: int = 0, seconds: int = 0, microseconds: int = 0, - milliseconds: int = 0, minutes: int = 0, hours: int = 0, - weeks: int = 0) -> None: ... - - @property - def days(self) -> int: ... - @property - def seconds(self) -> int: ... - @property - def microseconds(self) -> int: ... - - def total_seconds(self) -> float: ... - def __add__(self, other: timedelta) -> timedelta: ... - def __radd__(self, other: timedelta) -> timedelta: ... - def __sub__(self, other: timedelta) -> timedelta: ... - def __rsub(self, other: timedelta) -> timedelta: ... - def __neg__(self) -> timedelta: ... - def __pos__(self) -> timedelta: ... - def __abs__(self) -> timedelta: ... - def __mul__(self, other: float) -> timedelta: ... - def __rmul__(self, other: float) -> timedelta: ... - @overload - def __floordiv__(self, other: timedelta) -> int: ... - @overload - def __floordiv__(self, other: int) -> timedelta: ... - @overload - def __truediv__(self, other: timedelta) -> float: ... - @overload - def __truediv__(self, other: float) -> timedelta: ... - def __mod__(self, other: timedelta) -> timedelta: ... - def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ... - def __le__(self, other: timedelta) -> bool: ... - def __lt__(self, other: timedelta) -> bool: ... - def __ge__(self, other: timedelta) -> bool: ... - def __gt__(self, other: timedelta) -> bool: ... - def __hash__(self) -> int: ... - -class datetime(object): - # TODO: is actually subclass of date, but __le__, __lt__, __ge__, __gt__ don't work with date. - min = ... # type: datetime - max = ... # type: datetime - resolution = ... # type: timedelta - - def __init__(self, year: int, month: int = None, day: int = None, hour: int = None, - minute: int = None, second: int = None, microseconds: int = None, - tzinfo: tzinfo = None) -> None: ... - - @property - def year(self) -> int: ... - @property - def month(self) -> int: ... - @property - def day(self) -> int: ... - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _tzinfo: ... - - @classmethod - def fromtimestamp(cls, t: float, tz: timezone = None) -> datetime: ... - @classmethod - def utcfromtimestamp(cls, t: float) -> datetime: ... - @classmethod - def today(cls) -> datetime: ... - @classmethod - def fromordinal(cls, n: int) -> datetime: ... - @classmethod - def now(cls, tz: timezone = None) -> datetime: ... - @classmethod - def utcnow(cls) -> datetime: ... - @classmethod - def combine(cls, date: date, time: time) -> datetime: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def toordinal(self) -> int: ... - def timetuple(self) -> tuple: ... # TODO return type - def timestamp(self) -> float: ... - def utctimetuple(self) -> tuple: ... # TODO return type - def date(self) -> _date: ... - def time(self) -> _time: ... - def timetz(self) -> _time: ... - def replace(self, year: int = None, month: int = None, day: int = None, hour: int = None, - minute: int = None, second: int = None, microsecond: int = None, tzinfo: - Union[_tzinfo, bool] = True) -> datetime: ... - def astimezone(self, tz: timezone = None) -> datetime: ... - def ctime(self) -> str: ... - def isoformat(self, sep: str = 'T') -> str: ... - @classmethod - def strptime(cls, date_string: str, format: str) -> datetime: ... - def utcoffset(self) -> Optional[int]: ... - def tzname(self) -> Optional[str]: ... - def dst(self) -> Optional[int]: ... - def __le__(self, other: datetime) -> bool: ... - def __lt__(self, other: datetime) -> bool: ... - def __ge__(self, other: datetime) -> bool: ... - def __gt__(self, other: datetime) -> bool: ... - def __add__(self, other: timedelta) -> datetime: ... - @overload - def __sub__(self, other: datetime) -> timedelta: ... - @overload - def __sub__(self, other: timedelta) -> datetime: ... - def __hash__(self) -> int: ... - def weekday(self) -> int: ... - def isoweekday(self) -> int: ... - def isocalendar(self) -> Tuple[int, int, int]: ... diff --git a/stubs/2.7/difflib.pyi b/stubs/2.7/difflib.pyi deleted file mode 100644 index c0c133dc9e23..000000000000 --- a/stubs/2.7/difflib.pyi +++ /dev/null @@ -1,63 +0,0 @@ -# Stubs for difflib - -# Based on https://docs.python.org/2.7/library/difflib.html - -# TODO: Support unicode? - -from typing import ( - TypeVar, Callable, Iterable, List, NamedTuple, Sequence, Tuple, Generic -) - -_T = TypeVar('_T') - -class SequenceMatcher(Generic[_T]): - def __init__(self, isjunk: Callable[[_T], bool] = None, - a: Sequence[_T] = None, b: Sequence[_T] = None, - autojunk: bool = True) -> None: ... - def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ... - def set_seq1(self, a: Sequence[_T]) -> None: ... - def set_seq2(self, b: Sequence[_T]) -> None: ... - def find_longest_match(self, alo: int, ahi: int, blo: int, - bhi: int) -> Tuple[int, int, int]: ... - def get_matching_blocks(self) -> List[Tuple[int, int, int]]: ... - def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ... - def get_grouped_opcodes(self, n: int = 3 - ) -> Iterable[Tuple[str, int, int, int, int]]: ... - def ratio(self) -> float: ... - def quick_ratio(self) -> float: ... - def real_quick_ratio(self) -> float: ... - -def get_close_matches(word: Sequence[_T], possibilities: List[Sequence[_T]], - n: int = 3, cutoff: float = 0.6) -> List[Sequence[_T]]: ... - -class Differ: - def __init__(self, linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = None) -> None: ... - def compare(self, a: Sequence[str], b: Sequence[str]) -> Iterable[str]: ... - -def IS_LINE_JUNK(str) -> bool: ... -def IS_CHARACTER_JUNK(str) -> bool: ... -def unified_diff(a: Sequence[str], b: Sequence[str], fromfile: str = '', - tofile: str = '', fromfiledate: str = '', tofiledate: str = '', - n: int = 3, lineterm: str = '\n') -> Iterable[str]: ... -def context_diff(a: Sequence[str], b: Sequence[str], fromfile: str='', - tofile: str = '', fromfiledate: str = '', tofiledate: str = '', - n: int = 3, lineterm: str = '\n') -> Iterable[str]: ... -def ndiff(a: Sequence[str], b: Sequence[str], - linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK - ) -> Iterable[str]: ... - -class HtmlDiff(object): - def __init__(self, tabsize: int = 8, wrapcolumn: int = None, - linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK - ) -> None: ... - def make_file(self, fromlines: Sequence[str], tolines: Sequence[str], - fromdesc: str = '', todesc: str = '', context: bool = False, - numlines: int = 5) -> str: ... - def make_table(self, fromlines: Sequence[str], tolines: Sequence[str], - fromdesc: str = '', todesc: str = '', context: bool = False, - numlines: int = 5) -> str: ... - -def restore(delta: Iterable[str], which: int) -> Iterable[int]: ... diff --git a/stubs/2.7/distutils/__init__.pyi b/stubs/2.7/distutils/__init__.pyi deleted file mode 100644 index d4853fe8d517..000000000000 --- a/stubs/2.7/distutils/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for distutils (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -__revision__ = ... # type: Any diff --git a/stubs/2.7/distutils/version.pyi b/stubs/2.7/distutils/version.pyi deleted file mode 100644 index 4b8ef7ffc78c..000000000000 --- a/stubs/2.7/distutils/version.pyi +++ /dev/null @@ -1,23 +0,0 @@ -# Stubs for distutils.version (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Version: - def __init__(self, vstring=None): ... - -class StrictVersion(Version): - version_re = ... # type: Any - version = ... # type: Any - prerelease = ... # type: Any - def parse(self, vstring): ... - def __cmp__(self, other): ... - -class LooseVersion(Version): - component_re = ... # type: Any - def __init__(self, vstring=None): ... - vstring = ... # type: Any - version = ... # type: Any - def parse(self, vstring): ... - def __cmp__(self, other): ... diff --git a/stubs/2.7/email/MIMEText.pyi b/stubs/2.7/email/MIMEText.pyi deleted file mode 100644 index 220c6e7fbc8e..000000000000 --- a/stubs/2.7/email/MIMEText.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.MIMEText (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEText(MIMENonMultipart): - def __init__(self, _text, _subtype='', _charset=''): ... diff --git a/stubs/2.7/email/__init__.pyi b/stubs/2.7/email/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/2.7/email/mime/__init__.pyi b/stubs/2.7/email/mime/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/2.7/email/mime/base.pyi b/stubs/2.7/email/mime/base.pyi deleted file mode 100644 index 3cfabd24ea04..000000000000 --- a/stubs/2.7/email/mime/base.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for email.mime.base (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# import message - -# TODO -#class MIMEBase(message.Message): -class MIMEBase: - def __init__(self, _maintype, _subtype, **_params): ... diff --git a/stubs/2.7/email/mime/multipart.pyi b/stubs/2.7/email/mime/multipart.pyi deleted file mode 100644 index 682faf498ba8..000000000000 --- a/stubs/2.7/email/mime/multipart.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.multipart (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.base import MIMEBase - -class MIMEMultipart(MIMEBase): - def __init__(self, _subtype='', boundary=None, _subparts=None, **_params): ... diff --git a/stubs/2.7/email/mime/nonmultipart.pyi b/stubs/2.7/email/mime/nonmultipart.pyi deleted file mode 100644 index b0894ab38742..000000000000 --- a/stubs/2.7/email/mime/nonmultipart.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.nonmultipart (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.base import MIMEBase - -class MIMENonMultipart(MIMEBase): - def attach(self, payload): ... diff --git a/stubs/2.7/email/mime/text.pyi b/stubs/2.7/email/mime/text.pyi deleted file mode 100644 index b48956f6bf4d..000000000000 --- a/stubs/2.7/email/mime/text.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.text (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEText(MIMENonMultipart): - def __init__(self, _text, _subtype='', _charset=''): ... diff --git a/stubs/2.7/errno.pyi b/stubs/2.7/errno.pyi deleted file mode 100644 index 07e7dc89c45c..000000000000 --- a/stubs/2.7/errno.pyi +++ /dev/null @@ -1,126 +0,0 @@ -from typing import Mapping - -errorcode = ... # type: Mapping[int, str] - -EPERM = ... # type: int -ENOENT = ... # type: int -ESRCH = ... # type: int -EINTR = ... # type: int -EIO = ... # type: int -ENXIO = ... # type: int -E2BIG = ... # type: int -ENOEXEC = ... # type: int -EBADF = ... # type: int -ECHILD = ... # type: int -EAGAIN = ... # type: int -ENOMEM = ... # type: int -EACCES = ... # type: int -EFAULT = ... # type: int -ENOTBLK = ... # type: int -EBUSY = ... # type: int -EEXIST = ... # type: int -EXDEV = ... # type: int -ENODEV = ... # type: int -ENOTDIR = ... # type: int -EISDIR = ... # type: int -EINVAL = ... # type: int -ENFILE = ... # type: int -EMFILE = ... # type: int -ENOTTY = ... # type: int -ETXTBSY = ... # type: int -EFBIG = ... # type: int -ENOSPC = ... # type: int -ESPIPE = ... # type: int -EROFS = ... # type: int -EMLINK = ... # type: int -EPIPE = ... # type: int -EDOM = ... # type: int -ERANGE = ... # type: int -EDEADLK = ... # type: int -ENAMETOOLONG = ... # type: int -ENOLCK = ... # type: int -ENOSYS = ... # type: int -ENOTEMPTY = ... # type: int -ELOOP = ... # type: int -EWOULDBLOCK = ... # type: int -ENOMSG = ... # type: int -EIDRM = ... # type: int -ECHRNG = ... # type: int -EL2NSYNC = ... # type: int -EL3HLT = ... # type: int -EL3RST = ... # type: int -ELNRNG = ... # type: int -EUNATCH = ... # type: int -ENOCSI = ... # type: int -EL2HLT = ... # type: int -EBADE = ... # type: int -EBADR = ... # type: int -EXFULL = ... # type: int -ENOANO = ... # type: int -EBADRQC = ... # type: int -EBADSLT = ... # type: int -EDEADLOCK = ... # type: int -EBFONT = ... # type: int -ENOSTR = ... # type: int -ENODATA = ... # type: int -ETIME = ... # type: int -ENOSR = ... # type: int -ENONET = ... # type: int -ENOPKG = ... # type: int -EREMOTE = ... # type: int -ENOLINK = ... # type: int -EADV = ... # type: int -ESRMNT = ... # type: int -ECOMM = ... # type: int -EPROTO = ... # type: int -EMULTIHOP = ... # type: int -EDOTDOT = ... # type: int -EBADMSG = ... # type: int -EOVERFLOW = ... # type: int -ENOTUNIQ = ... # type: int -EBADFD = ... # type: int -EREMCHG = ... # type: int -ELIBACC = ... # type: int -ELIBBAD = ... # type: int -ELIBSCN = ... # type: int -ELIBMAX = ... # type: int -ELIBEXEC = ... # type: int -EILSEQ = ... # type: int -ERESTART = ... # type: int -ESTRPIPE = ... # type: int -EUSERS = ... # type: int -ENOTSOCK = ... # type: int -EDESTADDRREQ = ... # type: int -EMSGSIZE = ... # type: int -EPROTOTYPE = ... # type: int -ENOPROTOOPT = ... # type: int -EPROTONOSUPPORT = ... # type: int -ESOCKTNOSUPPORT = ... # type: int -EOPNOTSUPP = ... # type: int -EPFNOSUPPORT = ... # type: int -EAFNOSUPPORT = ... # type: int -EADDRINUSE = ... # type: int -EADDRNOTAVAIL = ... # type: int -ENETDOWN = ... # type: int -ENETUNREACH = ... # type: int -ENETRESET = ... # type: int -ECONNABORTED = ... # type: int -ECONNRESET = ... # type: int -ENOBUFS = ... # type: int -EISCONN = ... # type: int -ENOTCONN = ... # type: int -ESHUTDOWN = ... # type: int -ETOOMANYREFS = ... # type: int -ETIMEDOUT = ... # type: int -ECONNREFUSED = ... # type: int -EHOSTDOWN = ... # type: int -EHOSTUNREACH = ... # type: int -EALREADY = ... # type: int -EINPROGRESS = ... # type: int -ESTALE = ... # type: int -EUCLEAN = ... # type: int -ENOTNAM = ... # type: int -ENAVAIL = ... # type: int -EISNAM = ... # type: int -EREMOTEIO = ... # type: int -EDQUOT = ... # type: int diff --git a/stubs/2.7/fcntl.pyi b/stubs/2.7/fcntl.pyi deleted file mode 100644 index 0f09a2487a67..000000000000 --- a/stubs/2.7/fcntl.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from typing import Union -import io - -FASYNC = 64 - -FD_CLOEXEC = 1 - -F_DUPFD = 0 -F_FULLFSYNC = 51 -F_GETFD = 1 -F_GETFL = 3 -F_GETLK = 7 -F_GETOWN = 5 -F_RDLCK = 1 -F_SETFD = 2 -F_SETFL = 4 -F_SETLK = 8 -F_SETLKW = 9 -F_SETOWN = 6 -F_UNLCK = 2 -F_WRLCK = 3 - -LOCK_EX = 2 -LOCK_NB = 4 -LOCK_SH = 1 -LOCK_UN = 8 - -_ANYFILE = Union[int, io.IOBase] - -def fcntl(fd: _ANYFILE, op: int, arg: Union[int, str] = 0) -> Union[int, str]: ... - -# TODO: arg: int or read-only buffer interface or read-write buffer interface -def ioctl(fd: _ANYFILE, op: int, arg: Union[int, str] = 0, - mutate_flag: bool = True) -> Union[int, str]: ... - -def flock(fd: _ANYFILE, op: int) -> None: ... -def lockf(fd: _ANYFILE, op: int, length: int = 0, start: int = 0, - whence: int = 0) -> Union[int, str]: ... diff --git a/stubs/2.7/fnmatch.pyi b/stubs/2.7/fnmatch.pyi deleted file mode 100644 index 34729ddeb125..000000000000 --- a/stubs/2.7/fnmatch.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Iterable, Pattern - -def fnmatch(filename: str, pattern: str) -> bool: ... -def fnmatchcase(filename: str, pattern: str) -> bool: ... -def filter(names: Iterable[str], pattern: str) -> Iterable[str]: ... -def translate(pattern: str) -> Pattern[str]: ... diff --git a/stubs/2.7/functools.pyi b/stubs/2.7/functools.pyi deleted file mode 100644 index 146518fe4e0b..000000000000 --- a/stubs/2.7/functools.pyi +++ /dev/null @@ -1,23 +0,0 @@ -# Stubs for functools (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from abc import ABCMeta, abstractmethod -from typing import Any, Callable, Dict, Sequence -from collections import namedtuple - -_AnyCallable = Callable[..., Any] - -def reduce(function, iterable, initializer=None): ... - -WRAPPER_ASSIGNMENTS = ... # type: Sequence[str] -WRAPPER_UPDATES = ... # type: Sequence[str] - -def update_wrapper(wrapper: _AnyCallable, wrapped: _AnyCallable, assigned: Sequence[str] = ..., - updated: Sequence[str] = ...) -> None: ... -def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> Callable[[_AnyCallable], _AnyCallable]: ... -def total_ordering(cls: type) -> type: ... -def cmp_to_key(mycmp): ... - -# TODO: give a more specific return type for partial (a callable object with some attributes). -def partial(func: _AnyCallable, *args, **keywords) -> Any: ... diff --git a/stubs/2.7/gc.pyi b/stubs/2.7/gc.pyi deleted file mode 100644 index ba5ec1cd6f24..000000000000 --- a/stubs/2.7/gc.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for gc (Python 2) - -from typing import List, Any, Tuple - -def enable() -> None: ... -def disable() -> None: ... -def isenabled() -> bool: ... -def collect(generation: int = None) -> int: ... -def set_debug(flags: Any) -> None: ... -def get_debug() -> Any: ... -def get_objects() -> List[Any]: ... -def set_threshold(threshold0: int, threshold1: int = None, threshold2: int = None) -> None: ... -def get_count() -> Tuple[int, int, int]: ... -def get_threshold() -> Tuple[int, int, int]: ... -def get_referrers(*objs: Any) -> List[Any]: ... -def get_referents(*objs: Any) -> List[Any]: ... -def is_tracked(obj: Any) -> bool: ... - -garbage = ... # type: List[Any] - -DEBUG_STATS = ... # type: Any -DEBUG_COLLECTABLE = ... # type: Any -DEBUG_UNCOLLECTABLE = ... # type: Any -DEBUG_INSTANCES = ... # type: Any -DEBUG_OBJECTS = ... # type: Any -DEBUG_SAVEALL = ... # type: Any -DEBUG_LEAK = ... # type: Any diff --git a/stubs/2.7/getpass.pyi b/stubs/2.7/getpass.pyi deleted file mode 100644 index 7af0bf213282..000000000000 --- a/stubs/2.7/getpass.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for getpass (Python 2) - -from typing import Any, IO - -class GetPassWarning(UserWarning): ... - -def getpass(prompt: str = 'Password: ', stream: IO[Any] = None) -> str: ... -def getuser() -> str: ... diff --git a/stubs/2.7/gettext.pyi b/stubs/2.7/gettext.pyi deleted file mode 100644 index 8921be97ff6a..000000000000 --- a/stubs/2.7/gettext.pyi +++ /dev/null @@ -1,40 +0,0 @@ -# TODO(MichalPokorny): better types - -from typing import Any, IO, Optional, Union - -def bindtextdomain(domain: str, localedir: str = None) -> str: ... -def bind_textdomain_codeset(domain: str, codeset: str = None) -> str: ... -def textdomain(domain: str = None) -> str: ... -def gettext(message: str) -> str: ... -def lgettext(message: str) -> str: ... -def dgettext(domain: str, message: str) -> str: ... -def ldgettext(domain: str, message: str) -> str: ... -def ngettext(singular: str, plural: str, n: int) -> str: ... -def lngettext(singular: str, plural: str, n: int) -> str: ... -def dngettext(domain: str, singular: str, plural: str, n: int) -> str: ... -def ldngettext(domain: str, singular: str, plural: str, n: int) -> str: ... - -class Translations(object): - def _parse(self, fp: IO[str]) -> None: ... - def add_fallback(self, fallback: Any) -> None: ... - def gettext(self, message: str) -> str: ... - def lgettext(self, message: str) -> str: ... - def ugettext(self, message: str) -> unicode: ... - def ngettext(self, singular: str, plural: str, n: int) -> str: ... - def lngettext(self, singular: str, plural: str, n: int) -> str: ... - def ungettext(self, singular: str, plural: str, n: int) -> str: ... - def info(self) -> Any: ... - def charset(self) -> Any: ... - def output_charset(self) -> Any: ... - def set_output_charset(self, charset: Any) -> None: ... - def install(self, unicode: bool = None, names: Any = None) -> None: ... - -# TODO: NullTranslations, GNUTranslations - -def find(domain: str, localedir: str = None, languages: List[str] = None, - all: Any = None) -> Optional[Union[str, List[str]]]: ... - -def translation(domain: str, localedir: str = None, languages: List[str] = None, - class_: Any = None, fallback: Any = None, codeset: Any = None) -> Translations: ... -def install(domain: str, localedir: str = None, unicode: Any = None, codeset: Any = None, - names: Any = None) -> None: ... diff --git a/stubs/2.7/glob.pyi b/stubs/2.7/glob.pyi deleted file mode 100644 index 9b70e5cb0e55..000000000000 --- a/stubs/2.7/glob.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from typing import List, Iterator, AnyStr - -def glob(pathname: AnyStr) -> List[AnyStr]: ... -def iglob(pathname: AnyStr) -> Iterator[AnyStr]: ... diff --git a/stubs/2.7/gzip.pyi b/stubs/2.7/gzip.pyi deleted file mode 100644 index c43ce6d959af..000000000000 --- a/stubs/2.7/gzip.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Stubs for gzip (Python 2) -# -# NOTE: Based on a dynamically typed stub automatically generated by stubgen. - -from typing import Any, IO -import io - -class GzipFile(io.BufferedIOBase): - myfileobj = ... # type: Any - max_read_chunk = ... # type: Any - mode = ... # type: Any - extrabuf = ... # type: Any - extrasize = ... # type: Any - extrastart = ... # type: Any - name = ... # type: Any - min_readsize = ... # type: Any - compress = ... # type: Any - fileobj = ... # type: Any - offset = ... # type: Any - mtime = ... # type: Any - def __init__(self, filename: str = None, mode: str = None, compresslevel: int = 9, - fileobj: IO[str] = None, mtime: float = None) -> None: ... - @property - def filename(self): ... - size = ... # type: Any - crc = ... # type: Any - def write(self, data): ... - def read(self, size=-1): ... - @property - def closed(self): ... - def close(self): ... - def flush(self, zlib_mode=...): ... - def fileno(self): ... - def rewind(self): ... - def readable(self): ... - def writable(self): ... - def seekable(self): ... - def seek(self, offset, whence=0): ... - def readline(self, size=-1): ... - -def open(filename: str, mode: str = '', compresslevel: int = ...) -> GzipFile: ... diff --git a/stubs/2.7/hashlib.pyi b/stubs/2.7/hashlib.pyi deleted file mode 100644 index 19506765fe04..000000000000 --- a/stubs/2.7/hashlib.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for hashlib (Python 2) - -from typing import Tuple - -class _hash(object): - # This is not actually in the module namespace. - digest_size = 0 - block_size = 0 - def update(self, arg: str) -> None: ... - def digest(self) -> str: ... - def hexdigest(self) -> str: ... - def copy(self) -> _hash: ... - -def new(algo: str = None) -> _hash: ... - -def md5(s: str = None) -> _hash: ... -def sha1(s: str = None) -> _hash: ... -def sha224(s: str = None) -> _hash: ... -def sha256(s: str = None) -> _hash: ... -def sha384(s: str = None) -> _hash: ... -def sha512(s: str = None) -> _hash: ... - -algorithms = ... # type: Tuple[str, ...] -algorithms_guaranteed = ... # type: Tuple[str, ...] -algorithms_available = ... # type: Tuple[str, ...] - -def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = None) -> str: ... diff --git a/stubs/2.7/hmac.pyi b/stubs/2.7/hmac.pyi deleted file mode 100644 index 54c821b1a51e..000000000000 --- a/stubs/2.7/hmac.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for hmac (Python 2) - -from typing import Any - -class HMAC: - def update(self, msg: str) -> None: ... - def digest(self) -> str: ... - def hexdigest(self) -> str: ... - def copy(self) -> HMAC: ... - -def new(key: str, msg: str = None, digestmod: Any = None) -> HMAC: ... diff --git a/stubs/2.7/htmlentitydefs.pyi b/stubs/2.7/htmlentitydefs.pyi deleted file mode 100644 index 1b9bddd0c066..000000000000 --- a/stubs/2.7/htmlentitydefs.pyi +++ /dev/null @@ -1,9 +0,0 @@ -# Stubs for htmlentitydefs (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Mapping - -name2codepoint = ... # type: Mapping[str, int] -codepoint2name = ... # type: Mapping[int, str] -entitydefs = ... # type: Mapping[str, str] diff --git a/stubs/2.7/imp.pyi b/stubs/2.7/imp.pyi deleted file mode 100644 index e7e91059d093..000000000000 --- a/stubs/2.7/imp.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import List, Optional, Tuple, Iterable, IO, Any -import types - -def get_magic() -> str: ... -def get_suffixes() -> List[Tuple[str, str, int]]: ... -PY_SOURCE = 0 -PY_COMPILED = 0 -C_EXTENSION = 0 - -def find_module(name: str, path: Iterable[str] = None) -> Optional[Tuple[str, str, Tuple[str, str, int]]]: ... - -# TODO: module object -def load_module(name: str, file: str, pathname: str, description: Tuple[str, str, int]) -> types.ModuleType: ... - -def new_module(name: str) -> types.ModuleType: ... -def lock_held() -> bool: ... -def acquire_lock() -> None: ... -def release_lock() -> None: ... - -PKG_DIRECTORY = 0 -C_BUILTIN = 0 -PY_FROZEN = 0 - -SEARCH_ERROR = 0 -def init_builtin(name: str) -> types.ModuleType: ... -def init_frozen(name: str) -> types.ModuleType: ... -def is_builtin(name: str) -> int: ... -def is_frozen(name: str) -> bool: ... -def load_compiled(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ... -def load_dynamic(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ... -def load_source(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ... - -class NullImporter: - def __init__(self, path_string: str) -> None: ... - def find_module(fullname: str, path: str = None) -> None: ... diff --git a/stubs/2.7/importlib.pyi b/stubs/2.7/importlib.pyi deleted file mode 100644 index 000bb873a288..000000000000 --- a/stubs/2.7/importlib.pyi +++ /dev/null @@ -1,3 +0,0 @@ -import types - -def import_module(name: str, package: str = None) -> types.ModuleType: ... diff --git a/stubs/2.7/inspect.pyi b/stubs/2.7/inspect.pyi deleted file mode 100644 index 4bed56b97ef0..000000000000 --- a/stubs/2.7/inspect.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# TODO incomplete -from typing import Any, List, Tuple - -def isgenerator(object: Any) -> bool: ... - -class _Frame: - ... -_FrameRecord = Tuple[_Frame, str, int, str, List[str], int] - -def currentframe() -> _FrameRecord: ... -def stack(context: int = None) -> List[_FrameRecord]: ... diff --git a/stubs/2.7/io.pyi b/stubs/2.7/io.pyi deleted file mode 100644 index f6979b9ec6bc..000000000000 --- a/stubs/2.7/io.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# Stubs for io - -# Based on https://docs.python.org/2/library/io.html - -# Only a subset of functionality is included. - -DEFAULT_BUFFER_SIZE = 0 - -from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union - -def open(file: Union[str, unicode, int], - mode: unicode = 'r', buffering: int = -1, encoding: unicode = None, - errors: unicode = None, newline: unicode = None, - closefd: bool = True) -> IO[Any]: ... - -class IOBase: - # TODO - ... - -class BytesIO(BinaryIO): - def __init__(self, initial_bytes: str = b'') -> None: ... - # TODO getbuffer - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> str: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> str: ... - def readlines(self, hint: int = -1) -> List[str]: ... - def seek(self, offset: int, whence: int = 0) -> None: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def write(self, s: str) -> None: ... - def writelines(self, lines: Iterable[str]) -> None: ... - def getvalue(self) -> str: ... - def read1(self) -> str: ... - - def __iter__(self) -> Iterator[str]: ... - def __enter__(self) -> 'BytesIO': ... - def __exit__(self, type, value, traceback) -> bool: ... - -class StringIO(TextIO): - def __init__(self, initial_value: unicode = '', - newline: unicode = None) -> None: ... - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> unicode: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> unicode: ... - def readlines(self, hint: int = -1) -> List[unicode]: ... - def seek(self, offset: int, whence: int = 0) -> None: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def write(self, s: unicode) -> None: ... - def writelines(self, lines: Iterable[unicode]) -> None: ... - def getvalue(self) -> unicode: ... - - def __iter__(self) -> Iterator[unicode]: ... - def __enter__(self) -> 'StringIO': ... - def __exit__(self, type, value, traceback) -> bool: ... - -class TextIOWrapper(TextIO): - # write_through is undocumented but used by subprocess - def __init__(self, buffer: IO[str], encoding: unicode = None, - errors: unicode = None, newline: unicode = None, - line_buffering: bool = False, - write_through: bool = True) -> None: ... - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> unicode: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> unicode: ... - def readlines(self, hint: int = -1) -> List[unicode]: ... - def seek(self, offset: int, whence: int = 0) -> None: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def write(self, s: unicode) -> None: ... - def writelines(self, lines: Iterable[unicode]) -> None: ... - - def __iter__(self) -> Iterator[unicode]: ... - def __enter__(self) -> StringIO: ... - def __exit__(self, type, value, traceback) -> bool: ... - -class BufferedIOBase(IOBase): ... diff --git a/stubs/2.7/itertools.pyi b/stubs/2.7/itertools.pyi deleted file mode 100644 index 451a5fac890f..000000000000 --- a/stubs/2.7/itertools.pyi +++ /dev/null @@ -1,81 +0,0 @@ -# Stubs for itertools - -# Based on https://docs.python.org/2/library/itertools.html - -from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple, - Union, Sequence) - -_T = TypeVar('_T') -_S = TypeVar('_S') - -def count(start: int = 0, - step: int = 1) -> Iterator[int]: ... # more general types? -def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ... - -def repeat(object: _T, times: int = ...) -> Iterator[_T]: ... - -def accumulate(iterable: Iterable[_T]) -> Iterator[_T]: ... -def chain(*iterables: Iterable[_T]) -> Iterator[_T]: ... -# TODO chain.from_Iterable -def compress(data: Iterable[_T], selectors: Iterable[Any]) -> Iterator[_T]: ... -def dropwhile(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... -def ifilter(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... -def ifilterfalse(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... - -@overload -def groupby(iterable: Iterable[_T]) -> Iterator[Tuple[_T, Iterator[_T]]]: ... -@overload -def groupby(iterable: Iterable[_T], - key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... - -@overload -def islice(iterable: Iterable[_T], stop: int) -> Iterator[_T]: ... -@overload -def islice(iterable: Iterable[_T], start: int, stop: int, - step: int = 1) -> Iterator[_T]: ... - -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') - -@overload -def imap(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> Iterable[_S]: ... -@overload -def imap(func: Callable[[_T1, _T2], _S], - iter1: Iterable[_T1], - iter2: Iterable[_T2]) -> Iterable[_S]: ... # TODO more than two iterables - -def starmap(func: Any, iterable: Iterable[Any]) -> Iterator[Any]: ... -def takewhile(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... -def tee(iterable: Iterable[Any], n: int = 2) -> Iterator[Any]: ... - -@overload -def izip(iter1: Iterable[_T1]) -> Iterable[Tuple[_T1]]: ... -@overload -def izip(iter1: Iterable[_T1], - iter2: Iterable[_T2]) -> Iterable[Tuple[_T1, _T2]]: ... -@overload -def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], - iter3: Iterable[_T3]) -> Iterable[Tuple[_T1, _T2, _T3]]: ... -@overload -def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], - iter4: Iterable[_T4]) -> Iterable[Tuple[_T1, _T2, - _T3, _T4]]: ... # TODO more than four iterables -def izip_longest(*p: Iterable[Any], - fillvalue: Any = None) -> Iterator[Any]: ... - -# TODO: Return type should be Iterator[Tuple[..]], but unknown tuple shape. -# Iterator[Sequence[_T]] loses this type information. -def product(*p: Iterable[_T], repeat: int = 1) -> Iterator[Sequence[_T]]: ... - -def permutations(iterable: Iterable[_T], - r: int = None) -> Iterator[Sequence[_T]]: ... -def combinations(iterable: Iterable[_T], - r: int) -> Iterable[Sequence[_T]]: ... -def combinations_with_replacement(iterable: Iterable[_T], - r: int) -> Iterable[Sequence[_T]]: ... diff --git a/stubs/2.7/json.pyi b/stubs/2.7/json.pyi deleted file mode 100644 index 02893fa7db27..000000000000 --- a/stubs/2.7/json.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, IO - -class JSONDecodeError(object): - def dumps(self, obj: Any) -> str: ... - def dump(self, obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... - def loads(self, s: str) -> Any: ... - def load(self, fp: IO[str]) -> Any: ... - -def dumps(obj: Any, sort_keys: bool = None, indent: int = None) -> str: ... -def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... -def loads(s: str) -> Any: ... -def load(fp: IO[str]) -> Any: ... diff --git a/stubs/2.7/logging/__init__.pyi b/stubs/2.7/logging/__init__.pyi deleted file mode 100644 index 64c7eb0bfdc8..000000000000 --- a/stubs/2.7/logging/__init__.pyi +++ /dev/null @@ -1,239 +0,0 @@ -# Stubs for logging (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Dict, Optional, Sequence, Tuple, overload - -CRITICAL = 0 -FATAL = 0 -ERROR = 0 -WARNING = 0 -WARN = 0 -INFO = 0 -DEBUG = 0 -NOTSET = 0 - -def getLevelName(level: int) -> str: ... -def addLevelName(level: int, levelName: str) -> None: ... - -class LogRecord: - name = ... # type: str - msg = ... # type: str - args = ... # type: Sequence[Any] - levelname = ... # type: str - levelno = ... # type: int - pathname = ... # type: str - filename = ... # type: str - module = ... # type: str - exc_info = ... # type: Tuple[Any, Any, Any] - exc_text = ... # type: str - lineno = ... # type: int - funcName = ... # type: Optional[str] - created = ... # type: float - msecs = ... # type: float - relativeCreated = ... # type: float - thread = ... # type: Any - threadName = ... # type: Any - processName = ... # type: Any - process = ... # type: Any - def __init__(self, name: str, level: int, pathname: str, lineno: int, msg: str, - args: Sequence[Any], exc_info: Tuple[Any, Any, Any], func: str = None) -> None: ... - def getMessage(self) -> str: ... - -def makeLogRecord(dict: Dict[str, Any]) -> LogRecord: ... - -class PercentStyle: - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def __init__(self, fmt): ... - def usesTime(self): ... - def format(self, record): ... - -class StrFormatStyle(PercentStyle): - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def format(self, record): ... - -class StringTemplateStyle(PercentStyle): - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def __init__(self, fmt): ... - def usesTime(self): ... - def format(self, record): ... - -BASIC_FORMAT = ... # type: Any - -class Formatter: - converter = ... # type: Any - datefmt = ... # type: Any - def __init__(self, fmt: str = None, datefmt: str = None) -> None: ... - default_time_format = ... # type: Any - default_msec_format = ... # type: Any - def formatTime(self, record, datefmt=None): ... - def formatException(self, ei): ... - def usesTime(self): ... - def formatMessage(self, record): ... - def formatStack(self, stack_info): ... - def format(self, record: LogRecord) -> str: ... - -class BufferingFormatter: - linefmt = ... # type: Any - def __init__(self, linefmt=None): ... - def formatHeader(self, records): ... - def formatFooter(self, records): ... - def format(self, records): ... - -class Filter: - name = ... # type: Any - nlen = ... # type: Any - def __init__(self, name: str = '') -> None: ... - def filter(self, record: LogRecord) -> int: ... - -class Filterer: - filters = ... # type: Any - def __init__(self) -> None: ... - def addFilter(self, filter: Filter) -> None: ... - def removeFilter(self, filter: Filter) -> None: ... - def filter(self, record: LogRecord) -> int: ... - -class Handler(Filterer): - level = ... # type: Any - formatter = ... # type: Any - def __init__(self, level: int = ...) -> None: ... - def get_name(self): ... - def set_name(self, name): ... - name = ... # type: Any - lock = ... # type: Any - def createLock(self): ... - def acquire(self): ... - def release(self): ... - def setLevel(self, level: int) -> None: ... - def format(self, record: LogRecord) -> str: ... - def emit(self, record: LogRecord) -> None: ... - def handle(self, record: LogRecord) -> Any: ... # Return value undocumented - def setFormatter(self, fmt: Formatter) -> None: ... - def flush(self) -> None: ... - def close(self) -> None: ... - def handleError(self, record: LogRecord) -> None: ... - -class StreamHandler(Handler): - terminator = ... # type: Any - stream = ... # type: Any - def __init__(self, stream=None): ... - def flush(self): ... - def emit(self, record): ... - -class FileHandler(StreamHandler): - baseFilename = ... # type: Any - mode = ... # type: Any - encoding = ... # type: Any - delay = ... # type: Any - stream = ... # type: Any - def __init__(self, filename: str, mode: str = ..., encoding: str = None, delay: int = ...) -> None: ... - def close(self): ... - def emit(self, record): ... - -class _StderrHandler(StreamHandler): - def __init__(self, level=...): ... - -lastResort = ... # type: Any - -class PlaceHolder: - loggerMap = ... # type: Any - def __init__(self, alogger): ... - def append(self, alogger): ... - -def setLoggerClass(klass): ... -def getLoggerClass(): ... - -class Manager: - root = ... # type: Any - disable = ... # type: Any - emittedNoHandlerWarning = ... # type: Any - loggerDict = ... # type: Any - loggerClass = ... # type: Any - logRecordFactory = ... # type: Any - def __init__(self, rootnode): ... - def getLogger(self, name): ... - def setLoggerClass(self, klass): ... - def setLogRecordFactory(self, factory): ... - -class Logger(Filterer): - name = ... # type: Any - level = ... # type: Any - parent = ... # type: Any - propagate = False - handlers = ... # type: Any - disabled = ... # type: Any - def __init__(self, name: str, level: int = ...) -> None: ... - def setLevel(self, level: int) -> None: ... - def debug(self, msg: str, *args, **kwargs) -> None: ... - def info(self, msg: str, *args, **kwargs) -> None: ... - def warning(self, msg: str, *args, **kwargs) -> None: ... - def warn(self, msg: str, *args, **kwargs) -> None: ... - def error(self, msg: str, *args, **kwargs) -> None: ... - def exception(self, msg: str, *args, **kwargs) -> None: ... - def critical(self, msg: str, *args, **kwargs) -> None: ... - fatal = ... # type: Any - def log(self, level: int, msg: str, *args, **kwargs) -> None: ... - def findCaller(self) -> Tuple[str, int, str]: ... - def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None, - sinfo=None): ... - def handle(self, record): ... - def addHandler(self, hdlr: Handler) -> None: ... - def removeHandler(self, hdlr: Handler) -> None: ... - def hasHandlers(self): ... - def callHandlers(self, record): ... - def getEffectiveLevel(self) -> int: ... - def isEnabledFor(self, level: int) -> bool: ... - def getChild(self, suffix: str) -> Logger: ... - -class RootLogger(Logger): - def __init__(self, level): ... - -class LoggerAdapter: - logger = ... # type: Any - extra = ... # type: Any - def __init__(self, logger, extra): ... - def process(self, msg, kwargs): ... - def debug(self, msg: str, *args, **kwargs) -> None: ... - def info(self, msg: str, *args, **kwargs) -> None: ... - def warning(self, msg: str, *args, **kwargs) -> None: ... - def warn(self, msg: str, *args, **kwargs) -> None: ... - def error(self, msg: str, *args, **kwargs) -> None: ... - def exception(self, msg: str, *args, **kwargs) -> None: ... - def critical(self, msg: str, *args, **kwargs) -> None: ... - def log(self, level: int, msg: str, *args, **kwargs) -> None: ... - def isEnabledFor(self, level: int) -> bool: ... - def setLevel(self, level: int) -> None: ... - def getEffectiveLevel(self) -> int: ... - def hasHandlers(self): ... - -def basicConfig(**kwargs) -> None: ... -def getLogger(name: str = None) -> Logger: ... -def critical(msg: str, *args, **kwargs) -> None: ... - -fatal = ... # type: Any - -def error(msg: str, *args, **kwargs) -> None: ... -@overload -def exception(msg: str, *args, **kwargs) -> None: ... -@overload -def exception(exception: Exception, *args, **kwargs) -> None: ... -def warning(msg: str, *args, **kwargs) -> None: ... -def warn(msg: str, *args, **kwargs) -> None: ... -def info(msg: str, *args, **kwargs) -> None: ... -def debug(msg: str, *args, **kwargs) -> None: ... -def log(level: int, msg: str, *args, **kwargs) -> None: ... -def disable(level: int) -> None: ... - -class NullHandler(Handler): - def handle(self, record): ... - def emit(self, record): ... - lock = ... # type: Any - def createLock(self): ... - -def captureWarnings(capture: bool) -> None: ... diff --git a/stubs/2.7/logging/handlers.pyi b/stubs/2.7/logging/handlers.pyi deleted file mode 100644 index ec179ca4e194..000000000000 --- a/stubs/2.7/logging/handlers.pyi +++ /dev/null @@ -1,200 +0,0 @@ -# Stubs for logging.handlers (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import logging - -threading = ... # type: Any -DEFAULT_TCP_LOGGING_PORT = ... # type: Any -DEFAULT_UDP_LOGGING_PORT = ... # type: Any -DEFAULT_HTTP_LOGGING_PORT = ... # type: Any -DEFAULT_SOAP_LOGGING_PORT = ... # type: Any -SYSLOG_UDP_PORT = ... # type: Any -SYSLOG_TCP_PORT = ... # type: Any - -class BaseRotatingHandler(logging.FileHandler): - mode = ... # type: Any - encoding = ... # type: Any - namer = ... # type: Any - rotator = ... # type: Any - def __init__(self, filename, mode, encoding=None, delay=0): ... - def emit(self, record): ... - def rotation_filename(self, default_name): ... - def rotate(self, source, dest): ... - -class RotatingFileHandler(BaseRotatingHandler): - maxBytes = ... # type: Any - backupCount = ... # type: Any - def __init__(self, filename: str, mode: str = ..., maxBytes: int = ..., backupCount:int = ..., - encoding: str = None, delay: int = ...) -> None: ... - stream = ... # type: Any - def doRollover(self): ... - def shouldRollover(self, record): ... - -class TimedRotatingFileHandler(BaseRotatingHandler): - when = ... # type: Any - backupCount = ... # type: Any - utc = ... # type: Any - atTime = ... # type: Any - interval = ... # type: Any - suffix = ... # type: Any - extMatch = ... # type: Any - dayOfWeek = ... # type: Any - rolloverAt = ... # type: Any - def __init__(self, filename, when='', interval=1, backupCount=0, encoding=None, delay=0, - utc=False, atTime=None): ... - def computeRollover(self, currentTime): ... - def shouldRollover(self, record): ... - def getFilesToDelete(self): ... - stream = ... # type: Any - def doRollover(self): ... - -class WatchedFileHandler(logging.FileHandler): - def __init__(self, filename: str, mode: str = ..., encoding: str = None, delay: int = ...): ... - stream = ... # type: Any - def emit(self, record): ... - -class SocketHandler(logging.Handler): - host = ... # type: Any - port = ... # type: Any - address = ... # type: Any - sock = ... # type: Any - closeOnError = ... # type: Any - retryTime = ... # type: Any - retryStart = ... # type: Any - retryMax = ... # type: Any - retryFactor = ... # type: Any - def __init__(self, host, port): ... - def makeSocket(self, timeout=1): ... - retryPeriod = ... # type: Any - def createSocket(self): ... - def send(self, s): ... - def makePickle(self, record): ... - def handleError(self, record): ... - def emit(self, record): ... - def close(self): ... - -class DatagramHandler(SocketHandler): - closeOnError = ... # type: Any - def __init__(self, host, port): ... - def makeSocket(self, timeout=1): ... # TODO: Actually does not have the timeout argument. - def send(self, s): ... - -class SysLogHandler(logging.Handler): - LOG_EMERG = ... # type: Any - LOG_ALERT = ... # type: Any - LOG_CRIT = ... # type: Any - LOG_ERR = ... # type: Any - LOG_WARNING = ... # type: Any - LOG_NOTICE = ... # type: Any - LOG_INFO = ... # type: Any - LOG_DEBUG = ... # type: Any - LOG_KERN = ... # type: Any - LOG_USER = ... # type: Any - LOG_MAIL = ... # type: Any - LOG_DAEMON = ... # type: Any - LOG_AUTH = ... # type: Any - LOG_SYSLOG = ... # type: Any - LOG_LPR = ... # type: Any - LOG_NEWS = ... # type: Any - LOG_UUCP = ... # type: Any - LOG_CRON = ... # type: Any - LOG_AUTHPRIV = ... # type: Any - LOG_FTP = ... # type: Any - LOG_LOCAL0 = ... # type: Any - LOG_LOCAL1 = ... # type: Any - LOG_LOCAL2 = ... # type: Any - LOG_LOCAL3 = ... # type: Any - LOG_LOCAL4 = ... # type: Any - LOG_LOCAL5 = ... # type: Any - LOG_LOCAL6 = ... # type: Any - LOG_LOCAL7 = ... # type: Any - priority_names = ... # type: Any - facility_names = ... # type: Any - priority_map = ... # type: Any - address = ... # type: Any - facility = ... # type: Any - socktype = ... # type: Any - unixsocket = ... # type: Any - socket = ... # type: Any - formatter = ... # type: Any - def __init__(self, address=..., facility=..., socktype=None): ... - def encodePriority(self, facility, priority): ... - def close(self): ... - def mapPriority(self, levelName): ... - ident = ... # type: Any - append_nul = ... # type: Any - def emit(self, record): ... - -class SMTPHandler(logging.Handler): - username = ... # type: Any - fromaddr = ... # type: Any - toaddrs = ... # type: Any - subject = ... # type: Any - secure = ... # type: Any - timeout = ... # type: Any - def __init__(self, mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None, - timeout=0.0): ... - def getSubject(self, record): ... - def emit(self, record): ... - -class NTEventLogHandler(logging.Handler): - appname = ... # type: Any - dllname = ... # type: Any - logtype = ... # type: Any - deftype = ... # type: Any - typemap = ... # type: Any - def __init__(self, appname, dllname=None, logtype=''): ... - def getMessageID(self, record): ... - def getEventCategory(self, record): ... - def getEventType(self, record): ... - def emit(self, record): ... - def close(self): ... - -class HTTPHandler(logging.Handler): - host = ... # type: Any - url = ... # type: Any - method = ... # type: Any - secure = ... # type: Any - credentials = ... # type: Any - def __init__(self, host, url, method='', secure=False, credentials=None): ... - def mapLogRecord(self, record): ... - def emit(self, record): ... - -class BufferingHandler(logging.Handler): - capacity = ... # type: Any - buffer = ... # type: Any - def __init__(self, capacity: int) -> None: ... - def shouldFlush(self, record): ... - def emit(self, record): ... - def flush(self): ... - def close(self): ... - -class MemoryHandler(BufferingHandler): - flushLevel = ... # type: Any - target = ... # type: Any - def __init__(self, capacity, flushLevel=..., target=None): ... - def shouldFlush(self, record): ... - def setTarget(self, target): ... - buffer = ... # type: Any - def flush(self): ... - def close(self): ... - -class QueueHandler(logging.Handler): - queue = ... # type: Any - def __init__(self, queue): ... - def enqueue(self, record): ... - def prepare(self, record): ... - def emit(self, record): ... - -class QueueListener: - queue = ... # type: Any - handlers = ... # type: Any - def __init__(self, queue, *handlers): ... - def dequeue(self, block): ... - def start(self): ... - def prepare(self, record): ... - def handle(self, record): ... - def enqueue_sentinel(self): ... - def stop(self): ... diff --git a/stubs/2.7/marshal.pyi b/stubs/2.7/marshal.pyi deleted file mode 100644 index de83a8e984eb..000000000000 --- a/stubs/2.7/marshal.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Any, IO - -def dump(value: Any, file: IO[Any], version: int = None) -> None: ... -def load(file: IO[Any]) -> Any: ... -def dumps(value: Any, version: int = None) -> str: ... -def loads(string: str) -> Any: ... - -version = ... # type: int diff --git a/stubs/2.7/math.pyi b/stubs/2.7/math.pyi deleted file mode 100644 index a8e233aad5fb..000000000000 --- a/stubs/2.7/math.pyi +++ /dev/null @@ -1,52 +0,0 @@ -# Stubs for math -# Ron Murawski - -# based on: http://docs.python.org/2/library/math.html - -from typing import overload, Tuple, Iterable - -# ----- variables and constants ----- -e = 0.0 -pi = 0.0 - -# ----- functions ----- -def ceil(x: float) -> int: ... -def copysign(x: float, y: float) -> float: ... -def fabs(x: float) -> float: ... -def factorial(x: int) -> int: ... -def floor(x: float) -> int: ... -def fmod(x: float, y: float) -> float: ... -def frexp(x: float) -> Tuple[float, int]: ... -def fsum(iterable: Iterable) -> float: ... -def isinf(x: float) -> bool: ... -def isnan(x: float) -> bool: ... -def ldexp(x: float, i: int) -> float: ... -def modf(x: float) -> Tuple[float, float]: ... -def trunc(x: float) -> float: ... -def exp(x: float) -> float: ... -def expm1(x: float) -> float: ... -def log(x: float, base: float = e) -> float: ... -def log1p(x: float) -> float: ... -def log10(x: float) -> float: ... -def pow(x: float, y: float) -> float: ... -def sqrt(x: float) -> float: ... -def acos(x: float) -> float: ... -def asin(x: float) -> float: ... -def atan(x: float) -> float: ... -def atan2(y: float, x: float) -> float: ... -def cos(x: float) -> float: ... -def hypot(x: float, y: float) -> float: ... -def sin(x: float) -> float: ... -def tan(x: float) -> float: ... -def degrees(x: float) -> float: ... -def radians(x: float) -> float: ... -def acosh(x: float) -> float: ... -def asinh(x: float) -> float: ... -def atanh(x: float) -> float: ... -def cosh(x: float) -> float: ... -def sinh(x: float) -> float: ... -def tanh(x: float) -> float: ... -def erf(x: object) -> float: ... -def erfc(x: object) -> float: ... -def gamma(x: object) -> float: ... -def lgamma(x: object) -> float: ... diff --git a/stubs/2.7/md5.pyi b/stubs/2.7/md5.pyi deleted file mode 100644 index daec724f3e8f..000000000000 --- a/stubs/2.7/md5.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for Python 2.7 md5 stdlib module - -class md5(object): - def update(self, arg: str) -> None: ... - def digest(self) -> str: ... - def hexdigest(self) -> str: ... - def copy(self) -> md5: ... - -def new(string: str = None) -> md5: ... -blocksize = 0 -digest_size = 0 diff --git a/stubs/2.7/numbers.pyi b/stubs/2.7/numbers.pyi deleted file mode 100644 index 1d8236584809..000000000000 --- a/stubs/2.7/numbers.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# Stubs for numbers (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Number: - __metaclass__ = ... # type: Any - __hash__ = ... # type: Any - -class Complex(Number): - def __complex__(self): ... - def __nonzero__(self): ... - def real(self): ... - def imag(self): ... - def __add__(self, other): ... - def __radd__(self, other): ... - def __neg__(self): ... - def __pos__(self): ... - def __sub__(self, other): ... - def __rsub__(self, other): ... - def __mul__(self, other): ... - def __rmul__(self, other): ... - def __div__(self, other): ... - def __rdiv__(self, other): ... - def __truediv__(self, other): ... - def __rtruediv__(self, other): ... - def __pow__(self, exponent): ... - def __rpow__(self, base): ... - def __abs__(self): ... - def conjugate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class Real(Complex): - def __float__(self): ... - def __trunc__(self): ... - def __divmod__(self, other): ... - def __rdivmod__(self, other): ... - def __floordiv__(self, other): ... - def __rfloordiv__(self, other): ... - def __mod__(self, other): ... - def __rmod__(self, other): ... - def __lt__(self, other): ... - def __le__(self, other): ... - def __complex__(self): ... - @property - def real(self): ... - @property - def imag(self): ... - def conjugate(self): ... - -class Rational(Real): - def numerator(self): ... - def denominator(self): ... - def __float__(self): ... - -class Integral(Rational): - def __long__(self): ... - def __index__(self): ... - def __pow__(self, exponent, modulus=None): ... - def __lshift__(self, other): ... - def __rlshift__(self, other): ... - def __rshift__(self, other): ... - def __rrshift__(self, other): ... - def __and__(self, other): ... - def __rand__(self, other): ... - def __xor__(self, other): ... - def __rxor__(self, other): ... - def __or__(self, other): ... - def __ror__(self, other): ... - def __invert__(self): ... - def __float__(self): ... - @property - def numerator(self): ... - @property - def denominator(self): ... diff --git a/stubs/2.7/operator.pyi b/stubs/2.7/operator.pyi deleted file mode 100644 index bc3919c61a44..000000000000 --- a/stubs/2.7/operator.pyi +++ /dev/null @@ -1,16 +0,0 @@ -# Stubs for operator - -# NOTE: These are incomplete! - -from typing import Any - -def add(a: Any, b: Any) -> Any: ... - -def and_(a: Any, b: Any) -> Any: ... - -def lt(a: Any, b: Any) -> Any: ... -def le(a: Any, b: Any) -> Any: ... -def eq(a: Any, b: Any) -> Any: ... -def ne(a: Any, b: Any) -> Any: ... -def gt(a: Any, b: Any) -> Any: ... -def ge(a: Any, b: Any) -> Any: ... diff --git a/stubs/2.7/os/__init__.pyi b/stubs/2.7/os/__init__.pyi deleted file mode 100644 index 6437be4ff69b..000000000000 --- a/stubs/2.7/os/__init__.pyi +++ /dev/null @@ -1,184 +0,0 @@ -# created from https://docs.python.org/2/library/os.html - -from typing import List, Tuple, Union, Sequence, Mapping, IO, Any, Optional, AnyStr -import os.path as path - -error = OSError -name = ... # type: str -environ = ... # type: Mapping[str, str] - -def chdir(path: unicode) -> None: ... -def fchdir(fd: int) -> None: ... -def getcwd() -> str: ... -def ctermid() -> str: ... -def getegid() -> int: ... -def geteuid() -> int: ... -def getgid() -> int: ... -def getgroups() -> List[int]: ... -def initgroups(username: str, gid: int) -> None: ... -def getlogin() -> str: ... -def getpgid(pid: int) -> int: ... -def getpgrp() -> int: ... -def getpid() -> int: ... -def getppid() -> int: ... -def getresuid() -> Tuple[int, int, int]: ... -def getresgid() -> Tuple[int, int, int]: ... -def getuid() -> int: ... -def getenv(varname: str, value: str = None) -> str: ... -def putenv(varname: str, value: str) -> None: ... -def setegid(egid: int) -> None: ... -def seteuid(euid: int) -> None: ... -def setgid(gid: int) -> None: ... -def setgroups(groups: Sequence[int]) -> None: ... - -# TODO(MichalPokorny) -def setpgrp(*args) -> None: ... - -def setpgid(pid: int, pgrp: int) -> None: ... -def setregid(rgid: int, egid: int) -> None: ... -def setresgid(rgid: int, egid: int, sgid: int) -> None: ... -def setresuid(ruid: int, euid: int, suid: int) -> None: ... -def setreuid(ruid: int, euid: int) -> None: ... -def getsid(pid: int) -> int: ... -def setsid() -> None: ... -def setuid(pid: int) -> None: ... - -def strerror(code: int) -> str: - raise ValueError() - -def umask(mask: int) -> int: ... -def uname() -> Tuple[str, str, str, str, str]: ... -def unsetenv(varname: str) -> None: ... - -# TODO(MichalPokorny) -def fdopen(fd: int, *args, **kwargs) -> IO[Any]: ... -def popen(command: str, *args, **kwargs) -> Optional[IO[Any]]: ... -def tmpfile() -> IO[Any]: ... - -def popen2(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any]]: ... -def popen3(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any], IO[Any]]: ... -def popen4(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any]]: ... - -def close(fd: int) -> None: ... -def closerange(fd_low: int, fd_high: int) -> None: ... -def dup(fd: int) -> int: ... -def dup2(fd: int, fd2: int) -> None: ... -def fchmod(fd: int, mode: int) -> None: ... -def fchown(fd: int, uid: int, gid: int) -> None: ... -def fdatasync(fd: int) -> None: ... -def fpathconf(fd: int, name: str) -> None: ... - -# TODO(prvak) -def fstat(fd: int) -> Any: ... -def fstatvfs(fd: int) -> Any: ... -def fsync(fd: int) -> None: ... -def ftruncate(fd: int, length: int) -> None: ... -def isatty(fd: int) -> bool: ... - -def lseek(fd: int, pos: int, how: int) -> None: ... -SEEK_SET = 0 -SEEK_CUR = 1 -SEEK_END = 2 - -# TODO(prvak): maybe file should be unicode? (same with all other paths...) -def open(file: unicode, flags: int, mode: int = 0777) -> int: ... -def openpty() -> Tuple[int, int]: ... -def pipe() -> Tuple[int, int]: ... -def read(fd: int, n: int) -> str: ... -def tcgetpgrp(fd: int) -> int: ... -def tcsetpgrp(fd: int, pg: int) -> None: ... -def ttyname(fd: int) -> str: ... -def write(fd: int, str: str) -> int: ... - -# TODO: O_* - -def access(path: unicode, mode: int) -> bool: ... -F_OK = 0 -R_OK = 0 -W_OK = 0 -X_OK = 0 - -def getcwdu() -> unicode: ... -def chflags(path: unicode, flags: int) -> None: ... -def chroot(path: unicode) -> None: ... -def chmod(path: unicode, mode: int) -> None: ... -def chown(path: unicode, uid: int, gid: int) -> None: ... -def lchflags(path: unicode, flags: int) -> None: ... -def lchmod(path: unicode, uid: int, gid: int) -> None: ... -def lchown(path: unicode, uid: int, gid: int) -> None: ... -def link(source: unicode, link_name: unicode) -> None: ... -def listdir(path: AnyStr) -> List[AnyStr]: ... - -# TODO(MichalPokorny) -def lstat(path: unicode) -> Any: ... - -def mkfifo(path: unicode, mode: int = 0666) -> None: ... -def mknod(filename: unicode, mode: int = 0600, device: int = 0) -> None: ... -def major(device: int) -> int: ... -def minor(device: int) -> int: ... -def makedev(major: int, minor: int) -> int: ... -def mkdir(path: unicode, mode: int = 0777) -> None: ... -def makedirs(path: unicode, mode: int = 0777) -> None: ... -def pathconf(path: unicode, name: str) -> str: ... - -pathconf_names = ... # type: Mapping[str, int] - -def readlink(path: AnyStr) -> AnyStr: ... -def remove(path: unicode) -> None: ... -def removedirs(path: unicode) -> None: - raise OSError() -def rename(src: unicode, dst: unicode) -> None: ... -def renames(old: unicode, new: unicode) -> None: ... -def rmdir(path: unicode) -> None: ... - -# TODO(MichalPokorny) -def stat(path: unicode) -> Any: ... - -# TODO: stat_float_times, statvfs, tempnam, tmpnam, TMP_MAX, walk - -def symlink(source: unicode, link_name: unicode) -> None: ... -def unlink(path: unicode) -> None: ... -def utime(path: unicode, times: Optional[Tuple[int, int]]) -> None: ... - -def abort() -> None: ... -# TODO: exec*, _exit, EX_* - -def fork() -> int: - raise OSError() - -def forkpty() -> Tuple[int, int]: - raise OSError() - -def kill(pid: int, sig: int) -> None: ... -def killpg(pgid: int, sig: int) -> None: ... -def nice(increment: int) -> int: ... - -# TODO: plock, popen*, spawn*, P_* - -def startfile(path: unicode, operation: str) -> None: ... -def system(command: unicode) -> int: ... -def times() -> Tuple[float, float, float, float, float]: ... -def wait() -> int: ... -def waitpid(pid: int, options: int) -> int: - raise OSError() -# TODO: wait3, wait4, W... -def confstr(name: Union[str, int]) -> Optional[str]: ... -confstr_names = ... # type: Mapping[str, int] - -def getloadavg() -> Tuple[float, float, float]: - raise OSError() - -def sysconf(name: Union[str, int]) -> int: ... -sysconf_names = ... # type: Mapping[str, int] - -curdir = ... # type: str -pardir = ... # type: str -sep = ... # type: str -altsep = ... # type: str -extsep = ... # type: str -pathsep = ... # type: str -defpath = ... # type: str -linesep = ... # type: str -devnll = ... # type: str - -def urandom(n: int) -> str: ... diff --git a/stubs/2.7/os/path.pyi b/stubs/2.7/os/path.pyi deleted file mode 100644 index f77ed8c96a8c..000000000000 --- a/stubs/2.7/os/path.pyi +++ /dev/null @@ -1,65 +0,0 @@ -# Stubs for os.path -# Ron Murawski - -# based on http://docs.python.org/3.2/library/os.path.html -# adapted for 2.7 by Michal Pokorny - -from typing import overload, List, Any, Tuple, BinaryIO, TextIO, TypeVar, Callable, AnyStr - -# ----- os.path variables ----- -supports_unicode_filenames = False -# aliases (also in os) -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -devnull = '' - -# ----- os.path function stubs ----- -def abspath(path: AnyStr) -> AnyStr: ... -def basename(path: AnyStr) -> AnyStr: ... - -def commonprefix(list: List[AnyStr]) -> AnyStr: ... -def dirname(path: AnyStr) -> AnyStr: ... -def exists(path: unicode) -> bool: ... -def lexists(path: unicode) -> bool: ... -def expanduser(path: AnyStr) -> AnyStr: ... -def expandvars(path: AnyStr) -> AnyStr: ... - -# These return float if os.stat_float_times() == True, -# but int is a subclass of float. -def getatime(path: unicode) -> float: ... -def getmtime(path: unicode) -> float: ... -def getctime(path: unicode) -> float: ... - -def getsize(path: unicode) -> int: ... -def isabs(path: unicode) -> bool: ... -def isfile(path: unicode) -> bool: ... -def isdir(path: unicode) -> bool: ... -def islink(path: unicode) -> bool: ... -def ismount(path: unicode) -> bool: ... - -def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... - -def normcase(path: AnyStr) -> AnyStr: ... -def normpath(path: AnyStr) -> AnyStr: ... -def realpath(path: AnyStr) -> AnyStr: ... -def relpath(path: AnyStr, start: AnyStr = None) -> AnyStr: ... - -def samefile(path1: unicode, path2: unicode) -> bool: ... -def sameopenfile(fp1: int, fp2: int) -> bool: ... -# TODO -#def samestat(stat1: stat_result, -# stat2: stat_result) -> bool: ... # Unix only - -def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... -def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... -def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... - -def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # Windows only, deprecated - -_T = TypeVar('_T') -def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... diff --git a/stubs/2.7/pickle.pyi b/stubs/2.7/pickle.pyi deleted file mode 100644 index e04cdf89cf74..000000000000 --- a/stubs/2.7/pickle.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for pickle (Python 2) - -from typing import Any, IO - -def dump(obj: Any, file: IO[str], protocol: int = None) -> None: ... -def dumps(obj: Any, protocol: int = None) -> str: ... -def load(file: IO[str]) -> Any: ... -def loads(str: str) -> Any: ... diff --git a/stubs/2.7/pipes.pyi b/stubs/2.7/pipes.pyi deleted file mode 100644 index 6cfb94ed2c31..000000000000 --- a/stubs/2.7/pipes.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, IO - -class Template: - def __init__(self) -> None: ... - def reset(self) -> None: ... - def clone(self) -> Template: ... - def debug(flag: bool) -> None: ... - def append(cmd: str, kind: str) -> None: ... - def prepend(cmd: str, kind: str) -> None: ... - def open(file: str, mode: str) -> IO[Any]: ... - def copy(infile: str, outfile: str) -> None: ... - -def quote(s: str) -> str: ... diff --git a/stubs/2.7/pprint.pyi b/stubs/2.7/pprint.pyi deleted file mode 100644 index 6224446d1a58..000000000000 --- a/stubs/2.7/pprint.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for pprint (Python 2) -# -# NOTE: Based on a dynamically typed automatically generated by stubgen. - -from typing import IO, Any - -def pprint(object: Any, stream: IO[Any] = None, indent: int = 1, width: int = 80, - depth: int = None) -> None: ... -def pformat(object, indent=1, width=80, depth=None): ... -def saferepr(object): ... -def isreadable(object): ... -def isrecursive(object): ... - -class PrettyPrinter: - def __init__(self, indent: int = 1, width: int = 80, depth: int = None, - stream: IO[Any] = None) -> None: ... - def pprint(self, object): ... - def pformat(self, object): ... - def isrecursive(self, object): ... - def isreadable(self, object): ... - def format(self, object, context, maxlevels, level): ... diff --git a/stubs/2.7/random.pyi b/stubs/2.7/random.pyi deleted file mode 100644 index 1259a217f054..000000000000 --- a/stubs/2.7/random.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# Stubs for random -# Ron Murawski -# Updated by Jukka Lehtosalo - -# based on https://docs.python.org/2/library/random.html - -# ----- random classes ----- - -import _random -from typing import ( - Any, TypeVar, Sequence, List, Callable, AbstractSet, Union, - overload -) - -_T = TypeVar('_T') - -class Random(_random.Random): - def __init__(self, x: object = None) -> None: ... - def seed(self, x: object = None) -> None: ... - def getstate(self) -> tuple: ... - def setstate(self, state: tuple) -> None: ... - def jumpahead(self, n : int) -> None: ... - def getrandbits(self, k: int) -> int: ... - @overload - def randrange(self, stop: int) -> int: ... - @overload - def randrange(self, start: int, stop: int, step: int = 1) -> int: ... - def randint(self, a: int, b: int) -> int: ... - def choice(self, seq: Sequence[_T]) -> _T: ... - def shuffle(self, x: List[Any], random: Callable[[], None] = None) -> None: ... - def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... - def random(self) -> float: ... - def uniform(self, a: float, b: float) -> float: ... - def triangular(self, low: float = 0.0, high: float = 1.0, - mode: float = None) -> float: ... - def betavariate(self, alpha: float, beta: float) -> float: ... - def expovariate(self, lambd: float) -> float: ... - def gammavariate(self, alpha: float, beta: float) -> float: ... - def gauss(self, mu: float, sigma: float) -> float: ... - def lognormvariate(self, mu: float, sigma: float) -> float: ... - def normalvariate(self, mu: float, sigma: float) -> float: ... - def vonmisesvariate(self, mu: float, kappa: float) -> float: ... - def paretovariate(self, alpha: float) -> float: ... - def weibullvariate(self, alpha: float, beta: float) -> float: ... - -# SystemRandom is not implemented for all OS's; good on Windows & Linux -class SystemRandom: - def __init__(self, randseed: object = None) -> None: ... - def random(self) -> float: ... - def getrandbits(self, k: int) -> int: ... - def seed(self, x: object = None) -> None: ... - -# ----- random function stubs ----- -def seed(x: object = None) -> None: ... -def getstate() -> object: ... -def setstate(state: object) -> None: ... -def jumpahead(n : int) -> None: ... -def getrandbits(k: int) -> int: ... -@overload -def randrange(stop: int) -> int: ... -@overload -def randrange(start: int, stop: int, step: int = 1) -> int: ... -def randint(a: int, b: int) -> int: ... -def choice(seq: Sequence[_T]) -> _T: ... -def shuffle(x: List[Any], random: Callable[[], float] = None) -> None: ... -def sample(population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... -def random() -> float: ... -def uniform(a: float, b: float) -> float: ... -def triangular(low: float = 0.0, high: float = 1.0, - mode: float = None) -> float: ... -def betavariate(alpha: float, beta: float) -> float: ... -def expovariate(lambd: float) -> float: ... -def gammavariate(alpha: float, beta: float) -> float: ... -def gauss(mu: float, sigma: float) -> float: ... -def lognormvariate(mu: float, sigma: float) -> float: ... -def normalvariate(mu: float, sigma: float) -> float: ... -def vonmisesvariate(mu: float, kappa: float) -> float: ... -def paretovariate(alpha: float) -> float: ... -def weibullvariate(alpha: float, beta: float) -> float: ... diff --git a/stubs/2.7/re.pyi b/stubs/2.7/re.pyi deleted file mode 100644 index 279a9f74b35b..000000000000 --- a/stubs/2.7/re.pyi +++ /dev/null @@ -1,63 +0,0 @@ -# Stubs for re -# Ron Murawski -# 'bytes' support added by Jukka Lehtosalo - -# based on: http://docs.python.org/2.7/library/re.html - -from typing import ( - List, Iterator, overload, Callable, Tuple, Sequence, Dict, - Generic, AnyStr, Match, Pattern -) - -# ----- re variables and constants ----- -A = 0 -ASCII = 0 -DEBUG = 0 -I = 0 -IGNORECASE = 0 -L = 0 -LOCALE = 0 -M = 0 -MULTILINE = 0 -S = 0 -DOTALL = 0 -X = 0 -VERBOSE = 0 - -class error(Exception): ... - -def compile(pattern: AnyStr, flags: int = 0) -> Pattern[AnyStr]: ... -def search(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Match[AnyStr]: ... -def match(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Match[AnyStr]: ... -def split(pattern: AnyStr, string: AnyStr, maxsplit: int = 0, - flags: int = 0) -> List[AnyStr]: ... -def findall(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> List[AnyStr]: ... - -# Return an iterator yielding match objects over all non-overlapping matches -# for the RE pattern in string. The string is scanned left-to-right, and -# matches are returned in the order found. Empty matches are included in the -# result unless they touch the beginning of another match. -def finditer(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Iterator[Match[AnyStr]]: ... - -@overload -def sub(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = 0, - flags: int = 0) -> AnyStr: ... -@overload -def sub(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr], - string: AnyStr, count: int = 0, flags: int = 0) -> AnyStr: ... - -@overload -def subn(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = 0, - flags: int = 0) -> Tuple[AnyStr, int]: ... -@overload -def subn(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr], - string: AnyStr, count: int = 0, - flags: int = 0) -> Tuple[AnyStr, int]: ... - -def escape(string: AnyStr) -> AnyStr: ... - -def purge() -> None: ... diff --git a/stubs/2.7/resource.pyi b/stubs/2.7/resource.pyi deleted file mode 100644 index 8d094efefdb6..000000000000 --- a/stubs/2.7/resource.pyi +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Tuple, NamedTuple - -class error(Exception): ... - -RLIM_INFINITY = ... # type: int -def getrlimit(resource: int) -> Tuple[int, int]: ... -def setrlimit(resource: int, limits: Tuple[int, int]) -> None: ... - -RLIMIT_CORE = ... # type: int -RLIMIT_CPU = ... # type: int -RLIMIT_FSIZE = ... # type: int -RLIMIT_DATA = ... # type: int -RLIMIT_STACK = ... # type: int -RLIMIT_RSS = ... # type: int -RLIMIT_NPROC = ... # type: int -RLIMIT_NOFILE = ... # type: int -RLIMIT_OFILE= ... # type: int -RLIMIT_MEMLOCK = ... # type: int -RLIMIT_VMEM = ... # type: int -RLIMIT_AS = ... # type: int - -_RUsage = NamedTuple('_RUsage', [('ru_utime', float), ('ru_stime', float), ('ru_maxrss', int), - ('ru_ixrss', int), ('ru_idrss', int), ('ru_isrss', int), - ('ru_minflt', int), ('ru_majflt', int), ('ru_nswap', int), - ('ru_inblock', int), ('ru_oublock', int), ('ru_msgsnd', int), - ('ru_msgrcv', int), ('ru_nsignals', int), ('ru_nvcsw', int), - ('ru_nivcsw', int)]) -def getrusage(who: int) -> _RUsage: ... -def getpagesize() -> int: ... - -RUSAGE_SELF = ... # type: int -RUSAGE_CHILDREN = ... # type: int -RUSAGE_BOTH = ... # type: int diff --git a/stubs/2.7/select.pyi b/stubs/2.7/select.pyi deleted file mode 100644 index 217fa913bf00..000000000000 --- a/stubs/2.7/select.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# Stubs for select (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -KQ_EV_ADD = ... # type: int -KQ_EV_CLEAR = ... # type: int -KQ_EV_DELETE = ... # type: int -KQ_EV_DISABLE = ... # type: int -KQ_EV_ENABLE = ... # type: int -KQ_EV_EOF = ... # type: int -KQ_EV_ERROR = ... # type: int -KQ_EV_FLAG1 = ... # type: int -KQ_EV_ONESHOT = ... # type: int -KQ_EV_SYSFLAGS = ... # type: int -KQ_FILTER_AIO = ... # type: int -KQ_FILTER_PROC = ... # type: int -KQ_FILTER_READ = ... # type: int -KQ_FILTER_SIGNAL = ... # type: int -KQ_FILTER_TIMER = ... # type: int -KQ_FILTER_VNODE = ... # type: int -KQ_FILTER_WRITE = ... # type: int -KQ_NOTE_ATTRIB = ... # type: int -KQ_NOTE_CHILD = ... # type: int -KQ_NOTE_DELETE = ... # type: int -KQ_NOTE_EXEC = ... # type: int -KQ_NOTE_EXIT = ... # type: int -KQ_NOTE_EXTEND = ... # type: int -KQ_NOTE_FORK = ... # type: int -KQ_NOTE_LINK = ... # type: int -KQ_NOTE_LOWAT = ... # type: int -KQ_NOTE_PCTRLMASK = ... # type: int -KQ_NOTE_PDATAMASK = ... # type: int -KQ_NOTE_RENAME = ... # type: int -KQ_NOTE_REVOKE = ... # type: int -KQ_NOTE_TRACK = ... # type: int -KQ_NOTE_TRACKERR = ... # type: int -KQ_NOTE_WRITE = ... # type: int -PIPE_BUF = ... # type: int -POLLERR = ... # type: int -POLLHUP = ... # type: int -POLLIN = ... # type: int -POLLNVAL = ... # type: int -POLLOUT = ... # type: int -POLLPRI = ... # type: int -POLLRDBAND = ... # type: int -POLLRDNORM = ... # type: int -POLLWRBAND = ... # type: int -POLLWRNORM = ... # type: int -EPOLLIN = ... # type: int -EPOLLOUT = ... # type: int -EPOLLPRI = ... # type: int -EPOLLERR = ... # type: int -EPOLLHUP = ... # type: int -EPOLLET = ... # type: int -EPOLLONESHOT = ... # type: int -EPOLLRDNORM = ... # type: int -EPOLLRDBAND = ... # type: int -EPOLLWRNORM = ... # type: int -EPOLLWRBAND = ... # type: int -EPOLLMSG = ... # type: int - -def poll(): ... -def select(rlist, wlist, xlist, timeout=...): ... - -class error(Exception): - characters_written = ... # type: Any - errno = ... # type: Any - filename = ... # type: Any - filename2 = ... # type: Any - strerror = ... # type: Any - def __init__(self, *args, **kwargs): ... - def __reduce__(self): ... - -class kevent: - data = ... # type: Any - fflags = ... # type: Any - filter = ... # type: Any - flags = ... # type: Any - ident = ... # type: Any - udata = ... # type: Any - __hash__ = ... # type: Any - def __init__(self, *args, **kwargs): ... - def __eq__(self, other): ... - def __ge__(self, other): ... - def __gt__(self, other): ... - def __le__(self, other): ... - def __lt__(self, other): ... - def __ne__(self, other): ... - -class kqueue: - closed = ... # type: Any - def __init__(self, *args, **kwargs): ... - def close(self): ... - def control(self, *args, **kwargs): ... - def fileno(self): ... - @classmethod - def fromfd(cls, fd): ... - -class epoll: - def __init__(self, sizehint: int = ...) -> None: ... - def close(self) -> None: ... - def fileno(self) -> int: ... - def fromfd(self, fd): ... - def register(self, fd: int, eventmask: int = ...) -> None: ... - def modify(self, fd: int, eventmask: int) -> None: ... - def unregister(fd: int) -> None: ... - def poll(timeout: float = ..., maxevents: int = ...) -> Any: ... diff --git a/stubs/2.7/sha.pyi b/stubs/2.7/sha.pyi deleted file mode 100644 index 01699e831003..000000000000 --- a/stubs/2.7/sha.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for Python 2.7 sha stdlib module - -class sha(object): - def update(self, arg: str) -> None: ... - def digest(self) -> str: ... - def hexdigest(self) -> str: ... - def copy(self) -> sha: ... - -def new(string: str = None) -> sha: ... -blocksize = 0 -digest_size = 0 - diff --git a/stubs/2.7/shlex.pyi b/stubs/2.7/shlex.pyi deleted file mode 100644 index 45d9abb4982d..000000000000 --- a/stubs/2.7/shlex.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from typing import Optional, List, Any, IO - -def split(s: Optional[str], comments: bool = False, posix: bool = True) -> List[str]: ... - -class shlex: - def __init__(self, instream: IO[Any] = None, infile: IO[Any] = None, posix: bool = True) -> None: ... - def get_token(self) -> Optional[str]: ... - def push_token(self, _str: str) -> None: ... - def read_token(self) -> str: ... - def sourcehook(self, filename: str) -> None: ... - def push_source(self, stream: IO[Any], filename: str = None) -> None: ... - def pop_source(self) -> IO[Any]: ... - def error_leader(file: str = None, line: int = None) -> str: ... - - commenters = ... # type: str - wordchars = ... # type: str - whitespace = ... # type: str - escape = ... # type: str - quotes = ... # type: str - escapedquotes = ... # type: str - whitespace_split = ... # type: bool - infile = ... # type: IO[Any] - source = ... # type: Optional[str] - debug = ... # type: int - lineno = ... # type: int - token = ... # type: Any - eof = ... # type: Optional[str] diff --git a/stubs/2.7/shutil.pyi b/stubs/2.7/shutil.pyi deleted file mode 100644 index f8656d4d5aa5..000000000000 --- a/stubs/2.7/shutil.pyi +++ /dev/null @@ -1,30 +0,0 @@ -# Stubs for shutil (Python 2) -# -# NOTE: Based on a dynamically typed stub automatically generated by stubgen. - -from typing import List, Iterable, Callable, IO, AnyStr, Any, Tuple, Sequence - -class Error(EnvironmentError): ... -class SpecialFileError(EnvironmentError): ... -class ExecError(EnvironmentError): ... - -def copyfileobj(fsrc: IO[AnyStr], fdst: IO[AnyStr], length: int = ...) -> None: ... -def copyfile(src: unicode, dst: unicode) -> None: ... -def copymode(src: unicode, dst: unicode) -> None: ... -def copystat(src: unicode, dst: unicode) -> None: ... -def copy(src: unicode, dst: unicode) -> None: ... -def copy2(src: unicode, dst: unicode) -> None: ... -def ignore_patterns(*patterns: AnyStr) -> Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]]: ... -def copytree(src: AnyStr, dst: AnyStr, symlinks: bool = False, - ignore: Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]] = None) -> None: ... -def rmtree(path: AnyStr, ignore_errors: bool = False, - onerror: Callable[[Any, AnyStr, Any], None] = None) -> None: ... -def move(src: unicode, dst: unicode) -> None: ... -def get_archive_formats() -> List[Tuple[str, str]]: ... -def register_archive_format(name: str, function: Callable[..., Any], - extra_args: Sequence[Tuple[str, Any]] = None, - description: str = '') -> None: ... -def unregister_archive_format(name: str) -> None: ... -def make_archive(base_name: AnyStr, format: str, root_dir: unicode = None, - base_dir: unicode = None, verbose: int = 0, dry_run: int = 0, - owner: str = None, group: str = None, logger: Any = None) -> AnyStr: ... diff --git a/stubs/2.7/signal.pyi b/stubs/2.7/signal.pyi deleted file mode 100644 index 06b83ddc10d1..000000000000 --- a/stubs/2.7/signal.pyi +++ /dev/null @@ -1,60 +0,0 @@ -from typing import Callable, Any, Tuple, Union - -SIG_DFL = 0 -SIG_IGN = 0 - -SIGABRT = 0 -SIGALRM = 0 -SIGBUS = 0 -SIGCHLD = 0 -SIGCLD = 0 -SIGCONT = 0 -SIGFPE = 0 -SIGHUP = 0 -SIGILL = 0 -SIGINT = 0 -SIGIO = 0 -SIGIOT = 0 -SIGKILL = 0 -SIGPIPE = 0 -SIGPOLL = 0 -SIGPROF = 0 -SIGPWR = 0 -SIGQUIT = 0 -SIGRTMAX = 0 -SIGRTMIN = 0 -SIGSEGV = 0 -SIGSTOP = 0 -SIGSYS = 0 -SIGTERM = 0 -SIGTRAP = 0 -SIGTSTP = 0 -SIGTTIN = 0 -SIGTTOU = 0 -SIGURG = 0 -SIGUSR1 = 0 -SIGUSR2 = 0 -SIGVTALRM = 0 -SIGWINCH = 0 -SIGXCPU = 0 -SIGXFSZ = 0 - -CTRL_C_EVENT = 0 -CTRL_BREAK_EVENT = 0 -GSIG = 0 -ITIMER_REAL = 0 -ITIMER_VIRTUAL = 0 -ITIMER_PROF = 0 - -class ItimerError(IOError): ... - -_HANDLER = Union[Callable[[int, Any], Any], int, None] - -def alarm(time: float) -> int: ... -def getsignal(signalnum: int) -> _HANDLER: ... -def pause() -> None: ... -def setitimer(which: int, seconds: float, interval: float = None) -> Tuple[float, float]: ... -def getitimer(which: int) -> Tuple[float, float]: ... -def set_wakeup_fd(fd: int) -> None: ... -def siginterrupt(signalnum: int, flag: bool) -> None: ... -def signal(signalnum: int, handler: _HANDLER) -> None: ... diff --git a/stubs/2.7/simplejson.pyi b/stubs/2.7/simplejson.pyi deleted file mode 100644 index aa3a18a48578..000000000000 --- a/stubs/2.7/simplejson.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, IO - -class JSONDecodeError(ValueError): - def dumps(self, obj: Any) -> str: ... - def dump(self, obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... - def loads(self, s: str) -> Any: ... - def load(self, fp: IO[str]) -> Any: ... - -def dumps(obj: Any) -> str: ... -def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... -def loads(s: str, **kwds: Any) -> Any: ... -def load(fp: IO[str]) -> Any: ... diff --git a/stubs/2.7/smtplib.pyi b/stubs/2.7/smtplib.pyi deleted file mode 100644 index 89c56c62a94c..000000000000 --- a/stubs/2.7/smtplib.pyi +++ /dev/null @@ -1,90 +0,0 @@ -# Stubs for smtplib (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class SMTPException(Exception): ... -class SMTPServerDisconnected(SMTPException): ... - -class SMTPResponseException(SMTPException): - smtp_code = ... # type: Any - smtp_error = ... # type: Any - args = ... # type: Any - def __init__(self, code, msg): ... - -class SMTPSenderRefused(SMTPResponseException): - smtp_code = ... # type: Any - smtp_error = ... # type: Any - sender = ... # type: Any - args = ... # type: Any - def __init__(self, code, msg, sender): ... - -class SMTPRecipientsRefused(SMTPException): - recipients = ... # type: Any - args = ... # type: Any - def __init__(self, recipients): ... - -class SMTPDataError(SMTPResponseException): ... -class SMTPConnectError(SMTPResponseException): ... -class SMTPHeloError(SMTPResponseException): ... -class SMTPAuthenticationError(SMTPResponseException): ... - -def quoteaddr(addr): ... -def quotedata(data): ... - -class SSLFakeFile: - sslobj = ... # type: Any - def __init__(self, sslobj): ... - def readline(self, size=-1): ... - def close(self): ... - -class SMTP: - debuglevel = ... # type: Any - file = ... # type: Any - helo_resp = ... # type: Any - ehlo_msg = ... # type: Any - ehlo_resp = ... # type: Any - does_esmtp = ... # type: Any - default_port = ... # type: Any - timeout = ... # type: Any - esmtp_features = ... # type: Any - local_hostname = ... # type: Any - def __init__(self, host: str = '', port: int = 0, local_hostname=None, timeout=...) -> None: ... - def set_debuglevel(self, debuglevel): ... - sock = ... # type: Any - def connect(self, host='', port=0): ... - def send(self, str): ... - def putcmd(self, cmd, args=''): ... - def getreply(self): ... - def docmd(self, cmd, args=''): ... - def helo(self, name=''): ... - def ehlo(self, name=''): ... - def has_extn(self, opt): ... - def help(self, args=''): ... - def rset(self): ... - def noop(self): ... - def mail(self, sender, options=...): ... - def rcpt(self, recip, options=...): ... - def data(self, msg): ... - def verify(self, address): ... - vrfy = ... # type: Any - def expn(self, address): ... - def ehlo_or_helo_if_needed(self): ... - def login(self, user, password): ... - def starttls(self, keyfile=None, certfile=None): ... - def sendmail(self, from_addr, to_addrs, msg, mail_options=..., rcpt_options=...): ... - def close(self): ... - def quit(self): ... - -class SMTP_SSL(SMTP): - default_port = ... # type: Any - keyfile = ... # type: Any - certfile = ... # type: Any - def __init__(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None, timeout=...): ... - -class LMTP(SMTP): - ehlo_msg = ... # type: Any - def __init__(self, host='', port=..., local_hostname=None): ... - sock = ... # type: Any - def connect(self, host='', port=0): ... diff --git a/stubs/2.7/socket.pyi b/stubs/2.7/socket.pyi deleted file mode 100644 index 22f74efb51ce..000000000000 --- a/stubs/2.7/socket.pyi +++ /dev/null @@ -1,388 +0,0 @@ -# Stubs for socket -# Ron Murawski - -# based on: http://docs.python.org/3.2/library/socket.html -# see: http://hg.python.org/cpython/file/3d0686d90f55/Lib/socket.py -# see: http://nullege.com/codes/search/socket -# adapted for Python 2.7 by Michal Pokorny - -from typing import Any, Tuple, overload, List, Optional, Union - -# ----- variables and constants ----- - -AF_UNIX = 0 -AF_INET = 0 -AF_INET6 = 0 -SOCK_STREAM = 0 -SOCK_DGRAM = 0 -SOCK_RAW = 0 -SOCK_RDM = 0 -SOCK_SEQPACKET = 0 -SOCK_CLOEXEC = 0 -SOCK_NONBLOCK = 0 -SOMAXCONN = 0 -has_ipv6 = False -_GLOBAL_DEFAULT_TIMEOUT = 0.0 -SocketType = ... # type: Any -SocketIO = ... # type: Any - - -# the following constants are included with Python 3.2.3 (Ubuntu) -# some of the constants may be Linux-only -# all Windows/Mac-specific constants are absent -AF_APPLETALK = 0 -AF_ASH = 0 -AF_ATMPVC = 0 -AF_ATMSVC = 0 -AF_AX25 = 0 -AF_BLUETOOTH = 0 -AF_BRIDGE = 0 -AF_DECnet = 0 -AF_ECONET = 0 -AF_IPX = 0 -AF_IRDA = 0 -AF_KEY = 0 -AF_LLC = 0 -AF_NETBEUI = 0 -AF_NETLINK = 0 -AF_NETROM = 0 -AF_PACKET = 0 -AF_PPPOX = 0 -AF_ROSE = 0 -AF_ROUTE = 0 -AF_SECURITY = 0 -AF_SNA = 0 -AF_TIPC = 0 -AF_UNSPEC = 0 -AF_WANPIPE = 0 -AF_X25 = 0 -AI_ADDRCONFIG = 0 -AI_ALL = 0 -AI_CANONNAME = 0 -AI_NUMERICHOST = 0 -AI_NUMERICSERV = 0 -AI_PASSIVE = 0 -AI_V4MAPPED = 0 -BDADDR_ANY = 0 -BDADDR_LOCAL = 0 -BTPROTO_HCI = 0 -BTPROTO_L2CAP = 0 -BTPROTO_RFCOMM = 0 -BTPROTO_SCO = 0 -CAPI = 0 -EAGAIN = 0 -EAI_ADDRFAMILY = 0 -EAI_AGAIN = 0 -EAI_BADFLAGS = 0 -EAI_FAIL = 0 -EAI_FAMILY = 0 -EAI_MEMORY = 0 -EAI_NODATA = 0 -EAI_NONAME = 0 -EAI_OVERFLOW = 0 -EAI_SERVICE = 0 -EAI_SOCKTYPE = 0 -EAI_SYSTEM = 0 -EBADF = 0 -EINTR = 0 -EWOULDBLOCK = 0 -HCI_DATA_DIR = 0 -HCI_FILTER = 0 -HCI_TIME_STAMP = 0 -INADDR_ALLHOSTS_GROUP = 0 -INADDR_ANY = 0 -INADDR_BROADCAST = 0 -INADDR_LOOPBACK = 0 -INADDR_MAX_LOCAL_GROUP = 0 -INADDR_NONE = 0 -INADDR_UNSPEC_GROUP = 0 -IPPORT_RESERVED = 0 -IPPORT_USERRESERVED = 0 -IPPROTO_AH = 0 -IPPROTO_DSTOPTS = 0 -IPPROTO_EGP = 0 -IPPROTO_ESP = 0 -IPPROTO_FRAGMENT = 0 -IPPROTO_GRE = 0 -IPPROTO_HOPOPTS = 0 -IPPROTO_ICMP = 0 -IPPROTO_ICMPV6 = 0 -IPPROTO_IDP = 0 -IPPROTO_IGMP = 0 -IPPROTO_IP = 0 -IPPROTO_IPIP = 0 -IPPROTO_IPV6 = 0 -IPPROTO_NONE = 0 -IPPROTO_PIM = 0 -IPPROTO_PUP = 0 -IPPROTO_RAW = 0 -IPPROTO_ROUTING = 0 -IPPROTO_RSVP = 0 -IPPROTO_TCP = 0 -IPPROTO_TP = 0 -IPPROTO_UDP = 0 -IPV6_CHECKSUM = 0 -IPV6_DSTOPTS = 0 -IPV6_HOPLIMIT = 0 -IPV6_HOPOPTS = 0 -IPV6_JOIN_GROUP = 0 -IPV6_LEAVE_GROUP = 0 -IPV6_MULTICAST_HOPS = 0 -IPV6_MULTICAST_IF = 0 -IPV6_MULTICAST_LOOP = 0 -IPV6_NEXTHOP = 0 -IPV6_PKTINFO = 0 -IPV6_RECVDSTOPTS = 0 -IPV6_RECVHOPLIMIT = 0 -IPV6_RECVHOPOPTS = 0 -IPV6_RECVPKTINFO = 0 -IPV6_RECVRTHDR = 0 -IPV6_RECVTCLASS = 0 -IPV6_RTHDR = 0 -IPV6_RTHDRDSTOPTS = 0 -IPV6_RTHDR_TYPE_0 = 0 -IPV6_TCLASS = 0 -IPV6_UNICAST_HOPS = 0 -IPV6_V6ONLY = 0 -IP_ADD_MEMBERSHIP = 0 -IP_DEFAULT_MULTICAST_LOOP = 0 -IP_DEFAULT_MULTICAST_TTL = 0 -IP_DROP_MEMBERSHIP = 0 -IP_HDRINCL = 0 -IP_MAX_MEMBERSHIPS = 0 -IP_MULTICAST_IF = 0 -IP_MULTICAST_LOOP = 0 -IP_MULTICAST_TTL = 0 -IP_OPTIONS = 0 -IP_RECVOPTS = 0 -IP_RECVRETOPTS = 0 -IP_RETOPTS = 0 -IP_TOS = 0 -IP_TTL = 0 -MSG_CTRUNC = 0 -MSG_DONTROUTE = 0 -MSG_DONTWAIT = 0 -MSG_EOR = 0 -MSG_OOB = 0 -MSG_PEEK = 0 -MSG_TRUNC = 0 -MSG_WAITALL = 0 -NETLINK_DNRTMSG = 0 -NETLINK_FIREWALL = 0 -NETLINK_IP6_FW = 0 -NETLINK_NFLOG = 0 -NETLINK_ROUTE = 0 -NETLINK_USERSOCK = 0 -NETLINK_XFRM = 0 -NI_DGRAM = 0 -NI_MAXHOST = 0 -NI_MAXSERV = 0 -NI_NAMEREQD = 0 -NI_NOFQDN = 0 -NI_NUMERICHOST = 0 -NI_NUMERICSERV = 0 -PACKET_BROADCAST = 0 -PACKET_FASTROUTE = 0 -PACKET_HOST = 0 -PACKET_LOOPBACK = 0 -PACKET_MULTICAST = 0 -PACKET_OTHERHOST = 0 -PACKET_OUTGOING = 0 -PF_PACKET = 0 -SHUT_RD = 0 -SHUT_RDWR = 0 -SHUT_WR = 0 -SOL_HCI = 0 -SOL_IP = 0 -SOL_SOCKET = 0 -SOL_TCP = 0 -SOL_TIPC = 0 -SOL_UDP = 0 -SO_ACCEPTCONN = 0 -SO_BROADCAST = 0 -SO_DEBUG = 0 -SO_DONTROUTE = 0 -SO_ERROR = 0 -SO_KEEPALIVE = 0 -SO_LINGER = 0 -SO_OOBINLINE = 0 -SO_RCVBUF = 0 -SO_RCVLOWAT = 0 -SO_RCVTIMEO = 0 -SO_REUSEADDR = 0 -SO_SNDBUF = 0 -SO_SNDLOWAT = 0 -SO_SNDTIMEO = 0 -SO_TYPE = 0 -TCP_CORK = 0 -TCP_DEFER_ACCEPT = 0 -TCP_INFO = 0 -TCP_KEEPCNT = 0 -TCP_KEEPIDLE = 0 -TCP_KEEPINTVL = 0 -TCP_LINGER2 = 0 -TCP_MAXSEG = 0 -TCP_NODELAY = 0 -TCP_QUICKACK = 0 -TCP_SYNCNT = 0 -TCP_WINDOW_CLAMP = 0 -TIPC_ADDR_ID = 0 -TIPC_ADDR_NAME = 0 -TIPC_ADDR_NAMESEQ = 0 -TIPC_CFG_SRV = 0 -TIPC_CLUSTER_SCOPE = 0 -TIPC_CONN_TIMEOUT = 0 -TIPC_CRITICAL_IMPORTANCE = 0 -TIPC_DEST_DROPPABLE = 0 -TIPC_HIGH_IMPORTANCE = 0 -TIPC_IMPORTANCE = 0 -TIPC_LOW_IMPORTANCE = 0 -TIPC_MEDIUM_IMPORTANCE = 0 -TIPC_NODE_SCOPE = 0 -TIPC_PUBLISHED = 0 -TIPC_SRC_DROPPABLE = 0 -TIPC_SUBSCR_TIMEOUT = 0 -TIPC_SUB_CANCEL = 0 -TIPC_SUB_PORTS = 0 -TIPC_SUB_SERVICE = 0 -TIPC_TOP_SRV = 0 -TIPC_WAIT_FOREVER = 0 -TIPC_WITHDRAWN = 0 -TIPC_ZONE_SCOPE = 0 - - -# ----- exceptions ----- -class error(IOError): - ... - -class herror(error): - def __init__(self, herror: int, string: str) -> None: ... - -class gaierror(error): - def __init__(self, error: int, string: str) -> None: ... - -class timeout(error): - ... - - -# Addresses can be either tuples of varying lengths (AF_INET, AF_INET6, -# AF_NETLINK, AF_TIPC) or strings (AF_UNIX). - -# TODO AF_PACKET and AF_BLUETOOTH address objects - - -# ----- classes ----- -class socket: - family = 0 - type = 0 - proto = 0 - - def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, - proto: int = 0, fileno: int = None) -> None: ... - - # --- methods --- - # second tuple item is an address - def accept(self) -> Tuple['socket', Any]: ... - - @overload - def bind(self, address: tuple) -> None: ... - @overload - def bind(self, address: str) -> None: ... - - def close(self) -> None: ... - - @overload - def connect(self, address: tuple) -> None: ... - @overload - def connect(self, address: str) -> None: ... - - @overload - def connect_ex(self, address: tuple) -> int: ... - @overload - def connect_ex(self, address: str) -> int: ... - - def detach(self) -> int: ... - def fileno(self) -> int: ... - - # return value is an address - def getpeername(self) -> Any: ... - def getsockname(self) -> Any: ... - - @overload - def getsockopt(self, level: int, optname: str) -> str: ... - @overload - def getsockopt(self, level: int, optname: str, buflen: int) -> str: ... - - def gettimeout(self) -> float: ... - def ioctl(self, control: object, - option: Tuple[int, int, int]) -> None: ... - def listen(self, backlog: int) -> None: ... - # TODO the return value may be BinaryIO or TextIO, depending on mode - def makefile(self, mode: str = 'r', buffering: int = None, - encoding: str = None, errors: str = None, - newline: str = None) -> Any: - ... - def recv(self, bufsize: int, flags: int = 0) -> str: ... - - # return type is an address - def recvfrom(self, bufsize: int, flags: int = 0) -> Any: ... - def recvfrom_into(self, buffer: str, nbytes: int, - flags: int = 0) -> Any: ... - def recv_into(self, buffer: str, nbytes: int, - flags: int = 0) -> Any: ... - def send(self, data: str, flags=0) -> int: ... - def sendall(self, data: str, flags=0) -> Any: - ... # return type: None on success - - @overload - def sendto(self, data: str, address: tuple, flags: int = 0) -> int: ... - @overload - def sendto(self, data: str, address: str, flags: int = 0) -> int: ... - - def setblocking(self, flag: bool) -> None: ... - # TODO None valid for the value argument - def settimeout(self, value: float) -> None: ... - - @overload - def setsockopt(self, level: int, optname: str, value: int) -> None: ... - @overload - def setsockopt(self, level: int, optname: str, value: str) -> None: ... - - def shutdown(self, how: int) -> None: ... - - -# ----- functions ----- -def create_connection(address: Tuple[str, int], - timeout: float = _GLOBAL_DEFAULT_TIMEOUT, - source_address: Tuple[str, int] = None) -> socket: ... - -# the 5th tuple item is an address -def getaddrinfo( - host: Optional[str], port: Union[str, int, None], family: int = 0, - socktype: int = 0, proto: int = 0, flags: int = 0) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: - ... - -def getfqdn(name: str = '') -> str: ... -def gethostbyname(hostname: str) -> str: ... -def gethostbyname_ex(hostname: str) -> Tuple[str, List[str], List[str]]: ... -def gethostname() -> str: ... -def gethostbyaddr(ip_address: str) -> Tuple[str, List[str], List[str]]: ... -def getnameinfo(sockaddr: tuple, flags: int) -> Tuple[str, int]: ... -def getprotobyname(protocolname: str) -> int: ... -def getservbyname(servicename: str, protocolname: str = None) -> int: ... -def getservbyport(port: int, protocolname: str = None) -> str: ... -def socketpair(family: int = AF_INET, - type: int = SOCK_STREAM, - proto: int = 0) -> Tuple[socket, socket]: ... -def fromfd(fd: int, family: int, type: int, proto: int = 0) -> socket: ... -def ntohl(x: int) -> int: ... # param & ret val are 32-bit ints -def ntohs(x: int) -> int: ... # param & ret val are 16-bit ints -def htonl(x: int) -> int: ... # param & ret val are 32-bit ints -def htons(x: int) -> int: ... # param & ret val are 16-bit ints -def inet_aton(ip_string: str) -> str: ... # ret val 4 bytes in length -def inet_ntoa(packed_ip: str) -> str: ... -def inet_pton(address_family: int, ip_string: str) -> str: ... -def inet_ntop(address_family: int, packed_ip: str) -> str: ... -# TODO the timeout may be None -def getdefaulttimeout() -> float: ... -def setdefaulttimeout(timeout: float) -> None: ... diff --git a/stubs/2.7/stat.pyi b/stubs/2.7/stat.pyi deleted file mode 100644 index a83d88058999..000000000000 --- a/stubs/2.7/stat.pyi +++ /dev/null @@ -1,58 +0,0 @@ -def S_ISDIR(mode: int) -> bool: ... -def S_ISCHR(mode: int) -> bool: ... -def S_ISBLK(mode: int) -> bool: ... -def S_ISREG(mode: int) -> bool: ... -def S_ISFIFO(mode: int) -> bool: ... -def S_ISLNK(mode: int) -> bool: ... -def S_ISSOCK(mode: int) -> bool: ... - -def S_IMODE(mode: int) -> int: ... -def S_IFMT(mode: int) -> int: ... - -ST_MODE = 0 -ST_INO = 0 -ST_DEV = 0 -ST_NLINK = 0 -ST_UID = 0 -ST_GID = 0 -ST_SIZE = 0 -ST_ATIME = 0 -ST_MTIME = 0 -ST_CTIME = 0 -ST_IFSOCK = 0 -ST_IFLNK = 0 -ST_IFREG = 0 -ST_IFBLK = 0 -ST_IFDIR = 0 -ST_IFCHR = 0 -ST_IFIFO = 0 -S_ISUID = 0 -S_ISGID = 0 -S_ISVTX = 0 -S_IRWXU = 0 -S_IRUSR = 0 -S_IWUSR = 0 -S_IXUSR = 0 -S_IRGRP = 0 -S_IWGRP = 0 -S_IXGRP = 0 -S_IRWXO = 0 -S_IROTH = 0 -S_IWOTH = 0 -S_IXOTH = 0 -S_ENFMT = 0 -S_IREAD = 0 -S_IWRITE = 0 -S_IEXEC = 0 -UF_NODUMP = 0 -UF_IMMUTABLE = 0 -UF_APPEND = 0 -UF_OPAQUE = 0 -UF_NOUNLINK = 0 -UF_COMPRESSED = 0 -UF_HIDDEN = 0 -SF_ARCHIVED = 0 -SF_IMMUTABLE = 0 -SF_APPEND = 0 -SF_NOUNLINK = 0 -SF_SNAPSHOT = 0 diff --git a/stubs/2.7/string.pyi b/stubs/2.7/string.pyi deleted file mode 100644 index 5142a881b58c..000000000000 --- a/stubs/2.7/string.pyi +++ /dev/null @@ -1,74 +0,0 @@ -# Stubs for string - -# Based on http://docs.python.org/3.2/library/string.html - -from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable, AnyStr - -ascii_letters = '' -ascii_lowercase = '' -ascii_uppercase = '' -digits = '' -hexdigits = '' -letters = '' -lowercase = '' -octdigits = '' -punctuation = '' -printable = '' -uppercase = '' -whitespace = '' - -def capwords(s: AnyStr, sep: AnyStr = None) -> AnyStr: ... -# TODO: originally named 'from' -def maketrans(_from: str, to: str) -> str: ... -def atof(s: unicode) -> float: ... -def atoi(s: unicode, base: int = 10) -> int: ... -def atol(s: unicode, base: int = 10) -> int: ... -def capitalize(word: AnyStr) -> AnyStr: ... -def find(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ... -def rfind(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ... -def index(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ... -def rindex(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ... -def count(s: unicode, sub: unicode, start: int = None, end: int = None) -> int: ... -def lower(s: AnyStr) -> AnyStr: ... -def split(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ... -def rsplit(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ... -def splitfields(s: AnyStr, sep: AnyStr = None, maxsplit: int = -1) -> List[AnyStr]: ... -def join(words: Iterable[AnyStr], sep: AnyStr = None) -> AnyStr: ... -def joinfields(word: Iterable[AnyStr], sep: AnyStr = None) -> AnyStr: ... -def lstrip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ... -def rstrip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ... -def strip(s: AnyStr, chars: AnyStr = None) -> AnyStr: ... -def swapcase(s: AnyStr) -> AnyStr: ... -def translate(s: str, table: str, deletechars: str = None) -> str: ... -def upper(s: AnyStr) -> AnyStr: ... -def ljust(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ... -def rjust(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ... -def center(s: AnyStr, width: int, fillhar: AnyStr = ' ') -> AnyStr: ... -def zfill(s: AnyStr, width: int) -> AnyStr: ... -def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = None) -> AnyStr: ... - -class Template(object): - # TODO: Unicode support? - template = '' - - def __init__(self, template: str) -> None: ... - def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... - def safe_substitute(self, mapping: Mapping[str, str], - **kwds: str) -> str: ... - -# TODO(MichalPokorny): This is probably badly and/or loosely typed. -class Formatter(object): - def format(self, format_string: str, *args, **kwargs) -> str: ... - def vformat(self, format_string: str, args: Sequence[Any], - kwargs: Mapping[str, Any]) -> str: ... - def parse(self, format_string: str) -> Iterable[Tuple[str, str, str, str]]: ... - def get_field(self, field_name: str, args: Sequence[Any], - kwargs: Mapping[str, Any]) -> Any: ... - def get_value(self, key: Union[int, str], args: Sequence[Any], - kwargs: Mapping[str, Any]) -> Any: - raise IndexError() - raise KeyError() - def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any], - kwargs: Mapping[str, Any]) -> None: ... - def format_field(self, value: Any, format_spec: str) -> Any: ... - def convert_field(self, value: Any, conversion: str) -> Any: ... diff --git a/stubs/2.7/struct.pyi b/stubs/2.7/struct.pyi deleted file mode 100644 index c1b328322e90..000000000000 --- a/stubs/2.7/struct.pyi +++ /dev/null @@ -1,28 +0,0 @@ -# Stubs for struct for Python 2.7 -# Based on https://docs.python.org/2/library/struct.html - -from typing import Any, Tuple - -class error(Exception): ... - -def pack(fmt: str, *v: Any) -> str: ... -# TODO buffer type -def pack_into(fmt: str, buffer: Any, offset: int, *v: Any) -> None: ... - -# TODO buffer type -def unpack(fmt: str, buffer: Any) -> Tuple[Any, ...]: ... -def unpack_from(fmt: str, buffer: Any, offset: int = ...) -> Tuple[Any, ...]: ... - -def calcsize(fmt: str) -> int: ... - -class Struct: - format = ... # type: str - size = ... # type: int - - def __init__(self, format: str) -> None: ... - - def pack(self, *v: Any) -> str: ... - # TODO buffer type - def pack_into(self, buffer: Any, offset: int, *v: Any) -> None: ... - def unpack(self, buffer: Any) -> Tuple[Any, ...]: ... - def unpack_from(self, buffer: Any, offset: int = ...) -> Tuple[Any, ...]: ... diff --git a/stubs/2.7/subprocess.pyi b/stubs/2.7/subprocess.pyi deleted file mode 100644 index 36f3dc9d047f..000000000000 --- a/stubs/2.7/subprocess.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# Stubs for subprocess - -# Based on http://docs.python.org/2/library/subprocess.html and Python 3 stub - -from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Union, Optional - -_FILE = Union[int, IO[Any]] - -# TODO force keyword arguments -# TODO more keyword arguments (from Popen) -def call(args: Sequence[str], *, - stdin: _FILE = None, stdout: _FILE = None, stderr: _FILE = None, - shell: bool = False, env: Mapping[str, str] = None, - cwd: str = None) -> int: ... -def check_call(args: Sequence[str], *, - stdin: _FILE = None, stdout: _FILE = None, stderr: _FILE = None, - shell: bool = False, env: Mapping[str, str] = None, cwd: str = None, - close_fds: Sequence[_FILE] = None, preexec_fn: Callable[[], Any] = None) -> int: ... -def check_output(args: Sequence[str], *, - stdin: _FILE = None, stderr: _FILE = None, - shell: bool = False, universal_newlines: bool = False, - env: Mapping[str, str] = None, cwd: str = None) -> str: ... - -PIPE = ... # type: int -STDOUT = ... # type: int - -class CalledProcessError(Exception): - returncode = 0 - cmd = '' - output = '' # May be None - - def __init__(self, returncode: int, cmd: str, output: str) -> None: ... - -class Popen: - stdin = ... # type: Optional[IO[Any]] - stdout = ... # type: Optional[IO[Any]] - stderr = ... # type: Optional[IO[Any]] - pid = 0 - returncode = 0 - - def __init__(self, - args: Sequence[str], - bufsize: int = 0, - executable: str = None, - stdin: _FILE = None, - stdout: _FILE = None, - stderr: _FILE = None, - preexec_fn: Callable[[], Any] = None, - close_fds: bool = False, - shell: bool = False, - cwd: str = None, - env: Mapping[str, str] = None, - universal_newlines: bool = False, - startupinfo: Any = None, - creationflags: int = 0) -> None: ... - - def poll(self) -> int: ... - def wait(self) -> int: ... - # Return str/bytes - def communicate(self, input: str = None) -> Tuple[str, str]: ... - def send_signal(self, signal: int) -> None: ... - def terminatate(self) -> None: ... - def kill(self) -> None: ... - def __enter__(self) -> 'Popen': ... - def __exit__(self, type, value, traceback) -> bool: ... - -def getstatusoutput(cmd: str) -> Tuple[int, str]: ... -def getoutput(cmd: str) -> str: ... - -# Windows-only: STARTUPINFO etc. - -STD_INPUT_HANDLE = ... # type: Any -STD_OUTPUT_HANDLE = ... # type: Any -STD_ERROR_HANDLE = ... # type: Any -SW_HIDE = ... # type: Any -STARTF_USESTDHANDLES = ... # type: Any -STARTF_USESHOWWINDOW = ... # type: Any -CREATE_NEW_CONSOLE = ... # type: Any -CREATE_NEW_PROCESS_GROUP = ... # type: Any diff --git a/stubs/2.7/sys.pyi b/stubs/2.7/sys.pyi deleted file mode 100644 index de9f26e80900..000000000000 --- a/stubs/2.7/sys.pyi +++ /dev/null @@ -1,152 +0,0 @@ -# Stubs for sys -# Ron Murawski - -# based on http://docs.python.org/2.7/library/sys.html - -# Partially adapted to Python 2.7 by Jukka Lehtosalo. - -from typing import ( - List, Sequence, Any, Dict, Tuple, BinaryIO, overload -) - -# ----- sys variables ----- -abiflags = '' -argv = None # type: List[str] -byteorder = '' -builtin_module_names = None # type: Sequence[str] # actually a tuple of strings -copyright = '' -dllhandle = 0 # Windows only -dont_write_bytecode = False -__displayhook__ = None # type: Any # contains the original value of displayhook -__excepthook__ = None # type: Any # contains the original value of excepthook -exec_prefix = '' -executable = '' -float_repr_style = '' -hexversion = 0 # this is a 32-bit int -last_type = None # type: Any -last_value = None # type: Any -last_traceback = None # type: Any -maxsize = 0 -maxunicode = 0 -meta_path = None # type: List[Any] -modules = None # type: Dict[str, Any] -path = None # type: List[str] -path_hooks = None # type: List[Any] # TODO precise type; function, path to finder -path_importer_cache = None # type: Dict[str, Any] # TODO precise type -platform = '' -prefix = '' -ps1 = '' -ps2 = '' -stdin = None # type: BinaryIO -stdout = None # type: BinaryIO -stderr = None # type: BinaryIO -__stdin__ = None # type: BinaryIO -__stdout__ = None # type: BinaryIO -__stderr__ = None # type: BinaryIO -subversion = None # type: Tuple[str, str, str] -tracebacklimit = 0 -version = '' -api_version = 0 -warnoptions = None # type: Any -# Each entry is a tuple of the form (action, message, category, module, -# lineno) -winver = '' # Windows only -_xoptions = None # type: Dict[Any, Any] - -flags = None # type: _flags -class _flags: - debug = 0 - division_warning = 0 - inspect = 0 - interactive = 0 - optimize = 0 - dont_write_bytecode = 0 - no_user_site = 0 - no_site = 0 - ignore_environment = 0 - verbose = 0 - bytes_warning = 0 - quiet = 0 - hash_randomization = 0 - -float_info = None # type: _float_info -class _float_info: - epsilon = 0.0 # DBL_EPSILON - dig = 0 # DBL_DIG - mant_dig = 0 # DBL_MANT_DIG - max = 0.0 # DBL_MAX - max_exp = 0 # DBL_MAX_EXP - max_10_exp = 0 # DBL_MAX_10_EXP - min = 0.0 # DBL_MIN - min_exp = 0 # DBL_MIN_EXP - min_10_exp = 0 # DBL_MIN_10_EXP - radix = 0 # FLT_RADIX - rounds = 0 # FLT_ROUNDS - -hash_info = None # type: _hash_info -class _hash_info: - width = 0 # width in bits used for hash values - modulus = 0 # prime modulus P used for numeric hash scheme - inf = 0 # hash value returned for a positive infinity - nan = 0 # hash value returned for a nan - imag = 0 # multiplier used for the imaginary part of a complex number - -int_info = None # type: _int_info -class _int_info: - bits_per_digit = 0 # number of bits held in each digit. Python integers - # are stored internally in - # base 2**int_info.bits_per_digit - sizeof_digit = 0 # size in bytes of C type used to represent a digit - -class _version_info(Tuple[int, int, int, str, int]): - major = 0 - minor = 0 - micro = 0 - releaselevel = '' - serial = 0 -version_info = None # type: _version_info - -# ----- sys function stubs ----- -def call_tracing(fn: Any, args: Any) -> object: ... -def _clear_type_cache() -> None: ... -def _current_frames() -> Dict[int, Any]: ... -def displayhook(value: int) -> None: ... # value might be None -def excepthook(type_: type, value: BaseException, traceback: Any) -> None: - # TODO traceback type - ... -def exc_info() -> Tuple[type, Any, Any]: ... # see above -def exit(arg: int = 0) -> None: ... # arg might be None -def getcheckinterval() -> int: ... # deprecated -def getdefaultencoding() -> str: ... -def getdlopenflags() -> int: ... -def getfilesystemencoding() -> str: ... -def getrefcount(object) -> int: ... -def getrecursionlimit() -> int: ... - -@overload -def getsizeof(obj: object) -> int: ... -@overload -def getsizeof(obj: object, default: int) -> int: ... - -def getswitchinterval() -> float: ... - -@overload -def _getframe() -> Any: ... -@overload -def _getframe(depth: int) -> Any: ... - -def getprofile() -> Any: ... # TODO return type -def gettrace() -> Any: ... # TODO return -def getwindowsversion() -> Any: ... # TODO return type -def intern(string: str) -> str: ... -def setcheckinterval(interval: int) -> None: ... # deprecated -def setdlopenflags(n: int) -> None: ... -def setprofile(profilefunc: Any) -> None: ... # TODO type -def setrecursionlimit(limit: int) -> None: ... -def setswitchinterval(interval: float) -> None: ... -def settrace(tracefunc: Any) -> None: ... # TODO type -# Trace functions should have three arguments: frame, event, and arg. frame -# is the current stack frame. event is a string: 'call', 'line', 'return', -# 'exception', 'c_call', 'c_return', or 'c_exception'. arg depends on the -# event type. -def settscdump(on_flag: bool) -> None: ... diff --git a/stubs/2.7/tarfile.pyi b/stubs/2.7/tarfile.pyi deleted file mode 100644 index 994828d1dfd0..000000000000 --- a/stubs/2.7/tarfile.pyi +++ /dev/null @@ -1,237 +0,0 @@ -# Stubs for tarfile (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class TarError(Exception): ... -class ExtractError(TarError): ... -class ReadError(TarError): ... -class CompressionError(TarError): ... -class StreamError(TarError): ... -class HeaderError(TarError): ... -class EmptyHeaderError(HeaderError): ... -class TruncatedHeaderError(HeaderError): ... -class EOFHeaderError(HeaderError): ... -class InvalidHeaderError(HeaderError): ... -class SubsequentHeaderError(HeaderError): ... - -class _LowLevelFile: - fd = ... # type: Any - def __init__(self, name, mode): ... - def close(self): ... - def read(self, size): ... - def write(self, s): ... - -class _Stream: - name = ... # type: Any - mode = ... # type: Any - comptype = ... # type: Any - fileobj = ... # type: Any - bufsize = ... # type: Any - buf = ... # type: Any - pos = ... # type: Any - closed = ... # type: Any - zlib = ... # type: Any - crc = ... # type: Any - dbuf = ... # type: Any - cmp = ... # type: Any - def __init__(self, name, mode, comptype, fileobj, bufsize): ... - def __del__(self): ... - def write(self, s): ... - def close(self): ... - def tell(self): ... - def seek(self, pos=0): ... - def read(self, size=None): ... - -class _StreamProxy: - fileobj = ... # type: Any - buf = ... # type: Any - def __init__(self, fileobj): ... - def read(self, size): ... - def getcomptype(self): ... - def close(self): ... - -class _BZ2Proxy: - blocksize = ... # type: Any - fileobj = ... # type: Any - mode = ... # type: Any - name = ... # type: Any - def __init__(self, fileobj, mode): ... - pos = ... # type: Any - bz2obj = ... # type: Any - buf = ... # type: Any - def init(self): ... - def read(self, size): ... - def seek(self, pos): ... - def tell(self): ... - def write(self, data): ... - def close(self): ... - -class _FileInFile: - fileobj = ... # type: Any - offset = ... # type: Any - size = ... # type: Any - sparse = ... # type: Any - position = ... # type: Any - def __init__(self, fileobj, offset, size, sparse=None): ... - def tell(self): ... - def seek(self, position): ... - def read(self, size=None): ... - def readnormal(self, size): ... - def readsparse(self, size): ... - def readsparsesection(self, size): ... - -class ExFileObject: - blocksize = ... # type: Any - fileobj = ... # type: Any - name = ... # type: Any - mode = ... # type: Any - closed = ... # type: Any - size = ... # type: Any - position = ... # type: Any - buffer = ... # type: Any - def __init__(self, tarfile, tarinfo): ... - def read(self, size=None): ... - def readline(self, size=-1): ... - def readlines(self): ... - def tell(self): ... - def seek(self, pos, whence=...): ... - def close(self): ... - def __iter__(self): ... - -class TarInfo: - name = ... # type: Any - mode = ... # type: Any - uid = ... # type: Any - gid = ... # type: Any - size = ... # type: Any - mtime = ... # type: Any - chksum = ... # type: Any - type = ... # type: Any - linkname = ... # type: Any - uname = ... # type: Any - gname = ... # type: Any - devmajor = ... # type: Any - devminor = ... # type: Any - offset = ... # type: Any - offset_data = ... # type: Any - pax_headers = ... # type: Any - def __init__(self, name=''): ... - path = ... # type: Any - linkpath = ... # type: Any - def get_info(self, encoding, errors): ... - def tobuf(self, format=..., encoding=..., errors=''): ... - def create_ustar_header(self, info): ... - def create_gnu_header(self, info): ... - def create_pax_header(self, info, encoding, errors): ... - @classmethod - def create_pax_global_header(cls, pax_headers): ... - @classmethod - def frombuf(cls, buf): ... - @classmethod - def fromtarfile(cls, tarfile): ... - def isreg(self): ... - def isfile(self): ... - def isdir(self): ... - def issym(self): ... - def islnk(self): ... - def ischr(self): ... - def isblk(self): ... - def isfifo(self): ... - def issparse(self): ... - def isdev(self): ... - -class TarFile: - debug = ... # type: Any - dereference = ... # type: Any - ignore_zeros = ... # type: Any - errorlevel = ... # type: Any - format = ... # type: Any - encoding = ... # type: Any - errors = ... # type: Any - tarinfo = ... # type: Any - fileobject = ... # type: Any - mode = ... # type: Any - name = ... # type: Any - fileobj = ... # type: Any - pax_headers = ... # type: Any - closed = ... # type: Any - members = ... # type: Any - offset = ... # type: Any - inodes = ... # type: Any - firstmember = ... # type: Any - def __init__(self, name=None, mode='', fileobj=None, format=None, tarinfo=None, dereference=None, ignore_zeros=None, encoding=None, errors=None, pax_headers=None, debug=None, errorlevel=None): ... - posix = ... # type: Any - @classmethod - def open(cls, name=None, mode='', fileobj=None, bufsize=..., **kwargs): ... - @classmethod - def taropen(cls, name, mode='', fileobj=None, **kwargs): ... - @classmethod - def gzopen(cls, name, mode='', fileobj=None, compresslevel=9, **kwargs): ... - @classmethod - def bz2open(cls, name, mode='', fileobj=None, compresslevel=9, **kwargs): ... - OPEN_METH = ... # type: Any - def close(self): ... - def getmember(self, name): ... - def getmembers(self): ... - def getnames(self): ... - def gettarinfo(self, name=None, arcname=None, fileobj=None): ... - def list(self, verbose=True): ... - def add(self, name, arcname=None, recursive=True, exclude=None, filter=None): ... - def addfile(self, tarinfo, fileobj=None): ... - def extractall(self, path='', members=None): ... - def extract(self, member, path=''): ... - def extractfile(self, member): ... - def makedir(self, tarinfo, targetpath): ... - def makefile(self, tarinfo, targetpath): ... - def makeunknown(self, tarinfo, targetpath): ... - def makefifo(self, tarinfo, targetpath): ... - def makedev(self, tarinfo, targetpath): ... - def makelink(self, tarinfo, targetpath): ... - def chown(self, tarinfo, targetpath): ... - def chmod(self, tarinfo, targetpath): ... - def utime(self, tarinfo, targetpath): ... - def next(self): ... - def __iter__(self): ... - def __enter__(self): ... - def __exit__(self, type, value, traceback): ... - -class TarIter: - tarfile = ... # type: Any - index = ... # type: Any - def __init__(self, tarfile): ... - def __iter__(self): ... - def next(self): ... - -class _section: - offset = ... # type: Any - size = ... # type: Any - def __init__(self, offset, size): ... - def __contains__(self, offset): ... - -class _data(_section): - realpos = ... # type: Any - def __init__(self, offset, size, realpos): ... - -class _hole(_section): ... - -class _ringbuffer(list): - idx = ... # type: Any - def __init__(self): ... - def find(self, offset): ... - -class TarFileCompat: - tarfile = ... # type: Any - def __init__(self, file, mode='', compression=...): ... - def namelist(self): ... - def infolist(self): ... - def printdir(self): ... - def testzip(self): ... - def getinfo(self, name): ... - def read(self, name): ... - def write(self, filename, arcname=None, compress_type=None): ... - def writestr(self, zinfo, bytes): ... - def close(self): ... - -def is_tarfile(name): ... diff --git a/stubs/2.7/tempfile.pyi b/stubs/2.7/tempfile.pyi deleted file mode 100644 index f8032ea183d4..000000000000 --- a/stubs/2.7/tempfile.pyi +++ /dev/null @@ -1,42 +0,0 @@ -# Stubs for tempfile -# Ron Murawski - -# based on http://docs.python.org/3.3/library/tempfile.html -# Adapted for Python 2.7 by Michal Pokorny - -from typing import Tuple, IO - -# global variables -tempdir = '' -template = '' - -# TODO text files - -# function stubs -def TemporaryFile( - mode: str = 'w+b', bufsize: int = -1, suffix: str = '', - prefix: str = 'tmp', dir: str = None) -> IO[str]: ... -def NamedTemporaryFile( - mode: str = 'w+b', bufsize: int = -1, suffix: str = '', - prefix: str = 'tmp', dir: str = None, delete: bool = True - ) -> IO[str]: ... -def SpooledTemporaryFile( - max_size: int = 0, mode: str = 'w+b', buffering: int = -1, - suffix: str = '', prefix: str = 'tmp', dir: str = None) -> IO[str]: - ... - -class TemporaryDirectory: - name = '' - def __init__(self, suffix: str = '', prefix: str = 'tmp', - dir: str = None) -> None: ... - def cleanup(self) -> None: ... - def __enter__(self) -> str: ... - def __exit__(self, type, value, traceback) -> bool: ... - -def mkstemp(suffix: str = '', prefix: str = 'tmp', dir: str = None, - text: bool = False) -> Tuple[int, str]: ... -def mkdtemp(suffix: str = '', prefix: str = 'tmp', - dir: str = None) -> str: ... -def mktemp(suffix: str = '', prefix: str = 'tmp', dir: str = None) -> str: ... -def gettempdir() -> str: ... -def gettempprefix() -> str: ... diff --git a/stubs/2.7/textwrap.pyi b/stubs/2.7/textwrap.pyi deleted file mode 100644 index f0b5feaefcd1..000000000000 --- a/stubs/2.7/textwrap.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# Stubs for textwrap (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class _unicode: ... - -class TextWrapper: - whitespace_trans = ... # type: Any - unicode_whitespace_trans = ... # type: Any - uspace = ... # type: Any - wordsep_re = ... # type: Any - wordsep_simple_re = ... # type: Any - sentence_end_re = ... # type: Any - width = ... # type: Any - initial_indent = ... # type: Any - subsequent_indent = ... # type: Any - expand_tabs = ... # type: Any - replace_whitespace = ... # type: Any - fix_sentence_endings = ... # type: Any - break_long_words = ... # type: Any - drop_whitespace = ... # type: Any - break_on_hyphens = ... # type: Any - wordsep_re_uni = ... # type: Any - wordsep_simple_re_uni = ... # type: Any - def __init__(self, width=70, initial_indent='', subsequent_indent='', expand_tabs=True, replace_whitespace=True, fix_sentence_endings=False, break_long_words=True, drop_whitespace=True, break_on_hyphens=True): ... - def wrap(self, text): ... - def fill(self, text): ... - -def wrap(text, width=70, **kwargs): ... -def fill(text, width=70, **kwargs): ... -def dedent(text): ... diff --git a/stubs/2.7/thread.pyi b/stubs/2.7/thread.pyi deleted file mode 100644 index 062d56d843b3..000000000000 --- a/stubs/2.7/thread.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Callable, Any - -class error(Exception): ... -class LockType: - def acquire(self, waitflag: int = None) -> bool: ... - def release(self) -> None: ... - def locked(self) -> bool: ... - def __enter__(self) -> LockType: ... - def __exit__(self, value: Any, traceback: Any) -> None: ... - -def start_new_thread(function: Callable[..., Any], args: Any, kwargs: Any = None) -> int: ... -def interrupt_main() -> None: ... -def exit() -> None: ... -def allocate_lock() -> LockType: ... -def get_ident() -> int: ... -def stack_size(size: int = None) -> int: ... diff --git a/stubs/2.7/threading.pyi b/stubs/2.7/threading.pyi deleted file mode 100644 index 91089bded996..000000000000 --- a/stubs/2.7/threading.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# Stubs for threading - -from typing import Any, Dict, Optional, Callable, TypeVar, Union, List, Mapping - -def active_count() -> int: ... -def activeCount() -> int: ... - -def current_thread() -> Thread: ... -def currentThread() -> Thread: ... -def enumerate() -> List[Thread]: ... - -class Thread(object): - name = '' - ident = 0 - daemon = False - - def __init__(self, group: Any = None, target: Any = None, - name: str = None, args: tuple = (), - kwargs: Dict[Any, Any] = {}) -> None: ... - def start(self) -> None: ... - def run(self) -> None: ... - def join(self, timeout: float = None) -> None: ... - def is_alive(self) -> bool: ... - - # Legacy methods - def isAlive(self) -> bool: ... - def getName(self) -> str: ... - def setName(self, name: str) -> None: ... - def isDaemon(self) -> bool: ... - def setDaemon(self, daemon: bool) -> None: ... - -class Timer(object): - def __init__(self, interval: float, function: Any, - args: List[Any] = [], - kwargs: Mapping[Any, Any] = {}) -> None: ... - def cancel(self) -> None: ... - def start(self) -> None: ... - -# TODO: better type -def settrace(func: Callable[[Any, str, Any], Any]) -> None: ... -def setprofile(func: Any) -> None: ... -def stack_size(size: int = 0) -> None: ... - -class ThreadError(Exception): - pass - -class local(object): - # TODO: allows arbitrary parameters... - pass - -class Event(object): - def is_set(self) -> bool: ... - def isSet(self) -> bool: ... - def set(self) -> None: ... - def clear(self) -> None: ... - # TODO can it return None? - def wait(self, timeout: float = None) -> bool: ... - -class Lock(object): - def acquire(self, blocking: bool = True) -> bool: ... - def release(self) -> None: ... - def locked(self) -> bool: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -class RLock(object): - def acquire(self, blocking: int = 1) -> Optional[bool]: ... - def release(self) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -class Semaphore(object): - def acquire(self, blocking: bool = True) -> Optional[bool]: ... - def release(self) -> None: ... - def __init__(self, value: int = 1) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -class BoundedSemaphore(object): - def acquire(self, blocking: bool = True) -> Optional[bool]: ... - def release(self) -> None: ... - def __init__(self, value: int = 1) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -_T = TypeVar('_T') - -class Condition(object): - def acquire(self, blocking: bool = True) -> bool: ... - def release(self) -> None: ... - def notify(self, n: int = 1) -> None: ... - def notify_all(self) -> None: ... - def notifyAll(self) -> None: ... - def wait(self, timeout: float = None) -> bool: ... - def wait_for(self, predicate: Callable[[], _T], timeout: float = None) -> Union[_T, bool]: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - def __init__(self, lock: Lock = None) -> None: ... diff --git a/stubs/2.7/time.pyi b/stubs/2.7/time.pyi deleted file mode 100644 index be01b0e38938..000000000000 --- a/stubs/2.7/time.pyi +++ /dev/null @@ -1,48 +0,0 @@ -"""Stub file for the 'time' module.""" -# based on autogenerated stub from typeshed and https://docs.python.org/2/library/time.html - -from typing import NamedTuple, Tuple, Union - -# ----- variables and constants ----- -accept2dyear = False -altzone = 0 -daylight = 0 -timezone = 0 -tzname = ... # type: Tuple[str, str] - -struct_time = NamedTuple('struct_time', - [('tm_year', int), ('tm_mon', int), ('tm_mday', int), - ('tm_hour', int), ('tm_min', int), ('tm_sec', int), - ('tm_wday', int), ('tm_yday', int), ('tm_isdst', int)]) - -_TIME_TUPLE = Tuple[int, int, int, int, int, int, int, int, int] - -def asctime(t: struct_time = None) -> str: - raise ValueError() - -def clock() -> float: ... - -def ctime(secs: float = None) -> str: - raise ValueError() - -def gmtime(secs: float = None) -> struct_time: ... - -def localtime(secs: float = None) -> struct_time: ... - -def mktime(t: struct_time) -> float: - raise OverflowError() - raise ValueError() - -def sleep(secs: float) -> None: ... - -def strftime(format: str, t: struct_time = None) -> str: - raise MemoryError() - raise ValueError() - -def strptime(string: str, format: str = "%a %b %d %H:%M:%S %Y") -> struct_time: - raise ValueError() - -def time() -> float: - raise IOError() - -def tzset() -> None: ... diff --git a/stubs/2.7/traceback.pyi b/stubs/2.7/traceback.pyi deleted file mode 100644 index b774eed77aac..000000000000 --- a/stubs/2.7/traceback.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import Any, IO, AnyStr, Callable, Tuple, List -from types import TracebackType, FrameType - -def print_tb(traceback: TracebackType, limit: int = None, file: IO[str] = None) -> None: ... -def print_exception(type: type, value: Exception, limit: int = None, file: IO[str] = None) -> None: ... -def print_exc(limit: int = None, file: IO[str] = None) -> None: ... -def format_exc(limit: int = None) -> None: ... -def print_last(limit: int = None, file: IO[str] = None) -> None: ... -def print_stack(f: FrameType, limit: int = None, file: IO[AnyStr] = None) -> None: ... -def extract_tb(f: TracebackType, limit: int = None) -> List[Tuple[str, int, str, str]]: ... -def extract_stack(f: FrameType = None, limit: int = None) -> None: ... -def format_list(list: List[Tuple[str, int, str, str]]) -> str: ... -def format_exception_only(type: type, value: List[str]) -> str: ... -def format_tb(f: TracebackType, limit: int = None) -> str: ... -def format_stack(f: FrameType = None, limit: int = None) -> str: ... -def tb_lineno(tb: TracebackType) -> AnyStr: ... diff --git a/stubs/2.7/types.pyi b/stubs/2.7/types.pyi deleted file mode 100644 index 20e06de5b14f..000000000000 --- a/stubs/2.7/types.pyi +++ /dev/null @@ -1,20 +0,0 @@ -# Stubs for types - -from typing import Any - -class ModuleType: - __name__ = ... # type: str - __file__ = ... # type: str - def __init__(self, name: str, doc: Any) -> None: ... - -class TracebackType: - ... - -class FrameType: - ... - -class GeneratorType: - ... - -class ListType: - ... diff --git a/stubs/2.7/typing.pyi b/stubs/2.7/typing.pyi deleted file mode 100644 index 0b0c78839344..000000000000 --- a/stubs/2.7/typing.pyi +++ /dev/null @@ -1,299 +0,0 @@ -# Stubs for typing (Python 2.7) - -from abc import abstractmethod, ABCMeta - -# Definitions of special type checking related constructs. Their definition -# are not used, so their value does not matter. - -cast = object() -overload = object() -Any = object() -TypeVar = object() -Generic = object() -Tuple = object() -Callable = object() -builtinclass = object() -_promote = object() -NamedTuple = object() - -# Type aliases - -class TypeAlias: - # Class for defining generic aliases for library types. - def __init__(self, target_type): ... - def __getitem__(self, typeargs): ... - -Union = TypeAlias(object) -Optional = TypeAlias(object) -List = TypeAlias(object) -Dict = TypeAlias(object) -Set = TypeAlias(object) - -# Predefined type variables. -AnyStr = TypeVar('AnyStr', str, unicode) - -# Abstract base classes. - -# These type variables are used by the container types. -_T = TypeVar('_T') -_S = TypeVar('_S') -_KT = TypeVar('_KT') # Key type. -_VT = TypeVar('_VT') # Value type. -_T_co = TypeVar('_T_co', covariant=True) # Any type covariant containers. -_V_co = TypeVar('_V_co', covariant=True) # Any type covariant containers. -_VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers. -_T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant. - -# TODO Container etc. - -class SupportsInt(metaclass=ABCMeta): - @abstractmethod - def __int__(self) -> int: ... - -class SupportsFloat(metaclass=ABCMeta): - @abstractmethod - def __float__(self) -> float: ... - -class SupportsAbs(Generic[_T]): - @abstractmethod - def __abs__(self) -> _T: ... - -class SupportsRound(Generic[_T]): - @abstractmethod - def __round__(self, ndigits: int = 0) -> _T: ... - -class Reversible(Generic[_T]): - @abstractmethod - def __reversed__(self) -> Iterator[_T]: ... - -class Sized(metaclass=ABCMeta): - @abstractmethod - def __len__(self) -> int: ... - -class Iterable(Generic[_T_co]): - @abstractmethod - def __iter__(self) -> Iterator[_T_co]: ... - -class Iterator(Iterable[_T_co], Generic[_T_co]): - @abstractmethod - def next(self) -> _T_co: ... - -class Sequence(Sized, Iterable[_T_co], Generic[_T_co]): - @abstractmethod - def __contains__(self, x: object) -> bool: ... - @overload - @abstractmethod - def __getitem__(self, i: int) -> _T_co: ... - @overload - @abstractmethod - def __getitem__(self, s: slice) -> Sequence[_T_co]: ... - @abstractmethod - def index(self, x: Any) -> int: ... - @abstractmethod - def count(self, x: Any) -> int: ... - -class MutableSequence(Sequence[_T], Generic[_T]): - @abstractmethod - def insert(self, index: int, object: _T) -> None: ... - @overload - @abstractmethod - def __setitem__(self, i: int, o: _T) -> None: ... - @overload - @abstractmethod - def __setitem__(self, s: slice, o: Sequence[_T]) -> None: ... - @abstractmethod - def __delitem__(self, i: Union[int, slice]) -> None: ... - # Mixin methods - def append(self, object: _T) -> None: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def reverse(self) -> None: ... - def pop(self, index: int = -1) -> _T: ... - def remove(self, object: _T) -> None: ... - def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... - -class AbstractSet(Sized, Iterable[_T_co], Generic[_T_co]): - @abstractmethod - def __contains__(self, x: object) -> bool: ... - # Mixin methods - def __le__(self, s: AbstractSet[Any]) -> bool: ... - def __lt__(self, s: AbstractSet[Any]) -> bool: ... - def __gt__(self, s: AbstractSet[Any]) -> bool: ... - def __ge__(self, s: AbstractSet[Any]) -> bool: ... - def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... - def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... - def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... - def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... - # TODO: argument can be any container? - def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... - def union(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... - -class MutableSet(AbstractSet[_T], Generic[_T]): - @abstractmethod - def add(self, x: _T) -> None: ... - @abstractmethod - def discard(self, x: _T) -> None: ... - # Mixin methods - def clear(self) -> None: ... - def pop(self) -> _T: ... - def remove(self, element: _T) -> None: ... - def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... - def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... - def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... - def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... - -class Mapping(Sized, Iterable[_KT], Generic[_KT, _VT]): - @abstractmethod - def __getitem__(self, k: _KT) -> _VT: ... - # Mixin methods - def get(self, k: _KT, default: _VT = ...) -> _VT: ... - def keys(self) -> list[_KT]: ... - def values(self) -> list[_VT]: ... - def items(self) -> list[Tuple[_KT, _VT]]: ... - def iterkeys(self) -> Iterator[_KT]: ... - def itervalues(self) -> Iterator[_VT]: ... - def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... - def __contains__(self, o: object) -> bool: ... - -class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): - @abstractmethod - def __setitem__(self, k: _KT, v: _VT) -> None: ... - @abstractmethod - def __delitem__(self, v: _KT) -> None: ... - - def clear(self) -> None: ... - def pop(self, k: _KT, default: _VT = ...) -> _VT: ... - def popitem(self) -> Tuple[_KT, _VT]: ... - def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... - def update(self, m: Union[Mapping[_KT, _VT], - Iterable[Tuple[_KT, _VT]]]) -> None: ... - -class IO(Iterable[AnyStr], Generic[AnyStr]): - # TODO detach - # TODO use abstract properties - @property - def mode(self) -> str: ... - @property - def name(self) -> str: ... - @abstractmethod - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - @abstractmethod - def fileno(self) -> int: ... - @abstractmethod - def flush(self) -> None: ... - @abstractmethod - def isatty(self) -> bool: ... - # TODO what if n is None? - @abstractmethod - def read(self, n: int = -1) -> AnyStr: ... - @abstractmethod - def readable(self) -> bool: ... - @abstractmethod - def readline(self, limit: int = -1) -> AnyStr: ... - @abstractmethod - def readlines(self, hint: int = -1) -> list[AnyStr]: ... - @abstractmethod - def seek(self, offset: int, whence: int = 0) -> None: ... - @abstractmethod - def seekable(self) -> bool: ... - @abstractmethod - def tell(self) -> int: ... - @abstractmethod - def truncate(self, size: int = ...) -> int: ... - @abstractmethod - def writable(self) -> bool: ... - # TODO buffer objects - @abstractmethod - def write(self, s: AnyStr) -> None: ... - @abstractmethod - def writelines(self, lines: Iterable[AnyStr]) -> None: ... - - @abstractmethod - def __iter__(self) -> Iterator[AnyStr]: ... - @abstractmethod - def __enter__(self) -> 'IO[AnyStr]': ... - @abstractmethod - def __exit__(self, type, value, traceback) -> bool: ... - -class BinaryIO(IO[str]): - # TODO readinto - # TODO read1? - # TODO peek? - @abstractmethod - def __enter__(self) -> BinaryIO: ... - -class TextIO(IO[unicode]): - # TODO use abstractproperty - @property - def buffer(self) -> BinaryIO: ... - @property - def encoding(self) -> str: ... - @property - def errors(self) -> str: ... - @property - def line_buffering(self) -> bool: ... - @property - def newlines(self) -> Any: ... # None, str or tuple - @abstractmethod - def __enter__(self) -> TextIO: ... - -class Match(Generic[AnyStr]): - pos = 0 - endpos = 0 - lastindex = 0 - lastgroup = None # type: AnyStr - string = None # type: AnyStr - - # The regular expression object whose match() or search() method produced - # this match instance. - re = None # type: 'Pattern[AnyStr]' - - def expand(self, template: AnyStr) -> AnyStr: ... - - @overload - def group(self, group1: int = 0) -> AnyStr: ... - @overload - def group(self, group1: str) -> AnyStr: ... - @overload - def group(self, group1: int, group2: int, - *groups: int) -> Sequence[AnyStr]: ... - @overload - def group(self, group1: str, group2: str, - *groups: str) -> Sequence[AnyStr]: ... - - def groups(self, default: AnyStr = None) -> Sequence[AnyStr]: ... - def groupdict(self, default: AnyStr = None) -> dict[str, AnyStr]: ... - def start(self, group: int = 0) -> int: ... - def end(self, group: int = 0) -> int: ... - def span(self, group: int = 0) -> Tuple[int, int]: ... - -class Pattern(Generic[AnyStr]): - flags = 0 - groupindex = 0 - groups = 0 - pattern = None # type: AnyStr - - def search(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Match[AnyStr]: ... - def match(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Match[AnyStr]: ... - def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr]: ... - def findall(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> list[AnyStr]: ... - def finditer(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Iterator[Match[AnyStr]]: ... - - @overload - def sub(self, repl: AnyStr, string: AnyStr, - count: int = 0) -> AnyStr: ... - @overload - def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, - count: int = 0) -> AnyStr: ... - - @overload - def subn(self, repl: AnyStr, string: AnyStr, - count: int = 0) -> Tuple[AnyStr, int]: ... - @overload - def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, - count: int = 0) -> Tuple[AnyStr, int]: ... diff --git a/stubs/2.7/unicodedata.pyi b/stubs/2.7/unicodedata.pyi deleted file mode 100644 index fd7bb6027f1d..000000000000 --- a/stubs/2.7/unicodedata.pyi +++ /dev/null @@ -1,37 +0,0 @@ -# Stubs for unicodedata (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -ucd_3_2_0 = ... # type: Any -ucnhash_CAPI = ... # type: Any -unidata_version = ... # type: str - -def bidirectional(unichr): ... -def category(unichr): ... -def combining(unichr): ... -def decimal(chr, default=...): ... -def decomposition(unichr): ... -def digit(chr, default=...): ... -def east_asian_width(unichr): ... -def lookup(name): ... -def mirrored(unichr): ... -def name(chr, default=...): ... -def normalize(form: str, unistr: unicode) -> unicode: ... -def numeric(chr, default=...): ... - -class UCD: - unidata_version = ... # type: Any - def bidirectional(self, unichr): ... - def category(self, unichr): ... - def combining(self, unichr): ... - def decimal(self, chr, default=...): ... - def decomposition(self, unichr): ... - def digit(self, chr, default=...): ... - def east_asian_width(self, unichr): ... - def lookup(self, name): ... - def mirrored(self, unichr): ... - def name(self, chr, default=...): ... - def normalize(self, form, unistr): ... - def numeric(self, chr, default=...): ... diff --git a/stubs/2.7/urllib.pyi b/stubs/2.7/urllib.pyi deleted file mode 100644 index 42863257d3a4..000000000000 --- a/stubs/2.7/urllib.pyi +++ /dev/null @@ -1,134 +0,0 @@ -# Stubs for urllib (Python 2) -# NOTE: This dynamically typed stub was originally automatically generated by stubgen. - -from typing import Any, Mapping, Union, Tuple, Sequence, IO - -def url2pathname(pathname: str) -> str: ... -def pathname2url(pathname: str) -> str: ... -def urlopen(url: str, data=None, proxies: Mapping[str, str] = None, context=None) -> IO[Any]: ... -def urlretrieve(url, filename=None, reporthook=None, data=None, context=None): ... -def urlcleanup() -> None: ... - -class ContentTooShortError(IOError): - content = ... # type: Any - def __init__(self, message, content): ... - -class URLopener: - version = ... # type: Any - proxies = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - context = ... # type: Any - addheaders = ... # type: Any - tempcache = ... # type: Any - ftpcache = ... # type: Any - def __init__(self, proxies: Mapping[str, str] = None, context=None, **x509) -> None: ... - def __del__(self): ... - def close(self): ... - def cleanup(self): ... - def addheader(self, *args): ... - type = ... # type: Any - def open(self, fullurl: str, data=None): ... - def open_unknown(self, fullurl, data=None): ... - def open_unknown_proxy(self, proxy, fullurl, data=None): ... - def retrieve(self, url, filename=None, reporthook=None, data=None): ... - def open_http(self, url, data=None): ... - def http_error(self, url, fp, errcode, errmsg, headers, data=None): ... - def http_error_default(self, url, fp, errcode, errmsg, headers): ... - def open_https(self, url, data=None): ... - def open_file(self, url): ... - def open_local_file(self, url): ... - def open_ftp(self, url): ... - def open_data(self, url, data=None): ... - -class FancyURLopener(URLopener): - auth_cache = ... # type: Any - tries = ... # type: Any - maxtries = ... # type: Any - def __init__(self, *args, **kwargs): ... - def http_error_default(self, url, fp, errcode, errmsg, headers): ... - def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): ... - def redirect_internal(self, url, fp, errcode, errmsg, headers, data): ... - def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): ... - def http_error_303(self, url, fp, errcode, errmsg, headers, data=None): ... - def http_error_307(self, url, fp, errcode, errmsg, headers, data=None): ... - def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): ... - def http_error_407(self, url, fp, errcode, errmsg, headers, data=None): ... - def retry_proxy_http_basic_auth(self, url, realm, data=None): ... - def retry_proxy_https_basic_auth(self, url, realm, data=None): ... - def retry_http_basic_auth(self, url, realm, data=None): ... - def retry_https_basic_auth(self, url, realm, data=None): ... - def get_user_passwd(self, host, realm, clear_cache=0): ... - def prompt_user_passwd(self, host, realm): ... - -class ftpwrapper: - user = ... # type: Any - passwd = ... # type: Any - host = ... # type: Any - port = ... # type: Any - dirs = ... # type: Any - timeout = ... # type: Any - refcount = ... # type: Any - keepalive = ... # type: Any - def __init__(self, user, passwd, host, port, dirs, timeout=..., persistent=True): ... - busy = ... # type: Any - ftp = ... # type: Any - def init(self): ... - def retrfile(self, file, type): ... - def endtransfer(self): ... - def close(self): ... - def file_close(self): ... - def real_close(self): ... - -class addbase: - fp = ... # type: Any - read = ... # type: Any - readline = ... # type: Any - readlines = ... # type: Any - fileno = ... # type: Any - __iter__ = ... # type: Any - next = ... # type: Any - def __init__(self, fp): ... - def close(self): ... - -class addclosehook(addbase): - closehook = ... # type: Any - hookargs = ... # type: Any - def __init__(self, fp, closehook, *hookargs): ... - def close(self): ... - -class addinfo(addbase): - headers = ... # type: Any - def __init__(self, fp, headers): ... - def info(self): ... - -class addinfourl(addbase): - headers = ... # type: Any - url = ... # type: Any - code = ... # type: Any - def __init__(self, fp, headers, url, code=None): ... - def info(self): ... - def getcode(self): ... - def geturl(self): ... - -def unwrap(url): ... -def splittype(url): ... -def splithost(url): ... -def splituser(host): ... -def splitpasswd(user): ... -def splitport(host): ... -def splitnport(host, defport=-1): ... -def splitquery(url): ... -def splittag(url): ... -def splitattr(url): ... -def splitvalue(attr): ... -def unquote(s: str) -> str: ... -def unquote_plus(s: str) -> str: ... -def quote(s: str, safe='') -> str: ... -def quote_plus(s: str, safe='') -> str: ... -def urlencode(query: Union[Sequence[Tuple[Any, Any]], Mapping[Any, Any]], doseq=0) -> str: ... - -def getproxies() -> Mapping[str, str]: ... # type: Any - -# Names in __all__ with no definition: -# basejoin diff --git a/stubs/2.7/urlparse.pyi b/stubs/2.7/urlparse.pyi deleted file mode 100644 index bf2e7917cef8..000000000000 --- a/stubs/2.7/urlparse.pyi +++ /dev/null @@ -1,47 +0,0 @@ -# Stubs for urlparse (Python 2) - -from typing import List, NamedTuple, Tuple - -uses_relative = [] # type: List[str] -uses_netloc = [] # type: List[str] -uses_params = [] # type: List[str] -non_hierarchical = [] # type: List[str] -uses_query = [] # type: List[str] -uses_fragment = [] # type: List[str] -scheme_chars = '' -MAX_CACHE_SIZE = 0 - -def clear_cache() -> None: ... - -class ResultMixin(object): - @property - def username(self) -> str: ... - @property - def password(self) -> str: ... - @property - def hostname(self) -> str: ... - @property - def port(self) -> int: ... - -class SplitResult(NamedTuple('SplitResult', [ - ('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str) - ]), ResultMixin): - def geturl(self) -> str: ... - -class ParseResult(NamedTuple('ParseResult', [ - ('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str), - ('fragment', str) - ]), ResultMixin): - def geturl(self) -> str: ... - -def urlparse(url: str, scheme: str = '', allow_fragments: bool = True) -> ParseResult: ... -def urlsplit(url: str, scheme: str = '', allow_fragments: bool = True) -> SplitResult: ... -def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ... -def urlunsplit(data: Tuple[str, str, str, str, str]) -> str: ... -def urljoin(base: str, url: str, allow_fragments: bool = True) -> str: ... -def urldefrag(url: str) -> str: ... -def unquote(s: str) -> str: ... -def parse_qs(qs: str, keep_blank_values: bool = ..., - strict_parsing: bool = ...) -> Dict[str, List[str]]: ... -def parse_qsl(qs: str, keep_blank_values: int = ..., - strict_parsing: bool = ...) -> List[Tuple[str, str]]: ... diff --git a/stubs/2.7/uuid.pyi b/stubs/2.7/uuid.pyi deleted file mode 100644 index 0f5e3ef60ee9..000000000000 --- a/stubs/2.7/uuid.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import NamedTuple, Any, Tuple - -_int_type = int - -class _UUIDFields(NamedTuple('_UUIDFields', - [('time_low', int), ('time_mid', int), ('time_hi_version', int), ('clock_seq_hi_variant', int), ('clock_seq_low', int), ('node', int)])): - time = ... # type: int - clock_seq = ... # type: int - -class UUID: - def __init__(self, hex: str = None, bytes: str = None, bytes_le: str = None, - fields: Tuple[int, int, int, int, int, int] = None, int: int = None, version: Any = None) -> None: ... - bytes = ... # type: str - bytes_le = ... # type: str - fields = ... # type: _UUIDFields - hex = ... # type: str - int = ... # type: _int_type - urn = ... # type: str - variant = ... # type: _int_type - version = ... # type: _int_type - -RESERVED_NCS = ... # type: int -RFC_4122 = ... # type: int -RESERVED_MICROSOFT = ... # type: int -RESERVED_FUTURE = ... # type: int - -def getnode() -> int: ... -def uuid1(node: int = None, clock_seq: int = None) -> UUID: ... -def uuid3(namespace: UUID, name: str) -> UUID: ... -def uuid4() -> UUID: ... -def uuid5(namespace: UUID, name: str) -> UUID: ... - -NAMESPACE_DNS = ... # type: str -NAMESPACE_URL = ... # type: str -NAMESPACE_OID = ... # type: str -NAMESPACE_X500 = ... # type: str diff --git a/stubs/2.7/xml/__init__.py b/stubs/2.7/xml/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/2.7/xml/sax/__init__.py b/stubs/2.7/xml/sax/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/2.7/xml/sax/handler.pyi b/stubs/2.7/xml/sax/handler.pyi deleted file mode 100644 index 64b40ad832b6..000000000000 --- a/stubs/2.7/xml/sax/handler.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# Stubs for xml.sax.handler (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -version = ... # type: Any - -class ErrorHandler: - def error(self, exception): ... - def fatalError(self, exception): ... - def warning(self, exception): ... - -class ContentHandler: - def __init__(self): ... - def setDocumentLocator(self, locator): ... - def startDocument(self): ... - def endDocument(self): ... - def startPrefixMapping(self, prefix, uri): ... - def endPrefixMapping(self, prefix): ... - def startElement(self, name, attrs): ... - def endElement(self, name): ... - def startElementNS(self, name, qname, attrs): ... - def endElementNS(self, name, qname): ... - def characters(self, content): ... - def ignorableWhitespace(self, whitespace): ... - def processingInstruction(self, target, data): ... - def skippedEntity(self, name): ... - -class DTDHandler: - def notationDecl(self, name, publicId, systemId): ... - def unparsedEntityDecl(self, name, publicId, systemId, ndata): ... - -class EntityResolver: - def resolveEntity(self, publicId, systemId): ... - -feature_namespaces = ... # type: Any -feature_namespace_prefixes = ... # type: Any -feature_string_interning = ... # type: Any -feature_validation = ... # type: Any -feature_external_ges = ... # type: Any -feature_external_pes = ... # type: Any -all_features = ... # type: Any -property_lexical_handler = ... # type: Any -property_declaration_handler = ... # type: Any -property_dom_node = ... # type: Any -property_xml_string = ... # type: Any -property_encoding = ... # type: Any -property_interning_dict = ... # type: Any -all_properties = ... # type: Any diff --git a/stubs/2.7/xml/sax/saxutils.pyi b/stubs/2.7/xml/sax/saxutils.pyi deleted file mode 100644 index 3b4d7687c7a3..000000000000 --- a/stubs/2.7/xml/sax/saxutils.pyi +++ /dev/null @@ -1,58 +0,0 @@ -# Stubs for xml.sax.saxutils (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Mapping - -from xml.sax import handler -from xml.sax import xmlreader - -def escape(data: str, entities: Mapping[str, str] = None) -> str: ... -def unescape(data: str, entities: Mapping[str, str] = None) -> str: ... -def quoteattr(data: str, entities: Mapping[str, str] = None) -> str: ... - -class XMLGenerator(handler.ContentHandler): - def __init__(self, out=None, encoding=''): ... - def startDocument(self): ... - def endDocument(self): ... - def startPrefixMapping(self, prefix, uri): ... - def endPrefixMapping(self, prefix): ... - def startElement(self, name, attrs): ... - def endElement(self, name): ... - def startElementNS(self, name, qname, attrs): ... - def endElementNS(self, name, qname): ... - def characters(self, content): ... - def ignorableWhitespace(self, content): ... - def processingInstruction(self, target, data): ... - -class XMLFilterBase(xmlreader.XMLReader): - def __init__(self, parent=None): ... - def error(self, exception): ... - def fatalError(self, exception): ... - def warning(self, exception): ... - def setDocumentLocator(self, locator): ... - def startDocument(self): ... - def endDocument(self): ... - def startPrefixMapping(self, prefix, uri): ... - def endPrefixMapping(self, prefix): ... - def startElement(self, name, attrs): ... - def endElement(self, name): ... - def startElementNS(self, name, qname, attrs): ... - def endElementNS(self, name, qname): ... - def characters(self, content): ... - def ignorableWhitespace(self, chars): ... - def processingInstruction(self, target, data): ... - def skippedEntity(self, name): ... - def notationDecl(self, name, publicId, systemId): ... - def unparsedEntityDecl(self, name, publicId, systemId, ndata): ... - def resolveEntity(self, publicId, systemId): ... - def parse(self, source): ... - def setLocale(self, locale): ... - def getFeature(self, name): ... - def setFeature(self, name, state): ... - def getProperty(self, name): ... - def setProperty(self, name, value): ... - def getParent(self): ... - def setParent(self, parent): ... - -def prepare_input_source(source, base=''): ... diff --git a/stubs/2.7/xml/sax/xmlreader.pyi b/stubs/2.7/xml/sax/xmlreader.pyi deleted file mode 100644 index b28ac3195e9d..000000000000 --- a/stubs/2.7/xml/sax/xmlreader.pyi +++ /dev/null @@ -1,75 +0,0 @@ -# Stubs for xml.sax.xmlreader (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class XMLReader: - def __init__(self): ... - def parse(self, source): ... - def getContentHandler(self): ... - def setContentHandler(self, handler): ... - def getDTDHandler(self): ... - def setDTDHandler(self, handler): ... - def getEntityResolver(self): ... - def setEntityResolver(self, resolver): ... - def getErrorHandler(self): ... - def setErrorHandler(self, handler): ... - def setLocale(self, locale): ... - def getFeature(self, name): ... - def setFeature(self, name, state): ... - def getProperty(self, name): ... - def setProperty(self, name, value): ... - -class IncrementalParser(XMLReader): - def __init__(self, bufsize=...): ... - def parse(self, source): ... - def feed(self, data): ... - def prepareParser(self, source): ... - def close(self): ... - def reset(self): ... - -class Locator: - def getColumnNumber(self): ... - def getLineNumber(self): ... - def getPublicId(self): ... - def getSystemId(self): ... - -class InputSource: - def __init__(self, system_id=None): ... - def setPublicId(self, public_id): ... - def getPublicId(self): ... - def setSystemId(self, system_id): ... - def getSystemId(self): ... - def setEncoding(self, encoding): ... - def getEncoding(self): ... - def setByteStream(self, bytefile): ... - def getByteStream(self): ... - def setCharacterStream(self, charfile): ... - def getCharacterStream(self): ... - -class AttributesImpl: - def __init__(self, attrs): ... - def getLength(self): ... - def getType(self, name): ... - def getValue(self, name): ... - def getValueByQName(self, name): ... - def getNameByQName(self, name): ... - def getQNameByName(self, name): ... - def getNames(self): ... - def getQNames(self): ... - def __len__(self): ... - def __getitem__(self, name): ... - def keys(self): ... - def has_key(self, name): ... - def __contains__(self, name): ... - def get(self, name, alternative=None): ... - def copy(self): ... - def items(self): ... - def values(self): ... - -class AttributesNSImpl(AttributesImpl): - def __init__(self, attrs, qnames): ... - def getValueByQName(self, name): ... - def getNameByQName(self, name): ... - def getQNameByName(self, name): ... - def getQNames(self): ... - def copy(self): ... diff --git a/stubs/2.7/zlib.pyi b/stubs/2.7/zlib.pyi deleted file mode 100644 index df0fa1e84de0..000000000000 --- a/stubs/2.7/zlib.pyi +++ /dev/null @@ -1,30 +0,0 @@ -# Stubs for zlib (Python 2.7) -# -# NOTE: This stub was automatically generated by stubgen. - -DEFLATED = ... # type: int -DEF_MEM_LEVEL = ... # type: int -MAX_WBITS = ... # type: int -ZLIB_VERSION = ... # type: str -Z_BEST_COMPRESSION = ... # type: int -Z_BEST_SPEED = ... # type: int -Z_DEFAULT_COMPRESSION = ... # type: int -Z_DEFAULT_STRATEGY = ... # type: int -Z_FILTERED = ... # type: int -Z_FINISH = ... # type: int -Z_FULL_FLUSH = ... # type: int -Z_HUFFMAN_ONLY = ... # type: int -Z_NO_FLUSH = ... # type: int -Z_SYNC_FLUSH = ... # type: int - -def adler32(data: str, value: int = ...) -> int: ... -def compress(data: str, level: int = ...) -> str: ... -# TODO: compressobj() returns a compress object -def compressobj(level: int = ..., method: int = ..., wbits: int = ..., memlevel: int = ..., - strategy: int = ...): ... -def crc32(data: str, value: int = ...) -> int: ... -def decompress(data: str, wbits: int = ..., bufsize: int = ...) -> str: ... -# TODO: decompressobj() returns a decompress object -def decompressobj(wbits: int = ...): ... - -class error(Exception): ... diff --git a/stubs/3.2/__future__.pyi b/stubs/3.2/__future__.pyi deleted file mode 100644 index 01265e8ecfdb..000000000000 --- a/stubs/3.2/__future__.pyi +++ /dev/null @@ -1,9 +0,0 @@ -class _Feature: ... - -absolute_import = ... # type: _Feature -division = ... # type: _Feature -generators = ... # type: _Feature -nested_scopes = ... # type: _Feature -print_function = ... # type: _Feature -unicode_literals = ... # type: _Feature -with_statement = ... # type: _Feature diff --git a/stubs/3.2/_dummy_thread.pyi b/stubs/3.2/_dummy_thread.pyi deleted file mode 100644 index a4ff81c35587..000000000000 --- a/stubs/3.2/_dummy_thread.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for _dummy_thread - -# NOTE: These are incomplete! - -from typing import Any - -class LockType: - def acquire(self) -> None: ... - def release(self) -> None: ... - -def allocate_lock() -> LockType: ... diff --git a/stubs/3.2/_io.pyi b/stubs/3.2/_io.pyi deleted file mode 100644 index 48bc504d302e..000000000000 --- a/stubs/3.2/_io.pyi +++ /dev/null @@ -1,48 +0,0 @@ -# Stubs for _io (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class _IOBase: - def __init__(self, *args, **kwargs): ... - @property - def closed(self): ... - def close(self): ... - def fileno(self): ... - def flush(self): ... - def isatty(self): ... - def readable(self): ... - def readline(self, size: int = -1): ... - def readlines(self, hint: int = -1): ... - def seek(self, offset, whence=...): ... - def seekable(self): ... - def tell(self): ... - def truncate(self, size: int = None) -> int: ... - def writable(self): ... - def writelines(self, lines): ... - def __del__(self): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_val, exc_tb): ... - def __iter__(self): ... - def __next__(self): ... - -class _BufferedIOBase(_IOBase): - def detach(self): ... - def read(self, size: int = -1): ... - def read1(self, size: int = -1): ... - def readinto(self, b): ... - def write(self, b): ... - -class _RawIOBase(_IOBase): - def read(self, size: int = -1): ... - def readall(self): ... - -class _TextIOBase(_IOBase): - encoding = ... # type: Any - errors = ... # type: Any - newlines = ... # type: Any - def detach(self): ... - def read(self, size: int = -1): ... - def readline(self, size: int = -1): ... - def write(self, b): ... diff --git a/stubs/3.2/_locale.pyi b/stubs/3.2/_locale.pyi deleted file mode 100644 index 17487b13db65..000000000000 --- a/stubs/3.2/_locale.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# Stubs for _locale (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Iterable - -ABDAY_1 = ... # type: int -ABDAY_2 = ... # type: int -ABDAY_3 = ... # type: int -ABDAY_4 = ... # type: int -ABDAY_5 = ... # type: int -ABDAY_6 = ... # type: int -ABDAY_7 = ... # type: int -ABMON_1 = ... # type: int -ABMON_10 = ... # type: int -ABMON_11 = ... # type: int -ABMON_12 = ... # type: int -ABMON_2 = ... # type: int -ABMON_3 = ... # type: int -ABMON_4 = ... # type: int -ABMON_5 = ... # type: int -ABMON_6 = ... # type: int -ABMON_7 = ... # type: int -ABMON_8 = ... # type: int -ABMON_9 = ... # type: int -ALT_DIGITS = ... # type: int -AM_STR = ... # type: int -CHAR_MAX = ... # type: int -CODESET = ... # type: int -CRNCYSTR = ... # type: int -DAY_1 = ... # type: int -DAY_2 = ... # type: int -DAY_3 = ... # type: int -DAY_4 = ... # type: int -DAY_5 = ... # type: int -DAY_6 = ... # type: int -DAY_7 = ... # type: int -D_FMT = ... # type: int -D_T_FMT = ... # type: int -ERA = ... # type: int -ERA_D_FMT = ... # type: int -ERA_D_T_FMT = ... # type: int -ERA_T_FMT = ... # type: int -LC_ALL = ... # type: int -LC_COLLATE = ... # type: int -LC_CTYPE = ... # type: int -LC_MESSAGES = ... # type: int -LC_MONETARY = ... # type: int -LC_NUMERIC = ... # type: int -LC_TIME = ... # type: int -MON_1 = ... # type: int -MON_10 = ... # type: int -MON_11 = ... # type: int -MON_12 = ... # type: int -MON_2 = ... # type: int -MON_3 = ... # type: int -MON_4 = ... # type: int -MON_5 = ... # type: int -MON_6 = ... # type: int -MON_7 = ... # type: int -MON_8 = ... # type: int -MON_9 = ... # type: int -NOEXPR = ... # type: int -PM_STR = ... # type: int -RADIXCHAR = ... # type: int -THOUSEP = ... # type: int -T_FMT = ... # type: int -T_FMT_AMPM = ... # type: int -YESEXPR = ... # type: int -_DATE_FMT = ... # type: int - -def bind_textdomain_codeset(domain, codeset): ... -def bindtextdomain(domain, dir): ... -def dcgettext(domain, msg, category): ... -def dgettext(domain, msg): ... -def gettext(msg): ... -def localeconv(): ... -def nl_langinfo(key): ... -def setlocale(category: int, locale: Iterable[str] = None) -> str: ... -def strcoll(string1, string2) -> int: ... -def strxfrm(string): ... -def textdomain(domain): ... - -class Error(Exception): ... diff --git a/stubs/3.2/_posixsubprocess.pyi b/stubs/3.2/_posixsubprocess.pyi deleted file mode 100644 index a048a10c804c..000000000000 --- a/stubs/3.2/_posixsubprocess.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for _posixsubprocess - -# NOTE: These are incomplete! - -from typing import Tuple, Sequence - -def cloexec_pipe() -> Tuple[int, int]: ... -def fork_exec(args: Sequence[str], - executable_list, close_fds, fds_to_keep, cwd: str, env_list, - p2cread: int, p2cwrite: int, c2pred: int, c2pwrite: int, - errread: int, errwrite: int, errpipe_read: int, - errpipe_write: int, restore_signals, start_new_session, - preexec_fn) -> int: ... diff --git a/stubs/3.2/_random.pyi b/stubs/3.2/_random.pyi deleted file mode 100644 index 881299ad17d1..000000000000 --- a/stubs/3.2/_random.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for _random - -# NOTE: These are incomplete! - -from typing import Any - -class Random: - def seed(self, x: Any = None) -> None: ... - def getstate(self) -> tuple: ... - def setstate(self, state: tuple) -> None: ... - def random(self) -> float: ... - def getrandbits(self, k: int) -> int: ... diff --git a/stubs/3.2/_subprocess.pyi b/stubs/3.2/_subprocess.pyi deleted file mode 100644 index 76967b94bcbb..000000000000 --- a/stubs/3.2/_subprocess.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# Stubs for _subprocess - -# NOTE: These are incomplete! - -from typing import Mapping, Any, Tuple - -CREATE_NEW_CONSOLE = 0 -CREATE_NEW_PROCESS_GROUP = 0 -STD_INPUT_HANDLE = 0 -STD_OUTPUT_HANDLE = 0 -STD_ERROR_HANDLE = 0 -SW_HIDE = 0 -STARTF_USESTDHANDLES = 0 -STARTF_USESHOWWINDOW = 0 -INFINITE = 0 -DUPLICATE_SAME_ACCESS = 0 -WAIT_OBJECT_0 = 0 - -# TODO not exported by the Python module -class Handle: - def Close(self) -> None: ... - -def GetVersion() -> int: ... -def GetExitCodeProcess(handle: Handle) -> int: ... -def WaitForSingleObject(handle: Handle, timeout: int) -> int: ... -def CreateProcess(executable: str, cmd_line: str, - proc_attrs, thread_attrs, - inherit: int, flags: int, - env_mapping: Mapping[str, str], - curdir: str, - startupinfo: Any) -> Tuple[Any, Handle, int, int]: ... -def GetModuleFileName(module: int) -> str: ... -def GetCurrentProcess() -> Handle: ... -def DuplicateHandle(source_proc: Handle, source: Handle, target_proc: Handle, - target: Any, access: int, inherit: int) -> int: ... -def CreatePipe(pipe_attrs, size: int) -> Tuple[Handle, Handle]: ... -def GetStdHandle(arg: int) -> int: ... -def TerminateProcess(handle: Handle, exit_code: int) -> None: ... diff --git a/stubs/3.2/_thread.pyi b/stubs/3.2/_thread.pyi deleted file mode 100644 index fb45d933f97b..000000000000 --- a/stubs/3.2/_thread.pyi +++ /dev/null @@ -1,14 +0,0 @@ -# Stubs for _thread - -# NOTE: These are incomplete! - -from typing import Any - -def _count() -> int: ... -_dangling = ... # type: Any - -class LockType: - def acquire(self) -> None: ... - def release(self) -> None: ... - -def allocate_lock() -> LockType: ... diff --git a/stubs/3.2/abc.pyi b/stubs/3.2/abc.pyi deleted file mode 100644 index 675f0b1621fe..000000000000 --- a/stubs/3.2/abc.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for abc. - -# Thesee definitions have special processing in type checker. -class ABCMeta: ... -abstractmethod = object() diff --git a/stubs/3.2/argparse.pyi b/stubs/3.2/argparse.pyi deleted file mode 100644 index 1ce65b6f1116..000000000000 --- a/stubs/3.2/argparse.pyi +++ /dev/null @@ -1,161 +0,0 @@ -# Stubs for argparse (Python 3) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Sequence - -SUPPRESS = ... # type: Any -OPTIONAL = ... # type: Any -ZERO_OR_MORE = ... # type: Any -ONE_OR_MORE = ... # type: Any -PARSER = ... # type: Any -REMAINDER = ... # type: Any - -class _AttributeHolder: ... - -class HelpFormatter: - def __init__(self, prog, indent_increment=2, max_help_position=24, width=None): ... - def start_section(self, heading): ... - def end_section(self): ... - def add_text(self, text): ... - def add_usage(self, usage, actions, groups, prefix=None): ... - def add_argument(self, action): ... - def add_arguments(self, actions): ... - def format_help(self): ... - -class RawDescriptionHelpFormatter(HelpFormatter): ... -class RawTextHelpFormatter(RawDescriptionHelpFormatter): ... -class ArgumentDefaultsHelpFormatter(HelpFormatter): ... -class MetavarTypeHelpFormatter(HelpFormatter): ... - -class ArgumentError(Exception): - argument_name = ... # type: Any - message = ... # type: Any - def __init__(self, argument, message): ... - -class ArgumentTypeError(Exception): ... - -class Action(_AttributeHolder): - option_strings = ... # type: Any - dest = ... # type: Any - nargs = ... # type: Any - const = ... # type: Any - default = ... # type: Any - type = ... # type: Any - choices = ... # type: Any - required = ... # type: Any - help = ... # type: Any - metavar = ... # type: Any - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreAction(Action): - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreConstAction(Action): - def __init__(self, option_strings, dest, const, default=None, required=False, help=None, - metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _StoreTrueAction(_StoreConstAction): - def __init__(self, option_strings, dest, default=False, required=False, help=None): ... - -class _StoreFalseAction(_StoreConstAction): - def __init__(self, option_strings, dest, default=True, required=False, help=None): ... - -class _AppendAction(Action): - def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, - choices=None, required=False, help=None, metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _AppendConstAction(Action): - def __init__(self, option_strings, dest, const, default=None, required=False, help=None, - metavar=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _CountAction(Action): - def __init__(self, option_strings, dest, default=None, required=False, help=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _HelpAction(Action): - def __init__(self, option_strings, dest=..., default=..., help=None): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _VersionAction(Action): - version = ... # type: Any - def __init__(self, option_strings, version=None, dest=..., default=..., - help=''): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class _SubParsersAction(Action): - def __init__(self, option_strings, prog, parser_class, dest=..., help=None, - metavar=None): ... - def add_parser(self, name, **kwargs): ... - def __call__(self, parser, namespace, values, option_string=None): ... - -class FileType: - def __init__(self, mode='', bufsize=-1, encoding=None, errors=None): ... - def __call__(self, string): ... - -class Namespace(_AttributeHolder): - def __init__(self, **kwargs): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def __contains__(self, key): ... - -class _ActionsContainer: - description = ... # type: Any - argument_default = ... # type: Any - prefix_chars = ... # type: Any - conflict_handler = ... # type: Any - def __init__(self, description, prefix_chars, argument_default, conflict_handler): ... - def register(self, registry_name, value, object): ... - def set_defaults(self, **kwargs): ... - def get_default(self, dest): ... - def add_argument(self, - *args: str, - action: str = None, - nargs: str = None, - const: Any = None, - default: Any = None, - type: Any = None, - choices: Any = None, # TODO: Container? - required: bool = None, - help: str = None, - metavar: str = None, - dest: str = None, - ) -> None: ... - def add_argument_group(self, *args, **kwargs): ... - def add_mutually_exclusive_group(self, **kwargs): ... - -class _ArgumentGroup(_ActionsContainer): - title = ... # type: Any - def __init__(self, container, title=None, description=None, **kwargs): ... - -class _MutuallyExclusiveGroup(_ArgumentGroup): - required = ... # type: Any - def __init__(self, container, required=False): ... - -class ArgumentParser(_AttributeHolder, _ActionsContainer): - prog = ... # type: Any - usage = ... # type: Any - epilog = ... # type: Any - formatter_class = ... # type: Any - fromfile_prefix_chars = ... # type: Any - add_help = ... # type: Any - def __init__(self, prog=None, usage=None, description=None, epilog=None, parents=..., - formatter_class=..., prefix_chars='', fromfile_prefix_chars=None, - argument_default=None, conflict_handler='', add_help=True): ... - def add_subparsers(self, **kwargs): ... - def parse_args(self, args: Sequence[str] = None, namespace=None) -> Any: ... - def parse_known_args(self, args=None, namespace=None): ... - def convert_arg_line_to_args(self, arg_line): ... - def format_usage(self): ... - def format_help(self): ... - def print_usage(self, file=None): ... - def print_help(self, file=None): ... - def exit(self, status=0, message=None): ... - def error(self, message): ... diff --git a/stubs/3.2/array.pyi b/stubs/3.2/array.pyi deleted file mode 100644 index 2f4778f1c7b3..000000000000 --- a/stubs/3.2/array.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# Stubs for array - -# Based on http://docs.python.org/3.2/library/array.html - -from typing import Any, Iterable, Tuple, List, Iterator, BinaryIO, overload - -typecodes = '' - -class array: - def __init__(self, typecode: str, - initializer: Iterable[Any] = None) -> None: - typecode = '' - itemsize = 0 - - def append(self, x: Any) -> None: ... - def buffer_info(self) -> Tuple[int, int]: ... - def byteswap(self) -> None: ... - def count(self, x: Any) -> int: ... - def extend(self, iterable: Iterable[Any]) -> None: ... - def frombytes(self, s: bytes) -> None: ... - def fromfile(self, f: BinaryIO, n: int) -> None: ... - def fromlist(self, list: List[Any]) -> None: ... - def fromstring(self, s: bytes) -> None: ... - def fromunicode(self, s: str) -> None: ... - def index(self, x: Any) -> int: ... - def insert(self, i: int, x: Any) -> None: ... - def pop(self, i: int = -1) -> Any: ... - def remove(self, x: Any) -> None: ... - def reverse(self) -> None: ... - def tobytes(self) -> bytes: ... - def tofile(self, f: BinaryIO) -> None: ... - def tolist(self) -> List[Any]: ... - def tostring(self) -> bytes: ... - def tounicode(self) -> str: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[Any]: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - - @overload - def __getitem__(self, i: int) -> Any: ... - @overload - def __getitem__(self, s: slice) -> 'array': ... - - def __setitem__(self, i: int, o: Any) -> None: ... - def __delitem__(self, i: int) -> None: ... - def __add__(self, x: 'array') -> 'array': ... - def __mul__(self, n: int) -> 'array': ... - def __contains__(self, o: object) -> bool: ... diff --git a/stubs/3.2/atexit.pyi b/stubs/3.2/atexit.pyi deleted file mode 100644 index 13d2602b0dc4..000000000000 --- a/stubs/3.2/atexit.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import TypeVar, Any - -_FT = TypeVar('_FT') - -def register(func: _FT, *args: Any, **kargs: Any) -> _FT: ... diff --git a/stubs/3.2/base64.pyi b/stubs/3.2/base64.pyi deleted file mode 100644 index 05c8097e788a..000000000000 --- a/stubs/3.2/base64.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for base64 - -# Based on http://docs.python.org/3.2/library/base64.html - -from typing import IO - -def b64encode(s: bytes, altchars: bytes = None) -> bytes: ... -def b64decode(s: bytes, altchars: bytes = None, - validate: bool = False) -> bytes: ... -def standard_b64encode(s: bytes) -> bytes: ... -def standard_b64decode(s: bytes) -> bytes: ... -def urlsafe_b64encode(s: bytes) -> bytes: ... -def urlsafe_b64decode(s: bytes) -> bytes: ... -def b32encode(s: bytes) -> bytes: ... -def b32decode(s: bytes, casefold: bool = False, - map01: bytes = None) -> bytes: ... -def b16encode(s: bytes) -> bytes: ... -def b16decode(s: bytes, casefold: bool = False) -> bytes: ... - -def decode(input: IO[bytes], output: IO[bytes]) -> None: ... -def decodebytes(s: bytes) -> bytes: ... -def decodestring(s: bytes) -> bytes: ... -def encode(input: IO[bytes], output: IO[bytes]) -> None: ... -def encodebytes(s: bytes) -> bytes: ... -def encodestring(s: bytes) -> bytes: ... diff --git a/stubs/3.2/binascii.pyi b/stubs/3.2/binascii.pyi deleted file mode 100644 index 8d428dc49c0e..000000000000 --- a/stubs/3.2/binascii.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for binascii - -# Based on http://docs.python.org/3.2/library/binascii.html - -import typing - -def a2b_uu(string: bytes) -> bytes: ... -def b2a_uu(data: bytes) -> bytes: ... -def a2b_base64(string: bytes) -> bytes: ... -def b2a_base64(data: bytes) -> bytes: ... -def a2b_qp(string: bytes, header: bool = False) -> bytes: ... -def b2a_qp(data: bytes, quotetabs: bool = False, istext: bool = True, - header: bool = False) -> bytes: ... -def a2b_hqx(string: bytes) -> bytes: ... -def rledecode_hqx(data: bytes) -> bytes: ... -def rlecode_hqx(data: bytes) -> bytes: ... -def b2a_hqx(data: bytes) -> bytes: ... -def crc_hqx(data: bytes, crc: int) -> int: ... -def crc32(data: bytes, crc: int = None) -> int: ... -def b2a_hex(data: bytes) -> bytes: ... -def hexlify(data: bytes) -> bytes: ... -def a2b_hex(hexstr: bytes) -> bytes: ... -def unhexlify(hexlify: bytes) -> bytes: ... - -class Error(Exception): ... -class Incomplete(Exception): ... diff --git a/stubs/3.2/builtins.pyi b/stubs/3.2/builtins.pyi deleted file mode 100644 index df082f30169c..000000000000 --- a/stubs/3.2/builtins.pyi +++ /dev/null @@ -1,801 +0,0 @@ -# Stubs for builtins (Python 3) - -from typing import ( - TypeVar, Iterator, Iterable, overload, - Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic, - Set, AbstractSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs, - SupportsRound, IO, Union, ItemsView, KeysView, ValuesView, ByteString -) -from abc import abstractmethod, ABCMeta - -# Note that names imported above are not automatically made visible via the -# implicit builtins import. - -_T = TypeVar('_T') -_T_co = TypeVar('_T_co', covariant=True) -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') -_S = TypeVar('_S') -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') - -staticmethod = object() # Only valid as a decorator. -classmethod = object() # Only valid as a decorator. -property = object() - -class object: - __doc__ = '' - __class__ = ... # type: type - - def __init__(self) -> None: ... - def __eq__(self, o: object) -> bool: ... - def __ne__(self, o: object) -> bool: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __hash__(self) -> int: ... - -class type: - __name__ = '' - __qualname__ = '' - __module__ = '' - __dict__ = ... # type: Dict[str, Any] - - def __init__(self, o: object) -> None: ... - @staticmethod - def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ... - -class int(SupportsInt, SupportsFloat, SupportsAbs[int]): - def __init__(self, x: Union[SupportsInt, str, bytes] = None, base: int = None) -> None: ... - def bit_length(self) -> int: ... - def to_bytes(self, length: int, byteorder: str, *, signed: bool = False) -> bytes: ... - @classmethod - def from_bytes(cls, bytes: Sequence[int], byteorder: str, *, - signed: bool = False) -> int: ... # TODO buffer object argument - - def __add__(self, x: int) -> int: ... - def __sub__(self, x: int) -> int: ... - def __mul__(self, x: int) -> int: ... - def __floordiv__(self, x: int) -> int: ... - def __truediv__(self, x: int) -> float: ... - def __mod__(self, x: int) -> int: ... - def __radd__(self, x: int) -> int: ... - def __rsub__(self, x: int) -> int: ... - def __rmul__(self, x: int) -> int: ... - def __rfloordiv__(self, x: int) -> int: ... - def __rtruediv__(self, x: int) -> float: ... - def __rmod__(self, x: int) -> int: ... - def __pow__(self, x: int) -> Any: ... # Return type can be int or float, depending on x. - def __rpow__(self, x: int) -> Any: ... - def __and__(self, n: int) -> int: ... - def __or__(self, n: int) -> int: ... - def __xor__(self, n: int) -> int: ... - def __lshift__(self, n: int) -> int: ... - def __rshift__(self, n: int) -> int: ... - def __rand__(self, n: int) -> int: ... - def __ror__(self, n: int) -> int: ... - def __rxor__(self, n: int) -> int: ... - def __rlshift__(self, n: int) -> int: ... - def __rrshift__(self, n: int) -> int: ... - def __neg__(self) -> int: ... - def __pos__(self) -> int: ... - def __invert__(self) -> int: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: int) -> bool: ... - def __le__(self, x: int) -> bool: ... - def __gt__(self, x: int) -> bool: ... - def __ge__(self, x: int) -> bool: ... - - def __str__(self) -> str: ... - def __float__(self) -> float: ... - def __int__(self) -> int: return self - def __abs__(self) -> int: ... - def __hash__(self) -> int: ... - -class float(SupportsFloat, SupportsInt, SupportsAbs[float]): - def __init__(self, x: Union[SupportsFloat, str, bytes]=None) -> None: ... - def as_integer_ratio(self) -> Tuple[int, int]: ... - def hex(self) -> str: ... - def is_integer(self) -> bool: ... - @classmethod - def fromhex(cls, s: str) -> float: ... - - def __add__(self, x: float) -> float: ... - def __sub__(self, x: float) -> float: ... - def __mul__(self, x: float) -> float: ... - def __floordiv__(self, x: float) -> float: ... - def __truediv__(self, x: float) -> float: ... - def __mod__(self, x: float) -> float: ... - def __pow__(self, x: float) -> float: ... - def __radd__(self, x: float) -> float: ... - def __rsub__(self, x: float) -> float: ... - def __rmul__(self, x: float) -> float: ... - def __rfloordiv__(self, x: float) -> float: ... - def __rtruediv__(self, x: float) -> float: ... - def __rmod__(self, x: float) -> float: ... - def __rpow__(self, x: float) -> float: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: float) -> bool: ... - def __le__(self, x: float) -> bool: ... - def __gt__(self, x: float) -> bool: ... - def __ge__(self, x: float) -> bool: ... - def __neg__(self) -> float: ... - def __pos__(self) -> float: ... - - def __str__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __abs__(self) -> float: ... - def __hash__(self) -> int: ... - -class complex(SupportsAbs[float]): - @overload - def __init__(self, re: float = 0.0, im: float = 0.0) -> None: ... - @overload - def __init__(self, s: str) -> None: ... - - @property - def real(self) -> float: ... - @property - def imag(self) -> float: ... - - def conjugate(self) -> complex: ... - - def __add__(self, x: complex) -> complex: ... - def __sub__(self, x: complex) -> complex: ... - def __mul__(self, x: complex) -> complex: ... - def __pow__(self, x: complex) -> complex: ... - def __truediv__(self, x: complex) -> complex: ... - def __radd__(self, x: complex) -> complex: ... - def __rsub__(self, x: complex) -> complex: ... - def __rmul__(self, x: complex) -> complex: ... - def __rpow__(self, x: complex) -> complex: ... - def __rtruediv__(self, x: complex) -> complex: ... - - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __neg__(self) -> complex: ... - def __pos__(self) -> complex: ... - - def __str__(self) -> str: ... - def __abs__(self) -> float: ... - def __hash__(self) -> int: ... - -class str(Sequence[str]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, o: object) -> None: ... - @overload - def __init__(self, o: bytes, encoding: str = None, errors: str = 'strict') -> None: ... - def capitalize(self) -> str: ... - def center(self, width: int, fillchar: str = ' ') -> str: ... - def count(self, x: str) -> int: ... - def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ... - def endswith(self, suffix: Union[str, Tuple[str, ...]], start: int = None, - end: int = None) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> str: ... - def find(self, sub: str, start: int = 0, end: int = 0) -> int: ... - def format(self, *args: Any, **kwargs: Any) -> str: ... - def format_map(self, map: Mapping[str, Any]) -> str: ... - def index(self, sub: str, start: int = 0, end: int = 0) -> int: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdecimal(self) -> bool: ... - def isdigit(self) -> bool: ... - def isidentifier(self) -> bool: ... - def islower(self) -> bool: ... - def isnumeric(self) -> bool: ... - def isprintable(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[str]) -> str: ... - def ljust(self, width: int, fillchar: str = ' ') -> str: ... - def lower(self) -> str: ... - def lstrip(self, chars: str = None) -> str: ... - def partition(self, sep: str) -> Tuple[str, str, str]: ... - def replace(self, old: str, new: str, count: int = -1) -> str: ... - def rfind(self, sub: str, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: str, start: int = 0, end: int = 0) -> int: ... - def rjust(self, width: int, fillchar: str = ' ') -> str: ... - def rpartition(self, sep: str) -> Tuple[str, str, str]: ... - def rsplit(self, sep: str = None, maxsplit: int = -1) -> List[str]: ... - def rstrip(self, chars: str = None) -> str: ... - def split(self, sep: str = None, maxsplit: int = -1) -> List[str]: ... - def splitlines(self, keepends: bool = False) -> List[str]: ... - def startswith(self, prefix: Union[str, Tuple[str, ...]], start: int = None, - end: int = None) -> bool: ... - def strip(self, chars: str = None) -> str: ... - def swapcase(self) -> str: ... - def title(self) -> str: ... - def translate(self, table: Dict[int, Any]) -> str: ... - def upper(self) -> str: ... - def zfill(self, width: int) -> str: ... - @staticmethod - @overload - def maketrans(self, x: Union[Dict[int, Any], Dict[str, Any]]) -> Dict[int, Any]: ... - @staticmethod - @overload - def maketrans(self, x: str, y: str, z: str = ...) -> Dict[int, Any]: ... - - def __getitem__(self, i: Union[int, slice]) -> str: ... - def __add__(self, s: str) -> str: ... - def __mul__(self, n: int) -> str: ... - def __rmul__(self, n: int) -> str: ... - def __mod__(self, *args: Any) -> str: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: str) -> bool: ... - def __le__(self, x: str) -> bool: ... - def __gt__(self, x: str) -> bool: ... - def __ge__(self, x: str) -> bool: ... - - def __len__(self) -> int: ... - def __contains__(self, s: object) -> bool: ... - def __iter__(self) -> Iterator[str]: ... - def __str__(self) -> str: return self - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - -class bytes(ByteString): - @overload - def __init__(self, ints: Iterable[int]) -> None: ... - @overload - def __init__(self, string: str, encoding: str, - errors: str = 'strict') -> None: ... - @overload - def __init__(self, length: int) -> None: ... - @overload - def __init__(self) -> None: ... - def capitalize(self) -> bytes: ... - def center(self, width: int, fillchar: bytes = None) -> bytes: ... - def count(self, x: bytes) -> int: ... - def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ... - def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> bytes: ... - def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdigit(self) -> bool: ... - def islower(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[bytes]) -> bytes: ... - def ljust(self, width: int, fillchar: bytes = None) -> bytes: ... - def lower(self) -> bytes: ... - def lstrip(self, chars: bytes = None) -> bytes: ... - def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... - def replace(self, old: bytes, new: bytes, count: int = -1) -> bytes: ... - def rfind(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def rjust(self, width: int, fillchar: bytes = None) -> bytes: ... - def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... - def rsplit(self, sep: bytes = None, maxsplit: int = -1) -> List[bytes]: ... - def rstrip(self, chars: bytes = None) -> bytes: ... - def split(self, sep: bytes = None, maxsplit: int = -1) -> List[bytes]: ... - def splitlines(self, keepends: bool = False) -> List[bytes]: ... - def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... - def strip(self, chars: bytes = None) -> bytes: ... - def swapcase(self) -> bytes: ... - def title(self) -> bytes: ... - def translate(self, table: bytes) -> bytes: ... - def upper(self) -> bytes: ... - def zfill(self, width: int) -> bytes: ... - # TODO fromhex - # TODO maketrans - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[int]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> int: ... - @overload - def __getitem__(self, s: slice) -> bytes: ... - def __add__(self, s: bytes) -> bytes: ... - def __mul__(self, n: int) -> bytes: ... - def __rmul__(self, n: int) -> bytes: ... - def __contains__(self, o: object) -> bool: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: bytes) -> bool: ... - def __le__(self, x: bytes) -> bool: ... - def __gt__(self, x: bytes) -> bool: ... - def __ge__(self, x: bytes) -> bool: ... - -class bytearray(MutableSequence[int], ByteString): - @overload - def __init__(self, ints: Iterable[int]) -> None: ... - @overload - def __init__(self, string: str, encoding: str, errors: str = 'strict') -> None: ... - @overload - def __init__(self, length: int) -> None: ... - @overload - def __init__(self) -> None: ... - def capitalize(self) -> bytearray: ... - def center(self, width: int, fillchar: bytes = None) -> bytearray: ... - def count(self, x: bytes) -> int: ... - def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ... - def endswith(self, suffix: bytes) -> bool: ... - def expandtabs(self, tabsize: int = 8) -> bytearray: ... - def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def insert(self, index: int, object: int) -> None: ... - def isalnum(self) -> bool: ... - def isalpha(self) -> bool: ... - def isdigit(self) -> bool: ... - def islower(self) -> bool: ... - def isspace(self) -> bool: ... - def istitle(self) -> bool: ... - def isupper(self) -> bool: ... - def join(self, iterable: Iterable[bytes]) -> bytearray: ... - def ljust(self, width: int, fillchar: bytes = None) -> bytearray: ... - def lower(self) -> bytearray: ... - def lstrip(self, chars: bytes = None) -> bytearray: ... - def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... - def replace(self, old: bytes, new: bytes, count: int = -1) -> bytearray: ... - def rfind(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... - def rjust(self, width: int, fillchar: bytes = None) -> bytearray: ... - def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... - def rsplit(self, sep: bytes = None, maxsplit: int = -1) -> List[bytearray]: ... - def rstrip(self, chars: bytes = None) -> bytearray: ... - def split(self, sep: bytes = None, maxsplit: int = -1) -> List[bytearray]: ... - def splitlines(self, keepends: bool = False) -> List[bytearray]: ... - def startswith(self, prefix: bytes) -> bool: ... - def strip(self, chars: bytes = None) -> bytearray: ... - def swapcase(self) -> bytearray: ... - def title(self) -> bytearray: ... - def translate(self, table: bytes) -> bytearray: ... - def upper(self) -> bytearray: ... - def zfill(self, width: int) -> bytearray: ... - # TODO fromhex - # TODO maketrans - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[int]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> int: ... - @overload - def __getitem__(self, s: slice) -> bytearray: ... - @overload - def __setitem__(self, i: int, x: int) -> None: ... - @overload - def __setitem__(self, s: slice, x: Sequence[int]) -> None: ... - def __delitem__(self, i: Union[int, slice]) -> None: ... - def __add__(self, s: bytes) -> bytearray: ... - # TODO: Mypy complains about __add__ and __iadd__ having different signatures. - def __iadd__(self, s: Iterable[int]) -> bytearray: ... # type: ignore - def __mul__(self, n: int) -> bytearray: ... - def __rmul__(self, n: int) -> bytearray: ... - def __imul__(self, n: int) -> bytearray: ... - def __contains__(self, o: object) -> bool: ... - def __eq__(self, x: object) -> bool: ... - def __ne__(self, x: object) -> bool: ... - def __lt__(self, x: bytes) -> bool: ... - def __le__(self, x: bytes) -> bool: ... - def __gt__(self, x: bytes) -> bool: ... - def __ge__(self, x: bytes) -> bool: ... - -class memoryview(): - # TODO arg can be any obj supporting the buffer protocol - def __init__(self, bytearray) -> None: ... - -class bool(int, SupportsInt, SupportsFloat): - def __init__(self, o: object = False) -> None: ... - -class slice: - start = 0 - step = 0 - stop = 0 - def __init__(self, start: int, stop: int = 0, step: int = 0) -> None: ... - -class tuple(Sequence[_T_co], Generic[_T_co]): - def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... - def __len__(self) -> int: ... - def __contains__(self, x: object) -> bool: ... - @overload - def __getitem__(self, x: int) -> _T_co: ... - @overload - def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... - def __iter__(self) -> Iterator[_T_co]: ... - def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... - def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... - def __mul__(self, n: int) -> Tuple[_T_co, ...]: ... - def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ... - def count(self, x: Any) -> int: ... - def index(self, x: Any) -> int: ... - -class function: - # TODO not defined in builtins! - __name__ = '' - __qualname__ = '' - __module__ = '' - __code__ = ... # type: Any - -class list(MutableSequence[_T], Reversible[_T], Generic[_T]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - def clear(self) -> None: ... - def copy(self) -> List[_T]: ... - def append(self, object: _T) -> None: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def pop(self, index: int = -1) -> _T: ... - def index(self, object: _T, start: int = 0, stop: int = ...) -> int: ... - def count(self, object: _T) -> int: ... - def insert(self, index: int, object: _T) -> None: ... - def remove(self, object: _T) -> None: ... - def reverse(self) -> None: ... - def sort(self, *, key: Callable[[_T], Any] = None, reverse: bool = False) -> None: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - @overload - def __getitem__(self, i: int) -> _T: ... - @overload - def __getitem__(self, s: slice) -> List[_T]: ... - @overload - def __setitem__(self, i: int, o: _T) -> None: ... - @overload - def __setitem__(self, s: slice, o: Sequence[_T]) -> None: ... - def __delitem__(self, i: Union[int, slice]) -> None: ... - def __add__(self, x: List[_T]) -> List[_T]: ... - def __iadd__(self, x: Iterable[_T]) -> List[_T]: ... - def __mul__(self, n: int) -> List[_T]: ... - def __rmul__(self, n: int) -> List[_T]: ... - def __imul__(self, n: int) -> List[_T]: ... - def __contains__(self, o: object) -> bool: ... - def __reversed__(self) -> Iterator[_T]: ... - def __gt__(self, x: List[_T]) -> bool: ... - def __ge__(self, x: List[_T]) -> bool: ... - def __lt__(self, x: List[_T]) -> bool: ... - def __le__(self, x: List[_T]) -> bool: ... - -class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... # TODO keyword args - def clear(self) -> None: ... - def copy(self) -> Dict[_KT, _VT]: ... - def get(self, k: _KT, default: _VT = None) -> _VT: ... - def pop(self, k: _KT, default: _VT = None) -> _VT: ... - def popitem(self) -> Tuple[_KT, _VT]: ... - def setdefault(self, k: _KT, default: _VT = None) -> _VT: ... - def update(self, m: Union[Mapping[_KT, _VT], - Iterable[Tuple[_KT, _VT]]]) -> None: ... - def keys(self) -> KeysView[_KT]: ... - def values(self) -> ValuesView[_VT]: ... - def items(self) -> ItemsView[_KT, _VT]: ... - @staticmethod - @overload - def fromkeys(seq: Sequence[_T]) -> Dict[_T, Any]: ... # TODO: Actually a class method - @staticmethod - @overload - def fromkeys(seq: Sequence[_T], value: _S) -> Dict[_T, _S]: ... - def __len__(self) -> int: ... - def __getitem__(self, k: _KT) -> _VT: ... - def __setitem__(self, k: _KT, v: _VT) -> None: ... - def __delitem__(self, v: _KT) -> None: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_KT]: ... - def __str__(self) -> str: ... - -class set(MutableSet[_T], Generic[_T]): - def __init__(self, iterable: Iterable[_T]=None) -> None: ... - def add(self, element: _T) -> None: ... - def clear(self) -> None: ... - def copy(self) -> set[_T]: ... - def difference(self, s: Iterable[Any]) -> set[_T]: ... - def difference_update(self, s: Iterable[Any]) -> None: ... - def discard(self, element: _T) -> None: ... - def intersection(self, s: Iterable[Any]) -> set[_T]: ... - def intersection_update(self, s: Iterable[Any]) -> None: ... - def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... - def issubset(self, s: AbstractSet[Any]) -> bool: ... - def issuperset(self, s: AbstractSet[Any]) -> bool: ... - def pop(self) -> _T: ... - def remove(self, element: _T) -> None: ... - def symmetric_difference(self, s: Iterable[_T]) -> set[_T]: ... - def symmetric_difference_update(self, s: Iterable[_T]) -> None: ... - def union(self, s: Iterable[_T]) -> set[_T]: ... - def update(self, s: Iterable[_T]) -> None: ... - def __len__(self) -> int: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __and__(self, s: AbstractSet[Any]) -> set[_T]: ... - def __iand__(self, s: AbstractSet[Any]) -> set[_T]: ... - def __or__(self, s: AbstractSet[_S]) -> set[Union[_T, _S]]: ... - def __ior__(self, s: AbstractSet[_S]) -> set[Union[_T, _S]]: ... - def __sub__(self, s: AbstractSet[Any]) -> set[_T]: ... - def __isub__(self, s: AbstractSet[Any]) -> set[_T]: ... - def __xor__(self, s: AbstractSet[_S]) -> set[Union[_T, _S]]: ... - def __ixor__(self, s: AbstractSet[_S]) -> set[Union[_T, _S]]: ... - def __le__(self, s: AbstractSet[Any]) -> bool: ... - def __lt__(self, s: AbstractSet[Any]) -> bool: ... - def __ge__(self, s: AbstractSet[Any]) -> bool: ... - def __gt__(self, s: AbstractSet[Any]) -> bool: ... - # TODO more set operations - -class frozenset(AbstractSet[_T], Generic[_T]): - def __init__(self, iterable: Iterable[_T]=None) -> None: ... - def copy(self) -> frozenset[_T]: ... - def difference(self, s: AbstractSet[Any]) -> frozenset[_T]: ... - def intersection(self, s: AbstractSet[Any]) -> frozenset[_T]: ... - def isdisjoint(self, s: AbstractSet[_T]) -> bool: ... - def issubset(self, s: AbstractSet[Any]) -> bool: ... - def issuperset(self, s: AbstractSet[Any]) -> bool: ... - def symmetric_difference(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def union(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def __len__(self) -> int: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __and__(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def __or__(self, s: AbstractSet[_S]) -> frozenset[Union[_T, _S]]: ... - def __sub__(self, s: AbstractSet[_T]) -> frozenset[_T]: ... - def __xor__(self, s: AbstractSet[_S]) -> frozenset[Union[_T, _S]]: ... - def __le__(self, s: AbstractSet[Any]) -> bool: ... - def __lt__(self, s: AbstractSet[Any]) -> bool: ... - def __ge__(self, s: AbstractSet[Any]) -> bool: ... - def __gt__(self, s: AbstractSet[Any]) -> bool: ... - -class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): - def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ... - def __iter__(self) -> Iterator[Tuple[int, _T]]: ... - def __next__(self) -> Tuple[int, _T]: ... - # TODO __getattribute__ - -class range(Sequence[int], Reversible[int]): - @overload - def __init__(self, stop: int) -> None: ... - @overload - def __init__(self, start: int, stop: int, step: int = 1) -> None: ... - def count(self, value: int) -> int: ... - def index(self, value: int, start: int = 0, stop: int = None) -> int: ... - def __len__(self) -> int: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[int]: ... - @overload - def __getitem__(self, i: int) -> int: ... - @overload - def __getitem__(self, s: slice) -> range: ... - def __repr__(self) -> str: ... - def __reversed__(self) -> Iterator[int]: ... - -class module: - # TODO not defined in builtins! - __name__ = '' - __file__ = '' - __dict__ = ... # type: Dict[str, Any] - -True = ... # type: bool -False = ... # type: bool -__debug__ = False - -NotImplemented = ... # type: Any - -def abs(n: SupportsAbs[_T]) -> _T: ... -def all(i: Iterable) -> bool: ... -def any(i: Iterable) -> bool: ... -def ascii(o: object) -> str: ... -def bin(number: int) -> str: ... -def callable(o: object) -> bool: ... -def chr(code: int) -> str: ... -def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = 0, - dont_inherit: int = 0) -> Any: ... -def copyright() -> None: ... -def credits() -> None: ... -def delattr(o: Any, name: str) -> None: ... -def dir(o: object = None) -> List[str]: ... -_N = TypeVar('_N', int, float) -def divmod(a: _N, b: _N) -> Tuple[_N, _N]: ... -def eval(source: str, globals: Dict[str, Any] = None, - locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source -def exec(object: str, globals: Dict[str, Any] = None, - locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source -def exit(code: int = None) -> None: ... -def filter(function: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ... -def format(o: object, format_spec: str = '') -> str: ... -def getattr(o: Any, name: str, default: Any = None) -> Any: ... -def globals() -> Dict[str, Any]: ... -def hasattr(o: Any, name: str) -> bool: ... -def hash(o: object) -> int: ... -def help(*args: Any, **kwds: Any) -> None: ... -def hex(i: int) -> str: ... # TODO __index__ -def id(o: object) -> int: ... -def input(prompt: str = None) -> str: ... -@overload -def iter(iterable: Iterable[_T]) -> Iterator[_T]: ... -@overload -def iter(function: Callable[[], _T], sentinel: _T) -> Iterator[_T]: ... -def isinstance(o: object, t: Union[type, Tuple[type, ...]]) -> bool: ... -def issubclass(cls: type, classinfo: type) -> bool: ... -# TODO support this -#def issubclass(type cld, classinfo: Sequence[type]) -> bool: ... -def len(o: Union[Sized, tuple]) -> int: ... -def license() -> None: ... -def locals() -> Dict[str, Any]: ... -@overload -def map(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> Iterator[_S]: ... -@overload -def map(func: Callable[[_T1, _T2], _S], iter1: Iterable[_T1], - iter2: Iterable[_T2]) -> Iterator[_S]: ... # TODO more than two iterables -@overload -def max(iterable: Iterable[_T]) -> _T: ... # TODO keyword argument key -@overload -def max(arg1: _T, arg2: _T, *args: _T) -> _T: ... -# TODO memoryview -@overload -def min(iterable: Iterable[_T]) -> _T: ... -@overload -def min(arg1: _T, arg2: _T, *args: _T) -> _T: ... -@overload -def next(i: Iterator[_T]) -> _T: ... -@overload -def next(i: Iterator[_T], default: _T) -> _T: ... -def oct(i: int) -> str: ... # TODO __index__ -def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None, - errors: str = None, newline: str = None, closefd: bool = True) -> IO[Any]: ... -def ord(c: Union[str, bytes, bytearray]) -> int: ... -def print(*values: Any, sep: str = ' ', end: str = '\n', file: IO[str] = None) -> None: ... -@overload -def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y -@overload -def pow(x: int, y: int, z: int) -> Any: ... -@overload -def pow(x: float, y: float) -> float: ... -@overload -def pow(x: float, y: float, z: float) -> float: ... -def quit(code: int = None) -> None: ... -@overload -def reversed(object: Reversible[_T]) -> Iterator[_T]: ... -@overload -def reversed(object: Sequence[_T]) -> Iterator[_T]: ... -def repr(o: object) -> str: ... -@overload -def round(number: float) -> int: ... -@overload -def round(number: float, ndigits: int) -> float: ... # Always return a float if given ndigits. -@overload -def round(number: SupportsRound[_T]) -> _T: ... -@overload -def round(number: SupportsRound[_T], ndigits: int) -> _T: ... -def setattr(object: Any, name: str, value: Any) -> None: ... -def sorted(iterable: Iterable[_T], *, key: Callable[[_T], Any] = None, - reverse: bool = False) -> List[_T]: ... -def sum(iterable: Iterable[_T], start: _T = None) -> _T: ... -def vars(object: Any = None) -> Dict[str, Any]: ... -@overload -def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], - iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], - iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, - _T3, _T4]]: ... # TODO more than four iterables -def __import__(name: str, globals: Dict[str, Any] = {}, locals: Dict[str, Any] = {}, - fromlist: List[str] = [], level: int = -1) -> Any: ... - -# Ellipsis - -class ellipsis: - # TODO not defined in builtins! - def __init__(self) -> None: ... - -Ellipsis = ellipsis() - -# Exceptions - -class BaseException: - args = ... # type: Any - def __init__(self, *args: Any) -> None: ... - def with_traceback(self, tb: Any) -> BaseException: ... - -class GeneratorExit(BaseException): ... -class KeyboardInterrupt(BaseException): ... -class SystemExit(BaseException): - code = 0 -class Exception(BaseException): ... -class ArithmeticError(Exception): ... -class EnvironmentError(Exception): - errno = 0 - strerror = '' - filename = '' # TODO can this be bytes? -class LookupError(Exception): ... -class RuntimeError(Exception): ... -class ValueError(Exception): ... -class AssertionError(Exception): ... -class AttributeError(Exception): ... -class BufferError(Exception): ... -class EOFError(Exception): ... -class FloatingPointError(ArithmeticError): ... -class IOError(EnvironmentError): ... -class ImportError(Exception): ... -class IndexError(LookupError): ... -class KeyError(LookupError): ... -class MemoryError(Exception): ... -class NameError(Exception): ... -class NotImplementedError(RuntimeError): ... -class OSError(EnvironmentError): ... -class BlockingIOError(OSError): - characters_written = 0 -class ChildProcessError(OSError): ... -class ConnectionError(OSError): ... -class BrokenPipeError(ConnectionError): ... -class ConnectionAbortedError(ConnectionError): ... -class ConnectionRefusedError(ConnectionError): ... -class ConnectionResetError(ConnectionError): ... -class FileExistsError(OSError): ... -class FileNotFoundError(OSError): ... -class InterruptedError(OSError): ... -class IsADirectoryError(OSError): ... -class NotADirectoryError(OSError): ... -class PermissionError(OSError): ... -class ProcessLookupError(OSError): ... -class TimeoutError(OSError): ... -class WindowsError(OSError): ... -class OverflowError(ArithmeticError): ... -class ReferenceError(Exception): ... -class StopIteration(Exception): ... -class SyntaxError(Exception): ... -class IndentationError(SyntaxError): ... -class TabError(IndentationError): ... -class SystemError(Exception): ... -class TypeError(Exception): ... -class UnboundLocalError(NameError): ... -class UnicodeError(ValueError): ... -class UnicodeDecodeError(UnicodeError): - encoding = ... # type: str - object = ... # type: bytes - start = ... # type: int - end = ... # type: int - reason = ... # type: str - def __init__(self, __encoding: str, __object: bytes, __start: int, __end: int, - __reason: str) -> None: ... -class UnicodeEncodeError(UnicodeError): ... -class UnicodeTranslateError(UnicodeError): ... -class ZeroDivisionError(ArithmeticError): ... - -class Warning(Exception): ... -class UserWarning(Warning): ... -class DeprecationWarning(Warning): ... -class SyntaxWarning(Warning): ... -class RuntimeWarning(Warning): ... -class FutureWarning(Warning): ... -class PendingDeprecationWarning(Warning): ... -class ImportWarning(Warning): ... -class UnicodeWarning(Warning): ... -class BytesWarning(Warning): ... -class ResourceWarning(Warning): ... diff --git a/stubs/3.2/bz2.pyi b/stubs/3.2/bz2.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/calendar.pyi b/stubs/3.2/calendar.pyi deleted file mode 100644 index c0bfc733ff1c..000000000000 --- a/stubs/3.2/calendar.pyi +++ /dev/null @@ -1,15 +0,0 @@ -# Stubs for calendar - -# NOTE: These are incomplete! - -from typing import overload, Tuple - -# TODO actually, any number of items larger than 5 is fine -@overload -def timegm(t: Tuple[int, int, int, int, int, int]) -> int: ... -@overload -def timegm(t: Tuple[int, int, int, int, int, int, int]) -> int: ... -@overload -def timegm(t: Tuple[int, int, int, int, int, int, int, int]) -> int: ... -@overload -def timegm(t: Tuple[int, int, int, int, int, int, int, int, int]) -> int: ... diff --git a/stubs/3.2/cgi.pyi b/stubs/3.2/cgi.pyi deleted file mode 100644 index 8c622dfb7476..000000000000 --- a/stubs/3.2/cgi.pyi +++ /dev/null @@ -1 +0,0 @@ -def escape(s: str) -> str: ... diff --git a/stubs/3.2/codecs.pyi b/stubs/3.2/codecs.pyi deleted file mode 100644 index 0ad02b7e8d7a..000000000000 --- a/stubs/3.2/codecs.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Any, BinaryIO, Callable, IO - -BOM_UTF8 = b'' - -class Codec: ... -class StreamWriter(Codec): ... - -class CodecInfo(tuple): - def __init__(self, *args) -> None: ... - -def register(search_function: Callable[[str], CodecInfo]) -> None: - ... - -def register_error(name: str, error_handler: Callable[[UnicodeError], Any]) -> None: ... - -def lookup(encoding: str) -> CodecInfo: - ... - -# TODO This Callable is actually a StreamWriter constructor -def getwriter(encoding: str) -> Callable[[BinaryIO], StreamWriter]: ... - -class IncrementalDecoder: - errors = ... # type: Any - def __init__(self, errors=''): ... - def decode(self, input, final=False): ... - def reset(self): ... - def getstate(self): ... - def setstate(self, state): ... - -def open(filename: str, mode: str='rb', encoding: str=None, errors: str='strict', buffering: int=1) -> IO[Any]: - ... diff --git a/stubs/3.2/collections.pyi b/stubs/3.2/collections.pyi deleted file mode 100644 index fcf029d4ee7a..000000000000 --- a/stubs/3.2/collections.pyi +++ /dev/null @@ -1,112 +0,0 @@ -# Stubs for collections - -# Based on http://docs.python.org/3.2/library/collections.html - -# TODO UserDict -# TODO UserList -# TODO UserString -# TODO more abstract base classes (interfaces in mypy) - -from typing import ( - TypeVar, Iterable, Generic, Iterator, Dict, overload, - Mapping, List, Tuple, Callable, Set, Sequence, Sized, - Optional, Union -) -import typing - -_T = TypeVar('_T') -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') - - -# namedtuple is special-cased in the type checker; the initializer is ignored. -namedtuple = object() - - -MutableMapping = typing.MutableMapping - - -class deque(Sized, Iterable[_T], Generic[_T]): - maxlen = 0 # type: Optional[int] # TODO readonly - def __init__(self, iterable: Iterable[_T] = None, - maxlen: int = None) -> None: ... - def append(self, x: _T) -> None: ... - def appendleft(self, x: _T) -> None: ... - def clear(self) -> None: ... - def count(self, x: _T) -> int: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def extendleft(self, iterable: Iterable[_T]) -> None: ... - def pop(self) -> _T: ... - def popleft(self) -> _T: ... - def remove(self, value: _T) -> None: ... - def reverse(self) -> None: ... - def rotate(self, n: int) -> None: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - - def __getitem__(self, i: int) -> _T: ... - def __setitem__(self, i: int, x: _T) -> None: ... - def __contains__(self, o: _T) -> bool: ... - - # TODO __reversed__ - - -class Counter(Dict[_T, int], Generic[_T]): - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, Mapping: Mapping[_T, int]) -> None: ... - @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... - # TODO keyword arguments - - def elements(self) -> Iterator[_T]: ... - - @overload - def most_common(self) -> List[_T]: ... - @overload - def most_common(self, n: int) -> List[_T]: ... - - @overload - def subtract(self, Mapping: Mapping[_T, int]) -> None: ... - @overload - def subtract(self, iterable: Iterable[_T]) -> None: ... - - # The Iterable[Tuple[...]] argument type is not actually desirable - # (the tuples will be added as keys, breaking type safety) but - # it's included so that the signature is compatible with - # Dict.update. Not sure if we should use '# type: ignore' instead - # and omit the type from the union. - def update(self, m: Union[Mapping[_T, int], - Iterable[Tuple[_T, int]], - Iterable[_T]]) -> None: ... - -class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): - def popitem(self, last: bool = True) -> Tuple[_KT, _VT]: ... - def move_to_end(self, key: _KT, last: bool = True) -> None: ... - - -class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): - default_factory = ... # type: Callable[[], _VT] - - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT], - map: Mapping[_KT, _VT]) -> None: ... - @overload - def __init__(self, default_factory: Callable[[], _VT], - iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... - # TODO __init__ keyword args - - def __missing__(self, key: _KT) -> _VT: ... - # TODO __reversed__ diff --git a/stubs/3.2/contextlib.pyi b/stubs/3.2/contextlib.pyi deleted file mode 100644 index cebbfb13297d..000000000000 --- a/stubs/3.2/contextlib.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for contextlib - -# NOTE: These are incomplete! - -from typing import Any - -# TODO more precise type? -def contextmanager(func: Any) -> Any: ... diff --git a/stubs/3.2/copy.pyi b/stubs/3.2/copy.pyi deleted file mode 100644 index 237f4203a2f5..000000000000 --- a/stubs/3.2/copy.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for copy - -# NOTE: These are incomplete! - -from typing import TypeVar - -_T = TypeVar('_T') - -def deepcopy(x: _T) -> _T: ... -def copy(x: _T) -> _T: ... diff --git a/stubs/3.2/csv.pyi b/stubs/3.2/csv.pyi deleted file mode 100644 index fb7fd190be4c..000000000000 --- a/stubs/3.2/csv.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# Stubs for csv (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -QUOTE_ALL = ... # type: int -QUOTE_MINIMAL = ... # type: int -QUOTE_NONE = ... # type: int -QUOTE_NONNUMERIC = ... # type: int - -class Error(Exception): ... - -def writer(csvfile, dialect=..., **fmtparams): ... -def reader(csvfile, dialect=..., **fmtparams): ... -def register_dialect(name, dialect=..., **fmtparams): ... -def unregister_dialect(name): ... -def get_dialect(name): ... -def list_dialects(): ... -def field_size_limit(new_limit=...): ... - -class Dialect: - delimiter = ... # type: Any - quotechar = ... # type: Any - escapechar = ... # type: Any - doublequote = ... # type: Any - skipinitialspace = ... # type: Any - lineterminator = ... # type: Any - quoting = ... # type: Any - def __init__(self): ... - -class excel(Dialect): - delimiter = ... # type: Any - quotechar = ... # type: Any - doublequote = ... # type: Any - skipinitialspace = ... # type: Any - lineterminator = ... # type: Any - quoting = ... # type: Any - -class excel_tab(excel): - delimiter = ... # type: Any - -class unix_dialect(Dialect): - delimiter = ... # type: Any - quotechar = ... # type: Any - doublequote = ... # type: Any - skipinitialspace = ... # type: Any - lineterminator = ... # type: Any - quoting = ... # type: Any - -class DictReader: - restkey = ... # type: Any - restval = ... # type: Any - reader = ... # type: Any - dialect = ... # type: Any - line_num = ... # type: Any - fieldnames = ... # type: Any # Actually a property - def __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect='', - *args, **kwds): ... - def __iter__(self): ... - def __next__(self): ... - -class DictWriter: - fieldnames = ... # type: Any - restval = ... # type: Any - extrasaction = ... # type: Any - writer = ... # type: Any - def __init__(self, f, fieldnames, restval='', extrasaction='', dialect='', *args, **kwds): ... - def writeheader(self): ... - def writerow(self, rowdict): ... - def writerows(self, rowdicts): ... - -class Sniffer: - preferred = ... # type: Any - def __init__(self): ... - def sniff(self, sample, delimiters=None): ... - def has_header(self, sample): ... diff --git a/stubs/3.2/datetime.pyi b/stubs/3.2/datetime.pyi deleted file mode 100644 index db10d056d474..000000000000 --- a/stubs/3.2/datetime.pyi +++ /dev/null @@ -1,221 +0,0 @@ -# Stubs for datetime - -# NOTE: These are incomplete! - -from typing import Optional, SupportsAbs, Tuple, Union, overload - -MINYEAR = 0 -MAXYEAR = 0 - -class tzinfo: - def tzname(self, dt: Optional[datetime]) -> str: ... - def utcoffset(self, dt: Optional[datetime]) -> int: ... - def dst(self, dt: Optional[datetime]) -> int: ... - def fromutc(self, dt: datetime) -> datetime: ... - -class timezone(tzinfo): - utc = ... # type: tzinfo - min = ... # type: tzinfo - max = ... # type: tzinfo - - def __init__(self, offset: timedelta, name: str = '') -> None: ... - def __hash__(self) -> int: ... - -_tzinfo = tzinfo -_timezone = timezone - -class date: - min = ... # type: date - max = ... # type: date - resolution = ... # type: timedelta - - def __init__(self, year: int, month: int = None, day: int = None) -> None: ... - - @classmethod - def fromtimestamp(cls, t: float) -> date: ... - @classmethod - def today(cls) -> date: ... - @classmethod - def fromordinal(cls, n: int) -> date: ... - - @property - def year(self) -> int: ... - @property - def month(self) -> int: ... - @property - def day(self) -> int: ... - - def ctime(self) -> str: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def isoformat(self) -> str: ... - def timetuple(self) -> tuple: ... # TODO return type - def toordinal(self) -> int: ... - def replace(self, year: int = None, month: int = None, day: int = None) -> date: ... - def __le__(self, other: date) -> bool: ... - def __lt__(self, other: date) -> bool: ... - def __ge__(self, other: date) -> bool: ... - def __gt__(self, other: date) -> bool: ... - def __add__(self, other: timedelta) -> date: ... - @overload - def __sub__(self, other: timedelta) -> date: ... - @overload - def __sub__(self, other: date) -> timedelta: ... - def __hash__(self) -> int: ... - def weekday(self) -> int: ... - def isoweekday(self) -> int: ... - def isocalendar(self) -> Tuple[int, int, int]: ... - -class time: - min = ... # type: time - max = ... # type: time - resolution = ... # type: timedelta - - def __init__(self, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0, - tzinfo: tzinfo = None) -> None: ... - - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _tzinfo: ... - - def __le__(self, other: time) -> bool: ... - def __lt__(self, other: time) -> bool: ... - def __ge__(self, other: time) -> bool: ... - def __gt__(self, other: time) -> bool: ... - def __hash__(self) -> int: ... - def isoformat(self) -> str: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def utcoffset(self) -> Optional[int]: ... - def tzname(self) -> Optional[str]: ... - def dst(self) -> Optional[int]: ... - def replace(self, hour: int = None, minute: int = None, second: int = None, - microsecond: int = None, tzinfo: Union[_tzinfo, bool] = True) -> time: ... - -_date = date -_time = time - -class timedelta(SupportsAbs[timedelta]): - min = ... # type: timedelta - max = ... # type: timedelta - resolution = ... # type: timedelta - - def __init__(self, days: int = 0, seconds: int = 0, microseconds: int = 0, - milliseconds: int = 0, minutes: int = 0, hours: int = 0, - weeks: int = 0) -> None: ... - - @property - def days(self) -> int: ... - @property - def seconds(self) -> int: ... - @property - def microseconds(self) -> int: ... - - def total_seconds(self) -> float: ... - def __add__(self, other: timedelta) -> timedelta: ... - def __radd__(self, other: timedelta) -> timedelta: ... - def __sub__(self, other: timedelta) -> timedelta: ... - def __rsub(self, other: timedelta) -> timedelta: ... - def __neg__(self) -> timedelta: ... - def __pos__(self) -> timedelta: ... - def __abs__(self) -> timedelta: ... - def __mul__(self, other: float) -> timedelta: ... - def __rmul__(self, other: float) -> timedelta: ... - @overload - def __floordiv__(self, other: timedelta) -> int: ... - @overload - def __floordiv__(self, other: int) -> timedelta: ... - @overload - def __truediv__(self, other: timedelta) -> float: ... - @overload - def __truediv__(self, other: float) -> timedelta: ... - def __mod__(self, other: timedelta) -> timedelta: ... - def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ... - def __le__(self, other: timedelta) -> bool: ... - def __lt__(self, other: timedelta) -> bool: ... - def __ge__(self, other: timedelta) -> bool: ... - def __gt__(self, other: timedelta) -> bool: ... - def __hash__(self) -> int: ... - - -class datetime: - # TODO: Is a subclass of date, but this would make some types incompatible. - min = ... # type: datetime - max = ... # type: datetime - resolution = ... # type: timedelta - - def __init__(self, year: int, month: int = None, day: int = None, hour: int = None, - minute: int = None, second: int = None, microsecond: int = None, - tzinfo: tzinfo = None) -> None: ... - - @property - def year(self) -> int: ... - @property - def month(self) -> int: ... - @property - def day(self) -> int: ... - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _tzinfo: ... - - @classmethod - def fromtimestamp(cls, t: float, tz: timezone = None) -> datetime: ... - @classmethod - def utcfromtimestamp(cls, t: float) -> datetime: ... - @classmethod - def today(cls) -> datetime: ... - @classmethod - def fromordinal(cls, n: int) -> datetime: ... - @classmethod - def now(cls, tz: timezone = None) -> datetime: ... - @classmethod - def utcnow(cls) -> datetime: ... - @classmethod - def combine(cls, date: date, time: time) -> datetime: ... - def strftime(self, fmt: str) -> str: ... - def __format__(self, fmt: str) -> str: ... - def toordinal(self) -> int: ... - def timetuple(self) -> tuple: ... # TODO return type - def timestamp(self) -> float: ... - def utctimetuple(self) -> tuple: ... # TODO return type - def date(self) -> _date: ... - def time(self) -> _time: ... - def timetz(self) -> _time: ... - def replace(self, year: int = None, month: int = None, day: int = None, hour: int = None, - minute: int = None, second: int = None, microsecond: int = None, tzinfo: - Union[_tzinfo, bool] = True) -> datetime: ... - def astimezone(self, tz: timezone = None) -> datetime: ... - def ctime(self) -> str: ... - def isoformat(self, sep: str = 'T') -> str: ... - @classmethod - def strptime(cls, date_string: str, format: str) -> datetime: ... - def utcoffset(self) -> Optional[int]: ... - def tzname(self) -> Optional[str]: ... - def dst(self) -> Optional[int]: ... - def __le__(self, other: datetime) -> bool: ... - def __lt__(self, other: datetime) -> bool: ... - def __ge__(self, other: datetime) -> bool: ... - def __gt__(self, other: datetime) -> bool: ... - def __add__(self, other: timedelta) -> datetime: ... - @overload - def __sub__(self, other: datetime) -> timedelta: ... - @overload - def __sub__(self, other: timedelta) -> datetime: ... - def __hash__(self) -> int: ... - def weekday(self) -> int: ... - def isoweekday(self) -> int: ... - def isocalendar(self) -> Tuple[int, int, int]: ... diff --git a/stubs/3.2/decimal.pyi b/stubs/3.2/decimal.pyi deleted file mode 100644 index 30bc71f264ee..000000000000 --- a/stubs/3.2/decimal.pyi +++ /dev/null @@ -1,255 +0,0 @@ -# Stubs for decimal (Python 3.4) - -from typing import ( - Any, Union, SupportsInt, SupportsFloat, SupportsAbs, SupportsRound, Sequence, - Tuple, NamedTuple, Dict -) - -_Decimal = Union[Decimal, int] - -BasicContext = ... # type: Context -DefaultContext = ... # type: Context -ExtendedContext = ... # type: Context -HAVE_THREADS = ... # type: bool -MAX_EMAX = ... # type: int -MAX_PREC = ... # type: int -MIN_EMIN = ... # type: int -MIN_ETINY = ... # type: int -ROUND_05UP = ... # type: str -ROUND_CEILING = ... # type: str -ROUND_DOWN = ... # type: str -ROUND_FLOOR = ... # type: str -ROUND_HALF_DOWN = ... # type: str -ROUND_HALF_EVEN = ... # type: str -ROUND_HALF_UP = ... # type: str -ROUND_UP = ... # type: str - -def getcontext() -> Context: ... -def localcontext(ctx: Context = None) -> _ContextManager: ... -def setcontext(c: Context) -> None: ... - -DecimalTuple = NamedTuple('DecimalTuple', - [('sign', int), - ('digits', Sequence[int]), # TODO: Use Tuple[int, ...] - ('exponent', int)]) - -class _ContextManager: - def __enter__(self) -> Context: ... - def __exit__(self, t, v, tb) -> None: ... - -class Context: - Emax = ... # type: int - Emin = ... # type: int - capitals = ... # type: int - clamp = ... # type: int - prec = ... # type: int - rounding = ... # type: str - traps = ... # type: Dict[type, bool] - def __init__(self, prec: int = None, rounding: str = None, Emin: int = None, Emax: int = None, - capitals: int = None, clamp: int = None, flags=None, traps=None, - _ignored_flags=None) -> None: ... - def Etiny(self): ... - def Etop(self): ... - def abs(self, x: _Decimal) -> Decimal: ... - def add(self, x: _Decimal, y: _Decimal) -> Decimal: ... - def canonical(self, x): ... - def clear_flags(self): ... - def clear_traps(self): ... - def compare(self, x, y): ... - def compare_signal(self, x, y): ... - def compare_total(self, x, y): ... - def compare_total_mag(self, x, y): ... - def copy(self): ... - def copy_abs(self, x): ... - def copy_decimal(self, x): ... - def copy_negate(self, x): ... - def copy_sign(self, x, y): ... - def create_decimal(self, x): ... - def create_decimal_from_float(self, f): ... - def divide(self, x, y): ... - def divide_int(self, x, y): ... - def divmod(self, x, y): ... - def exp(self, x): ... - def fma(self, x, y, z): ... - def is_canonical(self, x): ... - def is_finite(self, x): ... - def is_infinite(self, x): ... - def is_nan(self, x): ... - def is_normal(self, x): ... - def is_qnan(self, x): ... - def is_signed(self, x): ... - def is_snan(self): ... - def is_subnormal(self, x): ... - def is_zero(self, x): ... - def ln(self, x): ... - def log10(self, x): ... - def logb(self, x): ... - def logical_and(self, x, y): ... - def logical_invert(self, x): ... - def logical_or(self, x, y): ... - def logical_xor(self, x, y): ... - def max(self, x, y): ... - def max_mag(self, x, y): ... - def min(self, x, y): ... - def min_mag(self, x, y): ... - def minus(self, x): ... - def multiply(self, x, y): ... - def next_minus(self, x): ... - def next_plus(self, x): ... - def next_toward(self, x): ... - def normalize(self, x): ... - def number_class(self, x): ... - def plus(self, x): ... - def power(self, x, y): ... - def quantize(self, x, y): ... - def radix(self): ... - def remainder(self, x, y): ... - def remainder_near(self, x, y): ... - def rotate(self, x, y): ... - def same_quantum(self, x, y): ... - def scaleb(self, x, y): ... - def shift(self, x, y): ... - def sqrt(self, x): ... - def subtract(self, x, y): ... - def to_eng_string(self, x): ... - def to_integral(self, x): ... - def to_integral_exact(self, x): ... - def to_integral_value(self, x): ... - def to_sci_string(self, x): ... - def __copy__(self) -> Context: ... - def __delattr__(self, name): ... - def __reduce__(self): ... - -class ConversionSyntax(InvalidOperation): ... - -class Decimal(SupportsInt, SupportsFloat, SupportsAbs[Decimal], SupportsRound[int]): - # TODO: SupportsCeil, SupportsFloor, SupportsTrunc? - - def __init__(cls, value: Union[_Decimal, float, str, - Tuple[int, Sequence[int], int]] = '', - context: Context = None) -> None: ... - - @property - def imag(self) -> Decimal: ... - @property - def real(self) -> Decimal: ... - - def adjusted(self) -> int: ... - def as_tuple(self) -> DecimalTuple: ... - def canonical(self) -> Decimal: ... - def compare(self, other: _Decimal, context: Context = None) -> Decimal: ... - def compare_signal(self, other: _Decimal, context: Context = None) -> Decimal: ... - def compare_total(self, other: _Decimal, context: Context = None) -> Decimal: ... - def compare_total_mag(self, other: _Decimal, context: Context = None) -> Decimal: ... - def conjugate(self) -> Decimal: ... - def copy_abs(self) -> Decimal: ... - def copy_negate(self) -> Decimal: ... - def copy_sign(self, other: _Decimal, context: Context = None) -> Decimal: ... - def exp(self, context: Context = None) -> Decimal: ... - def fma(self, other: _Decimal, third: _Decimal, context: Context = None) -> Decimal: ... - @classmethod - def from_float(cls, f: float) -> Decimal: ... - def is_canonical(self) -> bool: ... - def is_finite(self) -> bool: ... - def is_infinite(self) -> bool: ... - def is_nan(self) -> bool: ... - def is_normal(self, context: Context = None) -> bool: ... - def is_qnan(self) -> bool: ... - def is_signed(self) -> bool: ... - def is_snan(self) -> bool: ... - def is_subnormal(self, context: Context = None) -> bool: ... - def is_zero(self) -> bool: ... - def ln(self, context: Context = None) -> Decimal: ... - def log10(self, context: Context = None) -> Decimal: ... - def logb(self, context: Context = None) -> Decimal: ... - def logical_and(self, other: _Decimal, context: Context = None) -> Decimal: ... - def logical_invert(self, context: Context = None) -> Decimal: ... - def logical_or(self, other: _Decimal, context: Context = None) -> Decimal: ... - def logical_xor(self, other: _Decimal, context: Context = None) -> Decimal: ... - def max(self, other: _Decimal, context: Context = None) -> Decimal: ... - def max_mag(self, other: _Decimal, context: Context = None) -> Decimal: ... - def min(self, other: _Decimal, context: Context = None) -> Decimal: ... - def min_mag(self, other: _Decimal, context: Context = None) -> Decimal: ... - def next_minus(self, context: Context = None) -> Decimal: ... - def next_plus(self, context: Context = None) -> Decimal: ... - def next_toward(self, other: _Decimal, context: Context = None) -> Decimal: ... - def normalize(self, context: Context = None) -> Decimal: ... - def number_class(self, context: Context = None) -> str: ... - def quantize(self, exp: _Decimal, rounding: str = None, - context: Context = None) -> Decimal: ... - def radix(self) -> Decimal: ... - def remainder_near(self, other: _Decimal, context: Context = None) -> Decimal: ... - def rotate(self, other: _Decimal, context: Context = None) -> Decimal: ... - def same_quantum(self, other: _Decimal, context: Context = None) -> bool: ... - def scaleb(self, other: _Decimal, context: Context = None) -> Decimal: ... - def shift(self, other: _Decimal, context: Context = None) -> Decimal: ... - def sqrt(self, context: Context = None) -> Decimal: ... - def to_eng_string(self, context: Context = None) -> str: ... - def to_integral(self, rounding: str = None, context: Context = None) -> Decimal: ... - def to_integral_exact(self, rounding: str = None, context: Context = None) -> Decimal: ... - def to_integral_value(self, rounding: str = None, context: Context = None) -> Decimal: ... - def __abs__(self) -> Decimal: ... - def __add__(self, other: _Decimal) -> Decimal: ... - def __bool__(self) -> bool: ... - def __ceil__(self) -> int: ... - def __complex__(self) -> complex: ... - def __copy__(self) -> Decimal: ... - def __deepcopy__(self) -> Decimal: ... - def __divmod__(self, other: _Decimal) -> Tuple[Decimal, Decimal]: ... - def __eq__(self, other: object) -> bool: ... - def __float__(self) -> float: ... - def __floor__(self) -> int: ... - def __floordiv__(self, other: _Decimal) -> Decimal: ... - def __format__(self, specifier, context=None, _localeconv=None) -> str: ... - def __ge__(self, other: _Decimal) -> bool: ... - def __gt__(self, other: _Decimal) -> bool: ... - def __hash__(self) -> int: ... - def __int__(self) -> int: ... - def __le__(self, other: _Decimal) -> bool: ... - def __lt__(self, other: _Decimal) -> bool: ... - def __mod__(self, other: _Decimal) -> Decimal: ... - def __mul__(self, other: _Decimal) -> Decimal: ... - def __ne__(self, other: object) -> bool: ... - def __neg__(self) -> Decimal: ... - def __pos__(self) -> Decimal: ... - def __pow__(self, other: _Decimal) -> Decimal: ... - def __radd__(self, other: int) -> Decimal: ... - def __rdivmod__(self, other: int) -> Tuple[Decimal, Decimal]: ... - def __reduce__(self): ... - def __rfloordiv__(self, other: int) -> Decimal: ... - def __rmod__(self, other: int) -> Decimal: ... - def __rmul__(self, other: int) -> Decimal: ... - def __round__(self, n=None) -> int: ... - def __rpow__(self, other: int) -> Decimal: ... - def __rsub__(self, other: int) -> Decimal: ... - def __rtruediv__(self, other: int) -> Decimal: ... - def __sizeof__(self) -> int: ... - def __sub__(self, other: _Decimal) -> Decimal: ... - def __truediv__(self, other: _Decimal) -> Decimal: ... - def __trunc__(self) -> int: ... - -class DecimalException(ArithmeticError): ... - -class Clamped(DecimalException): ... - -class DivisionByZero(DecimalException, ZeroDivisionError): ... - -class DivisionImpossible(InvalidOperation): ... - -class DivisionUndefined(InvalidOperation, ZeroDivisionError): ... - -class FloatOperation(DecimalException, TypeError): ... - -class Inexact(DecimalException): ... - -class InvalidContext(InvalidOperation): ... - -class InvalidOperation(DecimalException): ... - -class Overflow(Inexact, Rounded): ... - -class Rounded(DecimalException): ... - -class Subnormal(DecimalException): ... - -class Underflow(Inexact, Rounded, Subnormal): ... diff --git a/stubs/3.2/difflib.pyi b/stubs/3.2/difflib.pyi deleted file mode 100644 index a1af3dcd7524..000000000000 --- a/stubs/3.2/difflib.pyi +++ /dev/null @@ -1,61 +0,0 @@ -# Stubs for difflib - -# Based on https://docs.python.org/3.2/library/difflib.html - -from typing import ( - TypeVar, Callable, Iterable, List, NamedTuple, Sequence, Tuple, Generic -) - -_T = TypeVar('_T') - -class SequenceMatcher(Generic[_T]): - def __init__(self, isjunk: Callable[[_T], bool] = None, - a: Sequence[_T] = ..., b: Sequence[_T] = ..., - autojunk: bool = True) -> None: ... - def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ... - def set_seq1(self, a: Sequence[_T]) -> None: ... - def set_seq2(self, b: Sequence[_T]) -> None: ... - def find_longest_match(self, alo: int, ahi: int, blo: int, - bhi: int) -> Tuple[int, int, int]: ... - def get_matching_blocks(self) -> List[Tuple[int, int, int]]: ... - def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ... - def get_grouped_opcodes(self, n: int = 3 - ) -> Iterable[Tuple[str, int, int, int, int]]: ... - def ratio(self) -> float: ... - def quick_ratio(self) -> float: ... - def real_quick_ratio(self) -> float: ... - -def get_close_matches(word: Sequence[_T], possibilities: List[Sequence[_T]], - n: int = 3, cutoff: float = 0.6) -> List[Sequence[_T]]: ... - -class Differ: - def __init__(self, linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = None) -> None: ... - def compare(self, a: Sequence[str], b: Sequence[str]) -> Iterable[str]: ... - -def IS_LINE_JUNK(str) -> bool: ... -def IS_CHARACTER_JUNK(str) -> bool: ... -def unified_diff(a: Sequence[str], b: Sequence[str], fromfile: str = '', - tofile: str = '', fromfiledate: str = '', tofiledate: str = '', - n: int = 3, lineterm: str = '\n') -> Iterable[str]: ... -def context_diff(a: Sequence[str], b: Sequence[str], fromfile: str='', - tofile: str = '', fromfiledate: str = '', tofiledate: str = '', - n: int = 3, lineterm: str = '\n') -> Iterable[str]: ... -def ndiff(a: Sequence[str], b: Sequence[str], - linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK - ) -> Iterable[str]: ... - -class HtmlDiff(object): - def __init__(self, tabsize: int = 8, wrapcolumn: int = None, - linejunk: Callable[[str], bool] = None, - charjunk: Callable[[str], bool] = IS_CHARACTER_JUNK - ) -> None: ... - def make_file(self, fromlines: Sequence[str], tolines: Sequence[str], - fromdesc: str = '', todesc: str = '', context: bool = False, - numlines: int = 5) -> str: ... - def make_table(self, fromlines: Sequence[str], tolines: Sequence[str], - fromdesc: str = '', todesc: str = '', context: bool = False, - numlines: int = 5) -> str: ... - -def restore(delta: Iterable[str], which: int) -> Iterable[int]: ... diff --git a/stubs/3.2/distutils/__init__.pyi b/stubs/3.2/distutils/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/distutils/errors.pyi b/stubs/3.2/distutils/errors.pyi deleted file mode 100644 index e5578f969067..000000000000 --- a/stubs/3.2/distutils/errors.pyi +++ /dev/null @@ -1,4 +0,0 @@ -import typing - -class DistutilsError(Exception): ... -class DistutilsExecError(DistutilsError): ... diff --git a/stubs/3.2/distutils/spawn.pyi b/stubs/3.2/distutils/spawn.pyi deleted file mode 100644 index 9c0fbb81b2c7..000000000000 --- a/stubs/3.2/distutils/spawn.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import List - -# In Python, arguments have integer default values -def spawn(cmd: List[str], search_path: bool = True, verbose: bool = False, - dry_run: bool = False) -> None: ... -def find_executable(executable: str, path: str = None) -> str: ... diff --git a/stubs/3.2/doctest.pyi b/stubs/3.2/doctest.pyi deleted file mode 100644 index 8c3d6ef6ea30..000000000000 --- a/stubs/3.2/doctest.pyi +++ /dev/null @@ -1,9 +0,0 @@ -# Stubs for doctest - -# NOTE: These are incomplete! - -from typing import Any, Tuple - -# TODO arguments missing -def testmod(module: Any = None, *, name: str = None, globs: Any = None, - verbose: bool = None) -> Tuple[int, int]: ... diff --git a/stubs/3.2/docutils/__init__.pyi b/stubs/3.2/docutils/__init__.pyi deleted file mode 100644 index eb1ae458f8ee..000000000000 --- a/stubs/3.2/docutils/__init__.pyi +++ /dev/null @@ -1 +0,0 @@ -... diff --git a/stubs/3.2/docutils/examples.pyi b/stubs/3.2/docutils/examples.pyi deleted file mode 100644 index 0abfc7b45d6e..000000000000 --- a/stubs/3.2/docutils/examples.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -html_parts = ... # type: Any diff --git a/stubs/3.2/docutils/nodes.pyi b/stubs/3.2/docutils/nodes.pyi deleted file mode 100644 index 7cea12d4eeb0..000000000000 --- a/stubs/3.2/docutils/nodes.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Any, List - -class reference: - def __init__(self, - rawsource: str = '', - text: str = '', - *children: List[Any], - **attributes) -> None: ... diff --git a/stubs/3.2/docutils/parsers/__init__.pyi b/stubs/3.2/docutils/parsers/__init__.pyi deleted file mode 100644 index eb1ae458f8ee..000000000000 --- a/stubs/3.2/docutils/parsers/__init__.pyi +++ /dev/null @@ -1 +0,0 @@ -... diff --git a/stubs/3.2/docutils/parsers/rst/__init__.pyi b/stubs/3.2/docutils/parsers/rst/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/docutils/parsers/rst/nodes.pyi b/stubs/3.2/docutils/parsers/rst/nodes.pyi deleted file mode 100644 index eb1ae458f8ee..000000000000 --- a/stubs/3.2/docutils/parsers/rst/nodes.pyi +++ /dev/null @@ -1 +0,0 @@ -... diff --git a/stubs/3.2/docutils/parsers/rst/roles.pyi b/stubs/3.2/docutils/parsers/rst/roles.pyi deleted file mode 100644 index 7307e587befe..000000000000 --- a/stubs/3.2/docutils/parsers/rst/roles.pyi +++ /dev/null @@ -1,10 +0,0 @@ -import docutils.nodes -import docutils.parsers.rst.states - -from typing import Callable, Any, List, Dict, Tuple - -def register_local_role(name: str, - role_fn: Callable[[str, str, str, int, docutils.parsers.rst.states.Inliner, Dict, List], - Tuple[List[docutils.nodes.reference], List[docutils.nodes.reference]]] - ) -> None: - ... diff --git a/stubs/3.2/docutils/parsers/rst/states.pyi b/stubs/3.2/docutils/parsers/rst/states.pyi deleted file mode 100644 index e39d2bcf630e..000000000000 --- a/stubs/3.2/docutils/parsers/rst/states.pyi +++ /dev/null @@ -1,5 +0,0 @@ -import typing - -class Inliner: - def __init__(self) -> None: - ... diff --git a/stubs/3.2/email/__init__.pyi b/stubs/3.2/email/__init__.pyi deleted file mode 100644 index 1a7025fbe7ed..000000000000 --- a/stubs/3.2/email/__init__.pyi +++ /dev/null @@ -1,23 +0,0 @@ -# Stubs for email (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def message_from_string(s, *args, **kws): ... -def message_from_bytes(s, *args, **kws): ... -def message_from_file(fp, *args, **kws): ... -def message_from_binary_file(fp, *args, **kws): ... - -# Names in __all__ with no definition: -# base64mime -# charset -# encoders -# errors -# feedparser -# generator -# header -# iterators -# message -# mime -# parser -# quoprimime -# utils diff --git a/stubs/3.2/email/_header_value_parser.pyi b/stubs/3.2/email/_header_value_parser.pyi deleted file mode 100644 index 8d5afc629e1d..000000000000 --- a/stubs/3.2/email/_header_value_parser.pyi +++ /dev/null @@ -1,397 +0,0 @@ -# Stubs for email._header_value_parser (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -WSP = ... # type: Any -CFWS_LEADER = ... # type: Any -SPECIALS = ... # type: Any -ATOM_ENDS = ... # type: Any -DOT_ATOM_ENDS = ... # type: Any -PHRASE_ENDS = ... # type: Any -TSPECIALS = ... # type: Any -TOKEN_ENDS = ... # type: Any -ASPECIALS = ... # type: Any -ATTRIBUTE_ENDS = ... # type: Any -EXTENDED_ATTRIBUTE_ENDS = ... # type: Any - -def quote_string(value): ... - -class _Folded: - maxlen = ... # type: Any - policy = ... # type: Any - lastlen = ... # type: Any - stickyspace = ... # type: Any - firstline = ... # type: Any - done = ... # type: Any - current = ... # type: Any - def __init__(self, maxlen, policy): ... - def newline(self): ... - def finalize(self): ... - def append(self, stoken): ... - def append_if_fits(self, token, stoken=None): ... - -class TokenList(list): - token_type = ... # type: Any - defects = ... # type: Any - def __init__(self, *args, **kw): ... - @property - def value(self): ... - @property - def all_defects(self): ... - @property - def parts(self): ... - def startswith_fws(self): ... - def pop_leading_fws(self): ... - def pop_trailing_ws(self): ... - @property - def has_fws(self): ... - def has_leading_comment(self): ... - @property - def comments(self): ... - def fold(self, policy): ... - def as_encoded_word(self, charset): ... - def cte_encode(self, charset, policy): ... - def pprint(self, indent=''): ... - def ppstr(self, indent=''): ... - -class WhiteSpaceTokenList(TokenList): - @property - def value(self): ... - @property - def comments(self): ... - -class UnstructuredTokenList(TokenList): - token_type = ... # type: Any - def cte_encode(self, charset, policy): ... - -class Phrase(TokenList): - token_type = ... # type: Any - def cte_encode(self, charset, policy): ... - -class Word(TokenList): - token_type = ... # type: Any - -class CFWSList(WhiteSpaceTokenList): - token_type = ... # type: Any - def has_leading_comment(self): ... - -class Atom(TokenList): - token_type = ... # type: Any - -class Token(TokenList): - token_type = ... # type: Any - -class EncodedWord(TokenList): - token_type = ... # type: Any - cte = ... # type: Any - charset = ... # type: Any - lang = ... # type: Any - @property - def encoded(self): ... - -class QuotedString(TokenList): - token_type = ... # type: Any - @property - def content(self): ... - @property - def quoted_value(self): ... - @property - def stripped_value(self): ... - -class BareQuotedString(QuotedString): - token_type = ... # type: Any - @property - def value(self): ... - -class Comment(WhiteSpaceTokenList): - token_type = ... # type: Any - def quote(self, value): ... - @property - def content(self): ... - @property - def comments(self): ... - -class AddressList(TokenList): - token_type = ... # type: Any - @property - def addresses(self): ... - @property - def mailboxes(self): ... - @property - def all_mailboxes(self): ... - -class Address(TokenList): - token_type = ... # type: Any - @property - def display_name(self): ... - @property - def mailboxes(self): ... - @property - def all_mailboxes(self): ... - -class MailboxList(TokenList): - token_type = ... # type: Any - @property - def mailboxes(self): ... - @property - def all_mailboxes(self): ... - -class GroupList(TokenList): - token_type = ... # type: Any - @property - def mailboxes(self): ... - @property - def all_mailboxes(self): ... - -class Group(TokenList): - token_type = ... # type: Any - @property - def mailboxes(self): ... - @property - def all_mailboxes(self): ... - @property - def display_name(self): ... - -class NameAddr(TokenList): - token_type = ... # type: Any - @property - def display_name(self): ... - @property - def local_part(self): ... - @property - def domain(self): ... - @property - def route(self): ... - @property - def addr_spec(self): ... - -class AngleAddr(TokenList): - token_type = ... # type: Any - @property - def local_part(self): ... - @property - def domain(self): ... - @property - def route(self): ... - @property - def addr_spec(self): ... - -class ObsRoute(TokenList): - token_type = ... # type: Any - @property - def domains(self): ... - -class Mailbox(TokenList): - token_type = ... # type: Any - @property - def display_name(self): ... - @property - def local_part(self): ... - @property - def domain(self): ... - @property - def route(self): ... - @property - def addr_spec(self): ... - -class InvalidMailbox(TokenList): - token_type = ... # type: Any - @property - def display_name(self): ... - local_part = ... # type: Any - -class Domain(TokenList): - token_type = ... # type: Any - @property - def domain(self): ... - -class DotAtom(TokenList): - token_type = ... # type: Any - -class DotAtomText(TokenList): - token_type = ... # type: Any - -class AddrSpec(TokenList): - token_type = ... # type: Any - @property - def local_part(self): ... - @property - def domain(self): ... - @property - def value(self): ... - @property - def addr_spec(self): ... - -class ObsLocalPart(TokenList): - token_type = ... # type: Any - -class DisplayName(Phrase): - token_type = ... # type: Any - @property - def display_name(self): ... - @property - def value(self): ... - -class LocalPart(TokenList): - token_type = ... # type: Any - @property - def value(self): ... - @property - def local_part(self): ... - -class DomainLiteral(TokenList): - token_type = ... # type: Any - @property - def domain(self): ... - @property - def ip(self): ... - -class MIMEVersion(TokenList): - token_type = ... # type: Any - major = ... # type: Any - minor = ... # type: Any - -class Parameter(TokenList): - token_type = ... # type: Any - sectioned = ... # type: Any - extended = ... # type: Any - charset = ... # type: Any - @property - def section_number(self): ... - @property - def param_value(self): ... - -class InvalidParameter(Parameter): - token_type = ... # type: Any - -class Attribute(TokenList): - token_type = ... # type: Any - @property - def stripped_value(self): ... - -class Section(TokenList): - token_type = ... # type: Any - number = ... # type: Any - -class Value(TokenList): - token_type = ... # type: Any - @property - def stripped_value(self): ... - -class MimeParameters(TokenList): - token_type = ... # type: Any - @property - def params(self): ... - -class ParameterizedHeaderValue(TokenList): - @property - def params(self): ... - @property - def parts(self): ... - -class ContentType(ParameterizedHeaderValue): - token_type = ... # type: Any - maintype = ... # type: Any - subtype = ... # type: Any - -class ContentDisposition(ParameterizedHeaderValue): - token_type = ... # type: Any - content_disposition = ... # type: Any - -class ContentTransferEncoding(TokenList): - token_type = ... # type: Any - cte = ... # type: Any - -class HeaderLabel(TokenList): - token_type = ... # type: Any - -class Header(TokenList): - token_type = ... # type: Any - -class Terminal(str): - token_type = ... # type: Any - defects = ... # type: Any - def __new__(cls, value, token_type): ... - @property - def all_defects(self): ... - def cte_encode(self, charset, policy): ... - def pop_trailing_ws(self): ... - def pop_leading_fws(self): ... - @property - def comments(self): ... - def has_leading_comment(self): ... - def __getnewargs__(self): ... - -class WhiteSpaceTerminal(Terminal): - @property - def value(self): ... - def startswith_fws(self): ... - has_fws = ... # type: Any - -class ValueTerminal(Terminal): - @property - def value(self): ... - def startswith_fws(self): ... - has_fws = ... # type: Any - def as_encoded_word(self, charset): ... - -class EWWhiteSpaceTerminal(WhiteSpaceTerminal): - @property - def value(self): ... - @property - def encoded(self): ... - has_fws = ... # type: Any - -DOT = ... # type: Any -ListSeparator = ... # type: Any -RouteComponentMarker = ... # type: Any - -def get_fws(value): ... -def get_encoded_word(value): ... -def get_unstructured(value): ... -def get_qp_ctext(value): ... -def get_qcontent(value): ... -def get_atext(value): ... -def get_bare_quoted_string(value): ... -def get_comment(value): ... -def get_cfws(value): ... -def get_quoted_string(value): ... -def get_atom(value): ... -def get_dot_atom_text(value): ... -def get_dot_atom(value): ... -def get_word(value): ... -def get_phrase(value): ... -def get_local_part(value): ... -def get_obs_local_part(value): ... -def get_dtext(value): ... -def get_domain_literal(value): ... -def get_domain(value): ... -def get_addr_spec(value): ... -def get_obs_route(value): ... -def get_angle_addr(value): ... -def get_display_name(value): ... -def get_name_addr(value): ... -def get_mailbox(value): ... -def get_invalid_mailbox(value, endchars): ... -def get_mailbox_list(value): ... -def get_group_list(value): ... -def get_group(value): ... -def get_address(value): ... -def get_address_list(value): ... -def parse_mime_version(value): ... -def get_invalid_parameter(value): ... -def get_ttext(value): ... -def get_token(value): ... -def get_attrtext(value): ... -def get_attribute(value): ... -def get_extended_attrtext(value): ... -def get_extended_attribute(value): ... -def get_section(value): ... -def get_value(value): ... -def get_parameter(value): ... -def parse_mime_parameters(value): ... -def parse_content_type_header(value): ... -def parse_content_disposition_header(value): ... -def parse_content_transfer_encoding_header(value): ... diff --git a/stubs/3.2/email/_parseaddr.pyi b/stubs/3.2/email/_parseaddr.pyi deleted file mode 100644 index ef37b96b9af6..000000000000 --- a/stubs/3.2/email/_parseaddr.pyi +++ /dev/null @@ -1,44 +0,0 @@ -# Stubs for email._parseaddr (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -def parsedate_tz(data): ... -def parsedate(data): ... -def mktime_tz(data): ... -def quote(str): ... - -class AddrlistClass: - specials = ... # type: Any - pos = ... # type: Any - LWS = ... # type: Any - CR = ... # type: Any - FWS = ... # type: Any - atomends = ... # type: Any - phraseends = ... # type: Any - field = ... # type: Any - commentlist = ... # type: Any - def __init__(self, field): ... - def gotonext(self): ... - def getaddrlist(self): ... - def getaddress(self): ... - def getrouteaddr(self): ... - def getaddrspec(self): ... - def getdomain(self): ... - def getdelimited(self, beginchar, endchars, allowcomments=True): ... - def getquote(self): ... - def getcomment(self): ... - def getdomainliteral(self): ... - def getatom(self, atomends=None): ... - def getphraselist(self): ... - -class AddressList(AddrlistClass): - addresslist = ... # type: Any - def __init__(self, field): ... - def __len__(self): ... - def __add__(self, other): ... - def __iadd__(self, other): ... - def __sub__(self, other): ... - def __isub__(self, other): ... - def __getitem__(self, index): ... diff --git a/stubs/3.2/email/_policybase.pyi b/stubs/3.2/email/_policybase.pyi deleted file mode 100644 index 786b0ae05b46..000000000000 --- a/stubs/3.2/email/_policybase.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# Stubs for email._policybase (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class _PolicyBase: - def __init__(self, **kw): ... - def clone(self, **kw): ... - def __setattr__(self, name, value): ... - def __add__(self, other): ... - -class Policy(_PolicyBase): - raise_on_defect = ... # type: Any - linesep = ... # type: Any - cte_type = ... # type: Any - max_line_length = ... # type: Any - def handle_defect(self, obj, defect): ... - def register_defect(self, obj, defect): ... - def header_max_count(self, name): ... - def header_source_parse(self, sourcelines): ... - def header_store_parse(self, name, value): ... - def header_fetch_parse(self, name, value): ... - def fold(self, name, value): ... - def fold_binary(self, name, value): ... - -class Compat32(Policy): - def header_source_parse(self, sourcelines): ... - def header_store_parse(self, name, value): ... - def header_fetch_parse(self, name, value): ... - def fold(self, name, value): ... - def fold_binary(self, name, value): ... - -compat32 = ... # type: Any diff --git a/stubs/3.2/email/base64mime.pyi b/stubs/3.2/email/base64mime.pyi deleted file mode 100644 index 6643dac9fbb5..000000000000 --- a/stubs/3.2/email/base64mime.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for email.base64mime (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -def header_length(bytearray): ... -def header_encode(header_bytes, charset=''): ... -def body_encode(s, maxlinelen=76, eol=...): ... -def decode(string): ... - -body_decode = ... # type: Any -decodestring = ... # type: Any diff --git a/stubs/3.2/email/charset.pyi b/stubs/3.2/email/charset.pyi deleted file mode 100644 index 9e9d9d462891..000000000000 --- a/stubs/3.2/email/charset.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for email.charset (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -def add_charset(charset, header_enc=None, body_enc=None, output_charset=None): ... -def add_alias(alias, canonical): ... -def add_codec(charset, codecname): ... - -class Charset: - input_charset = ... # type: Any - header_encoding = ... # type: Any - body_encoding = ... # type: Any - output_charset = ... # type: Any - input_codec = ... # type: Any - output_codec = ... # type: Any - def __init__(self, input_charset=...): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def get_body_encoding(self): ... - def get_output_charset(self): ... - def header_encode(self, string): ... - def header_encode_lines(self, string, maxlengths): ... - def body_encode(self, string): ... diff --git a/stubs/3.2/email/contentmanager.pyi b/stubs/3.2/email/contentmanager.pyi deleted file mode 100644 index fdc871817c4d..000000000000 --- a/stubs/3.2/email/contentmanager.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for email.contentmanager (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class ContentManager: - get_handlers = ... # type: Any - set_handlers = ... # type: Any - def __init__(self): ... - def add_get_handler(self, key, handler): ... - def get_content(self, msg, *args, **kw): ... - def add_set_handler(self, typekey, handler): ... - def set_content(self, msg, obj, *args, **kw): ... - -raw_data_manager = ... # type: Any - -def get_text_content(msg, errors=''): ... -def get_non_text_content(msg): ... -def get_message_content(msg): ... -def get_and_fixup_unknown_message_content(msg): ... -def set_text_content(msg, string, subtype='', charset='', cte=None, disposition=None, - filename=None, cid=None, params=None, headers=None): ... -def set_message_content(msg, message, subtype='', cte=None, disposition=None, filename=None, - cid=None, params=None, headers=None): ... -def set_bytes_content(msg, data, maintype, subtype, cte='', disposition=None, filename=None, - cid=None, params=None, headers=None): ... diff --git a/stubs/3.2/email/encoders.pyi b/stubs/3.2/email/encoders.pyi deleted file mode 100644 index f9f111a9224d..000000000000 --- a/stubs/3.2/email/encoders.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.encoders (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def encode_base64(msg): ... -def encode_quopri(msg): ... -def encode_7or8bit(msg): ... -def encode_noop(msg): ... diff --git a/stubs/3.2/email/errors.pyi b/stubs/3.2/email/errors.pyi deleted file mode 100644 index 08bb800d777a..000000000000 --- a/stubs/3.2/email/errors.pyi +++ /dev/null @@ -1,44 +0,0 @@ -# Stubs for email.errors (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class MessageError(Exception): ... -class MessageParseError(MessageError): ... -class HeaderParseError(MessageParseError): ... -class BoundaryError(MessageParseError): ... -class MultipartConversionError(MessageError, TypeError): ... -class CharsetError(MessageError): ... - -class MessageDefect(ValueError): - line = ... # type: Any - def __init__(self, line=None): ... - -class NoBoundaryInMultipartDefect(MessageDefect): ... -class StartBoundaryNotFoundDefect(MessageDefect): ... -class CloseBoundaryNotFoundDefect(MessageDefect): ... -class FirstHeaderLineIsContinuationDefect(MessageDefect): ... -class MisplacedEnvelopeHeaderDefect(MessageDefect): ... -class MissingHeaderBodySeparatorDefect(MessageDefect): ... - -MalformedHeaderDefect = ... # type: Any - -class MultipartInvariantViolationDefect(MessageDefect): ... -class InvalidMultipartContentTransferEncodingDefect(MessageDefect): ... -class UndecodableBytesDefect(MessageDefect): ... -class InvalidBase64PaddingDefect(MessageDefect): ... -class InvalidBase64CharactersDefect(MessageDefect): ... - -class HeaderDefect(MessageDefect): - def __init__(self, *args, **kw): ... - -class InvalidHeaderDefect(HeaderDefect): ... -class HeaderMissingRequiredValue(HeaderDefect): ... - -class NonPrintableDefect(HeaderDefect): - non_printables = ... # type: Any - def __init__(self, non_printables): ... - -class ObsoleteHeaderDefect(HeaderDefect): ... -class NonASCIILocalPartDefect(HeaderDefect): ... diff --git a/stubs/3.2/email/feedparser.pyi b/stubs/3.2/email/feedparser.pyi deleted file mode 100644 index 8fe1a23f9052..000000000000 --- a/stubs/3.2/email/feedparser.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for email.feedparser (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class BufferedSubFile: - def __init__(self): ... - def push_eof_matcher(self, pred): ... - def pop_eof_matcher(self): ... - def close(self): ... - def readline(self): ... - def unreadline(self, line): ... - def push(self, data): ... - def pushlines(self, lines): ... - def __iter__(self): ... - def __next__(self): ... - -class FeedParser: - policy = ... # type: Any - def __init__(self, _factory=None, *, policy=...): ... - def feed(self, data): ... - def close(self): ... - -class BytesFeedParser(FeedParser): - def feed(self, data): ... diff --git a/stubs/3.2/email/generator.pyi b/stubs/3.2/email/generator.pyi deleted file mode 100644 index f776eb0c401d..000000000000 --- a/stubs/3.2/email/generator.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for email.generator (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Generator: - maxheaderlen = ... # type: Any - policy = ... # type: Any - def __init__(self, outfp, mangle_from_=True, maxheaderlen=None, *, policy=None): ... - def write(self, s): ... - def flatten(self, msg, unixfrom=False, linesep=None): ... - def clone(self, fp): ... - -class BytesGenerator(Generator): - def write(self, s): ... - -class DecodedGenerator(Generator): - def __init__(self, outfp, mangle_from_=True, maxheaderlen=78, fmt=None): ... diff --git a/stubs/3.2/email/header.pyi b/stubs/3.2/email/header.pyi deleted file mode 100644 index 54a3632d3e85..000000000000 --- a/stubs/3.2/email/header.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# Stubs for email.header (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def decode_header(header): ... -def make_header(decoded_seq, maxlinelen=None, header_name=None, continuation_ws=''): ... - -class Header: - def __init__(self, s=None, charset=None, maxlinelen=None, header_name=None, - continuation_ws='', errors=''): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def append(self, s, charset=None, errors=''): ... - def encode(self, splitchars='', maxlinelen=None, linesep=''): ... - -class _ValueFormatter: - def __init__(self, headerlen, maxlen, continuation_ws, splitchars): ... - def newline(self): ... - def add_transition(self): ... - def feed(self, fws, string, charset): ... - -class _Accumulator(list): - def __init__(self, initial_size=0): ... - def push(self, fws, string): ... - def pop_from(self, i=0): ... - def __len__(self): ... - def reset(self, startval=None): ... - def is_onlyws(self): ... - def part_count(self): ... diff --git a/stubs/3.2/email/headerregistry.pyi b/stubs/3.2/email/headerregistry.pyi deleted file mode 100644 index adb45425842e..000000000000 --- a/stubs/3.2/email/headerregistry.pyi +++ /dev/null @@ -1,133 +0,0 @@ -# Stubs for email.headerregistry (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Address: - def __init__(self, display_name='', username='', domain='', addr_spec=None): ... - @property - def display_name(self): ... - @property - def username(self): ... - @property - def domain(self): ... - @property - def addr_spec(self): ... - def __eq__(self, other): ... - -class Group: - def __init__(self, display_name=None, addresses=None): ... - @property - def display_name(self): ... - @property - def addresses(self): ... - def __eq__(self, other): ... - -class BaseHeader(str): - def __new__(cls, name, value): ... - def init(self, name, parse_tree, defects): ... - @property - def name(self): ... - @property - def defects(self): ... - def __reduce__(self): ... - def fold(self, policy): ... - -class UnstructuredHeader: - max_count = ... # type: Any - value_parser = ... # type: Any - @classmethod - def parse(cls, value, kwds): ... - -class UniqueUnstructuredHeader(UnstructuredHeader): - max_count = ... # type: Any - -class DateHeader: - max_count = ... # type: Any - value_parser = ... # type: Any - @classmethod - def parse(cls, value, kwds): ... - def init(self, *args, **kw): ... - @property - def datetime(self): ... - -class UniqueDateHeader(DateHeader): - max_count = ... # type: Any - -class AddressHeader: - max_count = ... # type: Any - @staticmethod - def value_parser(value): ... - @classmethod - def parse(cls, value, kwds): ... - def init(self, *args, **kw): ... - @property - def groups(self): ... - @property - def addresses(self): ... - -class UniqueAddressHeader(AddressHeader): - max_count = ... # type: Any - -class SingleAddressHeader(AddressHeader): - @property - def address(self): ... - -class UniqueSingleAddressHeader(SingleAddressHeader): - max_count = ... # type: Any - -class MIMEVersionHeader: - max_count = ... # type: Any - value_parser = ... # type: Any - @classmethod - def parse(cls, value, kwds): ... - def init(self, *args, **kw): ... - @property - def major(self): ... - @property - def minor(self): ... - @property - def version(self): ... - -class ParameterizedMIMEHeader: - max_count = ... # type: Any - @classmethod - def parse(cls, value, kwds): ... - def init(self, *args, **kw): ... - @property - def params(self): ... - -class ContentTypeHeader(ParameterizedMIMEHeader): - value_parser = ... # type: Any - def init(self, *args, **kw): ... - @property - def maintype(self): ... - @property - def subtype(self): ... - @property - def content_type(self): ... - -class ContentDispositionHeader(ParameterizedMIMEHeader): - value_parser = ... # type: Any - def init(self, *args, **kw): ... - @property - def content_disposition(self): ... - -class ContentTransferEncodingHeader: - max_count = ... # type: Any - value_parser = ... # type: Any - @classmethod - def parse(cls, value, kwds): ... - def init(self, *args, **kw): ... - @property - def cte(self): ... - -class HeaderRegistry: - registry = ... # type: Any - base_class = ... # type: Any - default_class = ... # type: Any - def __init__(self, base_class=..., default_class=..., use_default_map=True): ... - def map_to_type(self, name, cls): ... - def __getitem__(self, name): ... - def __call__(self, name, value): ... diff --git a/stubs/3.2/email/iterators.pyi b/stubs/3.2/email/iterators.pyi deleted file mode 100644 index 0dcdbb08b065..000000000000 --- a/stubs/3.2/email/iterators.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for email.iterators (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def walk(self): ... -def body_line_iterator(msg, decode=False): ... -def typed_subpart_iterator(msg, maintype='', subtype=None): ... diff --git a/stubs/3.2/email/message.pyi b/stubs/3.2/email/message.pyi deleted file mode 100644 index 45c3073c97fe..000000000000 --- a/stubs/3.2/email/message.pyi +++ /dev/null @@ -1,74 +0,0 @@ -# Stubs for email.message (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Message: - policy = ... # type: Any - preamble = ... # type: Any - defects = ... # type: Any - def __init__(self, policy=...): ... - def as_string(self, unixfrom=False, maxheaderlen=0, policy=None): ... - def __bytes__(self): ... - def as_bytes(self, unixfrom=False, policy=None): ... - def is_multipart(self): ... - def set_unixfrom(self, unixfrom): ... - def get_unixfrom(self): ... - def attach(self, payload): ... - def get_payload(self, i=None, decode=False): ... - def set_payload(self, payload, charset=None): ... - def set_charset(self, charset): ... - def get_charset(self): ... - def __len__(self): ... - def __getitem__(self, name): ... - def __setitem__(self, name, val): ... - def __delitem__(self, name): ... - def __contains__(self, name): ... - def __iter__(self): ... - def keys(self): ... - def values(self): ... - def items(self): ... - def get(self, name, failobj=None): ... - def set_raw(self, name, value): ... - def raw_items(self): ... - def get_all(self, name, failobj=None): ... - def add_header(self, _name, _value, **_params): ... - def replace_header(self, _name, _value): ... - def get_content_type(self): ... - def get_content_maintype(self): ... - def get_content_subtype(self): ... - def get_default_type(self): ... - def set_default_type(self, ctype): ... - def get_params(self, failobj=None, header='', unquote=True): ... - def get_param(self, param, failobj=None, header='', unquote=True): ... - def set_param(self, param, value, header='', requote=True, charset=None, language='', - replace=False): ... - def del_param(self, param, header='', requote=True): ... - def set_type(self, type, header='', requote=True): ... - def get_filename(self, failobj=None): ... - def get_boundary(self, failobj=None): ... - def set_boundary(self, boundary): ... - def get_content_charset(self, failobj=None): ... - def get_charsets(self, failobj=None): ... - -class MIMEPart(Message): - def __init__(self, policy=None): ... - @property - def is_attachment(self): ... - def get_body(self, preferencelist=...): ... - def iter_attachments(self): ... - def iter_parts(self): ... - def get_content(self, *args, *, content_manager=None, **kw): ... - def set_content(self, *args, *, content_manager=None, **kw): ... - def make_related(self, boundary=None): ... - def make_alternative(self, boundary=None): ... - def make_mixed(self, boundary=None): ... - def add_related(self, *args, **kw): ... - def add_alternative(self, *args, **kw): ... - def add_attachment(self, *args, **kw): ... - def clear(self): ... - def clear_content(self): ... - -class EmailMessage(MIMEPart): - def set_content(self, *args, **kw): ... diff --git a/stubs/3.2/email/mime/__init__.pyi b/stubs/3.2/email/mime/__init__.pyi deleted file mode 100644 index 6c1b10c02a8e..000000000000 --- a/stubs/3.2/email/mime/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for email.mime (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/3.2/email/mime/application.pyi b/stubs/3.2/email/mime/application.pyi deleted file mode 100644 index 2e95616e57b0..000000000000 --- a/stubs/3.2/email/mime/application.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.application (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEApplication(MIMENonMultipart): - def __init__(self, _data, _subtype='', _encoder=..., **_params): ... diff --git a/stubs/3.2/email/mime/audio.pyi b/stubs/3.2/email/mime/audio.pyi deleted file mode 100644 index 7a4648e91954..000000000000 --- a/stubs/3.2/email/mime/audio.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.audio (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEAudio(MIMENonMultipart): - def __init__(self, _audiodata, _subtype=None, _encoder=..., **_params): ... diff --git a/stubs/3.2/email/mime/base.pyi b/stubs/3.2/email/mime/base.pyi deleted file mode 100644 index 4cbef4fe79d9..000000000000 --- a/stubs/3.2/email/mime/base.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.base (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email import message - -class MIMEBase(message.Message): - def __init__(self, _maintype, _subtype, **_params): ... diff --git a/stubs/3.2/email/mime/image.pyi b/stubs/3.2/email/mime/image.pyi deleted file mode 100644 index 5afd05502512..000000000000 --- a/stubs/3.2/email/mime/image.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.image (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEImage(MIMENonMultipart): - def __init__(self, _imagedata, _subtype=None, _encoder=..., **_params): ... diff --git a/stubs/3.2/email/mime/message.pyi b/stubs/3.2/email/mime/message.pyi deleted file mode 100644 index 67ab9346e5e9..000000000000 --- a/stubs/3.2/email/mime/message.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.message (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEMessage(MIMENonMultipart): - def __init__(self, _msg, _subtype=''): ... diff --git a/stubs/3.2/email/mime/multipart.pyi b/stubs/3.2/email/mime/multipart.pyi deleted file mode 100644 index 943da614f294..000000000000 --- a/stubs/3.2/email/mime/multipart.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.multipart (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.base import MIMEBase - -class MIMEMultipart(MIMEBase): - def __init__(self, _subtype='', boundary=None, _subparts=None, **_params): ... diff --git a/stubs/3.2/email/mime/nonmultipart.pyi b/stubs/3.2/email/mime/nonmultipart.pyi deleted file mode 100644 index 4e17cf93783e..000000000000 --- a/stubs/3.2/email/mime/nonmultipart.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.nonmultipart (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.base import MIMEBase - -class MIMENonMultipart(MIMEBase): - def attach(self, payload): ... diff --git a/stubs/3.2/email/mime/text.pyi b/stubs/3.2/email/mime/text.pyi deleted file mode 100644 index 8263c13ee127..000000000000 --- a/stubs/3.2/email/mime/text.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for email.mime.text (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from email.mime.nonmultipart import MIMENonMultipart - -class MIMEText(MIMENonMultipart): - def __init__(self, _text, _subtype='', _charset=None): ... diff --git a/stubs/3.2/email/parser.pyi b/stubs/3.2/email/parser.pyi deleted file mode 100644 index 9cca737269d8..000000000000 --- a/stubs/3.2/email/parser.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# Stubs for email.parser (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import email.feedparser - -FeedParser = email.feedparser.FeedParser -BytesFeedParser = email.feedparser.BytesFeedParser - -class Parser: - policy = ... # type: Any - def __init__(self, _class=None, *, policy=...): ... - def parse(self, fp, headersonly=False): ... - def parsestr(self, text, headersonly=False): ... - -class HeaderParser(Parser): - def parse(self, fp, headersonly=True): ... - def parsestr(self, text, headersonly=True): ... - -class BytesParser: - parser = ... # type: Any - def __init__(self, *args, **kw): ... - def parse(self, fp, headersonly=False): ... - def parsebytes(self, text, headersonly=False): ... - -class BytesHeaderParser(BytesParser): - def parse(self, fp, headersonly=True): ... - def parsebytes(self, text, headersonly=True): ... diff --git a/stubs/3.2/email/policy.pyi b/stubs/3.2/email/policy.pyi deleted file mode 100644 index 6484e2c1bc98..000000000000 --- a/stubs/3.2/email/policy.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for email.policy (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import email._policybase - -Policy = email._policybase.Policy -Compat32 = email._policybase.Compat32 - -class EmailPolicy(Policy): - refold_source = ... # type: Any - header_factory = ... # type: Any - content_manager = ... # type: Any - def __init__(self, **kw): ... - def header_max_count(self, name): ... - def header_source_parse(self, sourcelines): ... - def header_store_parse(self, name, value): ... - def header_fetch_parse(self, name, value): ... - def fold(self, name, value): ... - def fold_binary(self, name, value): ... - -default = ... # type: Any -strict = ... # type: Any -SMTP = ... # type: Any -HTTP = ... # type: Any diff --git a/stubs/3.2/email/quoprimime.pyi b/stubs/3.2/email/quoprimime.pyi deleted file mode 100644 index 517ed741139e..000000000000 --- a/stubs/3.2/email/quoprimime.pyi +++ /dev/null @@ -1,18 +0,0 @@ -# Stubs for email.quoprimime (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -def header_length(bytearray): ... -def body_length(bytearray): ... -def unquote(s): ... -def quote(c): ... -def header_encode(header_bytes, charset=''): ... -def body_encode(body, maxlinelen=76, eol=...): ... -def decode(encoded, eol=...): ... - -body_decode = ... # type: Any -decodestring = ... # type: Any - -def header_decode(s): ... diff --git a/stubs/3.2/email/utils.pyi b/stubs/3.2/email/utils.pyi deleted file mode 100644 index 0fa5032e96e3..000000000000 --- a/stubs/3.2/email/utils.pyi +++ /dev/null @@ -1,22 +0,0 @@ -# Stubs for email.utils (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -import email._parseaddr - -mktime_tz = email._parseaddr.mktime_tz -parsedate = email._parseaddr.parsedate -parsedate_tz = email._parseaddr.parsedate_tz - -def formataddr(pair, charset=''): ... -def getaddresses(fieldvalues): ... -def formatdate(timeval=None, localtime=False, usegmt=False): ... -def format_datetime(dt, usegmt=False): ... -def make_msgid(idstring=None, domain=None): ... -def parsedate_to_datetime(data): ... -def parseaddr(addr): ... -def unquote(str): ... -def decode_rfc2231(s): ... -def encode_rfc2231(s, charset=None, language=None): ... -def decode_params(params): ... -def collapse_rfc2231_value(value, errors='', fallback_charset=''): ... diff --git a/stubs/3.2/encodings.pyi b/stubs/3.2/encodings.pyi deleted file mode 100644 index 2ae6c0a9351d..000000000000 --- a/stubs/3.2/encodings.pyi +++ /dev/null @@ -1,6 +0,0 @@ -import codecs - -import typing - -def search_function(encoding: str) -> codecs.CodecInfo: - ... diff --git a/stubs/3.2/errno.pyi b/stubs/3.2/errno.pyi deleted file mode 100644 index e1f2ee311e37..000000000000 --- a/stubs/3.2/errno.pyi +++ /dev/null @@ -1,132 +0,0 @@ -# Stubs for errno - -# Based on http://docs.python.org/3.2/library/errno.html - -from typing import Dict - -errorcode = ... # type: Dict[int, str] - -# TODO some of the names below are platform specific - -EPERM = 0 -ENOENT = 0 -ESRCH = 0 -EINTR = 0 -EIO = 0 -ENXIO = 0 -E2BIG = 0 -ENOEXEC = 0 -EBADF = 0 -ECHILD = 0 -EAGAIN = 0 -ENOMEM = 0 -EACCES = 0 -EFAULT = 0 -ENOTBLK = 0 -EBUSY = 0 -EEXIST = 0 -EXDEV = 0 -ENODEV = 0 -ENOTDIR = 0 -EISDIR = 0 -EINVAL = 0 -ENFILE = 0 -EMFILE = 0 -ENOTTY = 0 -ETXTBSY = 0 -EFBIG = 0 -ENOSPC = 0 -ESPIPE = 0 -EROFS = 0 -EMLINK = 0 -EPIPE = 0 -EDOM = 0 -ERANGE = 0 -EDEADLK = 0 -ENAMETOOLONG = 0 -ENOLCK = 0 -ENOSYS = 0 -ENOTEMPTY = 0 -ELOOP = 0 -EWOULDBLOCK = 0 -ENOMSG = 0 -EIDRM = 0 -ECHRNG = 0 -EL2NSYNC = 0 -EL3HLT = 0 -EL3RST = 0 -ELNRNG = 0 -EUNATCH = 0 -ENOCSI = 0 -EL2HLT = 0 -EBADE = 0 -EBADR = 0 -EXFULL = 0 -ENOANO = 0 -EBADRQC = 0 -EBADSLT = 0 -EDEADLOCK = 0 -EBFONT = 0 -ENOSTR = 0 -ENODATA = 0 -ETIME = 0 -ENOSR = 0 -ENONET = 0 -ENOPKG = 0 -EREMOTE = 0 -ENOLINK = 0 -EADV = 0 -ESRMNT = 0 -ECOMM = 0 -EPROTO = 0 -EMULTIHOP = 0 -EDOTDOT = 0 -EBADMSG = 0 -EOVERFLOW = 0 -ENOTUNIQ = 0 -EBADFD = 0 -EREMCHG = 0 -ELIBACC = 0 -ELIBBAD = 0 -ELIBSCN = 0 -ELIBMAX = 0 -ELIBEXEC = 0 -EILSEQ = 0 -ERESTART = 0 -ESTRPIPE = 0 -EUSERS = 0 -ENOTSOCK = 0 -EDESTADDRREQ = 0 -EMSGSIZE = 0 -EPROTOTYPE = 0 -ENOPROTOOPT = 0 -EPROTONOSUPPORT = 0 -ESOCKTNOSUPPORT = 0 -EOPNOTSUPP = 0 -EPFNOSUPPORT = 0 -EAFNOSUPPORT = 0 -EADDRINUSE = 0 -EADDRNOTAVAIL = 0 -ENETDOWN = 0 -ENETUNREACH = 0 -ENETRESET = 0 -ECONNABORTED = 0 -ECONNRESET = 0 -ENOBUFS = 0 -EISCONN = 0 -ENOTCONN = 0 -ESHUTDOWN = 0 -ETOOMANYREFS = 0 -ETIMEDOUT = 0 -ECONNREFUSED = 0 -EHOSTDOWN = 0 -EHOSTUNREACH = 0 -EALREADY = 0 -EINPROGRESS = 0 -ESTALE = 0 -EUCLEAN = 0 -ENOTNAM = 0 -ENAVAIL = 0 -EISNAM = 0 -EREMOTEIO = 0 -EDQUOT = 0 diff --git a/stubs/3.2/fcntl.pyi b/stubs/3.2/fcntl.pyi deleted file mode 100644 index 31f5be366d71..000000000000 --- a/stubs/3.2/fcntl.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for fcntl - -# NOTE: These are incomplete! - -import typing - -FD_CLOEXEC = 0 -F_GETFD = 0 -F_SETFD = 0 - -def fcntl(fd: int, op: int, arg: int = 0) -> int: ... diff --git a/stubs/3.2/fnmatch.pyi b/stubs/3.2/fnmatch.pyi deleted file mode 100644 index 4f99b4aafd6d..000000000000 --- a/stubs/3.2/fnmatch.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for fnmatch - -# Based on http://docs.python.org/3.2/library/fnmatch.html and -# python-lib/fnmatch.py - -from typing import Iterable, List, AnyStr - -def fnmatch(name: AnyStr, pat: AnyStr) -> bool: ... -def fnmatchcase(name: AnyStr, pat: AnyStr) -> bool: ... -def filter(names: Iterable[AnyStr], pat: AnyStr) -> List[AnyStr]: ... -def translate(pat: str) -> str: ... diff --git a/stubs/3.2/functools.pyi b/stubs/3.2/functools.pyi deleted file mode 100644 index 174679e995d5..000000000000 --- a/stubs/3.2/functools.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for functools - -# NOTE: These are incomplete! - -from typing import Callable, Any, Optional - -# TODO implement as class; more precise typing -# TODO cache_info and __wrapped__ attributes -def lru_cache(maxsize: Optional[int] = 100) -> Callable[[Any], Any]: ... - -# TODO more precise typing? -def wraps(func: Any) -> Any: ... diff --git a/stubs/3.2/gc.pyi b/stubs/3.2/gc.pyi deleted file mode 100644 index a2cda3ed9e65..000000000000 --- a/stubs/3.2/gc.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for gc - -# NOTE: These are incomplete! - -import typing - -def collect(generation: int = -1) -> int: ... -def disable() -> None: ... -def enable() -> None: ... -def isenabled() -> bool: ... diff --git a/stubs/3.2/getopt.pyi b/stubs/3.2/getopt.pyi deleted file mode 100644 index 6b37e79b7de4..000000000000 --- a/stubs/3.2/getopt.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for getopt - -# Based on http://docs.python.org/3.2/library/getopt.html - -from typing import List, Tuple - -def getopt(args: List[str], shortopts: str, - longopts: List[str]) -> Tuple[List[Tuple[str, str]], - List[str]]: ... - -def gnu_getopt(args: List[str], shortopts: str, - longopts: List[str]) -> Tuple[List[Tuple[str, str]], - List[str]]: ... - -class GetoptError(Exception): - msg = '' - opt = '' - -error = GetoptError diff --git a/stubs/3.2/getpass.pyi b/stubs/3.2/getpass.pyi deleted file mode 100644 index 5938d615240d..000000000000 --- a/stubs/3.2/getpass.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for getpass - -# NOTE: These are incomplete! - -def getuser() -> str: ... diff --git a/stubs/3.2/gettext.pyi b/stubs/3.2/gettext.pyi deleted file mode 100644 index b9bff623ce97..000000000000 --- a/stubs/3.2/gettext.pyi +++ /dev/null @@ -1,39 +0,0 @@ -# Stubs for gettext (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class NullTranslations: - def __init__(self, fp=None): ... - def add_fallback(self, fallback): ... - def gettext(self, message): ... - def lgettext(self, message): ... - def ngettext(self, msgid1, msgid2, n): ... - def lngettext(self, msgid1, msgid2, n): ... - def info(self): ... - def charset(self): ... - def output_charset(self): ... - def set_output_charset(self, charset): ... - def install(self, names=None): ... - -class GNUTranslations(NullTranslations): - LE_MAGIC = ... # type: Any - BE_MAGIC = ... # type: Any - def lgettext(self, message): ... - def lngettext(self, msgid1, msgid2, n): ... - def gettext(self, message): ... - def ngettext(self, msgid1, msgid2, n): ... - -def find(domain, localedir=None, languages=None, all=False): ... -def translation(domain, localedir=None, languages=None, class_=None, fallback=False, - codeset=None): ... -def install(domain, localedir=None, codeset=None, names=None): ... -def textdomain(domain=None): ... -def bindtextdomain(domain, localedir=None): ... -def dgettext(domain, message): ... -def dngettext(domain, msgid1, msgid2, n): ... -def gettext(message): ... -def ngettext(msgid1, msgid2, n): ... - -Catalog = ... # type: Any diff --git a/stubs/3.2/glob.pyi b/stubs/3.2/glob.pyi deleted file mode 100644 index 71ab3661bab9..000000000000 --- a/stubs/3.2/glob.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for glob - -# Based on http://docs.python.org/3.2/library/glob.html - -from typing import List, Iterator, AnyStr - -def glob(pathname: AnyStr) -> List[AnyStr]: ... -def iglob(pathname: AnyStr) -> Iterator[AnyStr]: ... diff --git a/stubs/3.2/grp.pyi b/stubs/3.2/grp.pyi deleted file mode 100644 index 2630f55172f2..000000000000 --- a/stubs/3.2/grp.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import List - -# TODO group database entry object type - -class struct_group: - gr_name = '' - gr_passwd = '' - gr_gid = 0 - gr_mem = ... # type: List[str] - -def getgrgid(gid: int) -> struct_group: ... -def getgrnam(name: str) -> struct_group: ... -def getgrall() -> List[struct_group]: ... diff --git a/stubs/3.2/hashlib.pyi b/stubs/3.2/hashlib.pyi deleted file mode 100644 index 039407d3d185..000000000000 --- a/stubs/3.2/hashlib.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for hashlib - -# NOTE: These are incomplete! - -from abc import abstractmethod, ABCMeta -import typing - -class Hash(metaclass=ABCMeta): - @abstractmethod - def update(self, arg: bytes) -> None: ... - @abstractmethod - def digest(self) -> bytes: ... - @abstractmethod - def hexdigest(self) -> str: ... - @abstractmethod - def copy(self) -> 'Hash': ... - -def md5(arg: bytes = None) -> Hash: ... -def sha1(arg: bytes = None) -> Hash: ... -def sha224(arg: bytes = None) -> Hash: ... -def sha256(arg: bytes = None) -> Hash: ... -def sha384(arg: bytes = None) -> Hash: ... -def sha512(arg: bytes = None) -> Hash: ... - -def new(name: str, data: bytes = None) -> Hash: ... diff --git a/stubs/3.2/heapq.pyi b/stubs/3.2/heapq.pyi deleted file mode 100644 index 526bb4f1c336..000000000000 --- a/stubs/3.2/heapq.pyi +++ /dev/null @@ -1,18 +0,0 @@ -# Stubs for heapq - -# Based on http://docs.python.org/3.2/library/heapq.html - -from typing import TypeVar, List, Iterable, Any, Callable - -_T = TypeVar('_T') - -def heappush(heap: List[_T], item: _T) -> None: ... -def heappop(heap: List[_T]) -> _T: ... -def heappushpop(heap: List[_T], item: _T) -> _T: ... -def heapify(x: List[_T]) -> None: ... -def heapreplace(heap: List[_T], item: _T) -> _T: ... -def merge(*iterables: Iterable[_T]) -> Iterable[_T]: ... -def nlargest(n: int, iterable: Iterable[_T], - key: Callable[[_T], Any] = None) -> List[_T]: ... -def nsmallest(n: int, iterable: Iterable[_T], - key: Callable[[_T], Any] = None) -> List[_T]: ... diff --git a/stubs/3.2/http/__init__.pyi b/stubs/3.2/http/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/http/client.pyi b/stubs/3.2/http/client.pyi deleted file mode 100644 index 173cd8f2647f..000000000000 --- a/stubs/3.2/http/client.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# Stubs for http.client (Python 3.4) - -from typing import Any, Dict -import email.message -import io - -responses = ... # type: Dict[int, str] - -class HTTPMessage(email.message.Message): - def getallmatchingheaders(self, name): ... - -class HTTPResponse(io.RawIOBase): - fp = ... # type: Any - debuglevel = ... # type: Any - headers = ... # type: Any - version = ... # type: Any - status = ... # type: Any - reason = ... # type: Any - chunked = ... # type: Any - chunk_left = ... # type: Any - length = ... # type: Any - will_close = ... # type: Any - def __init__(self, sock, debuglevel=0, method=None, url=None): ... - code = ... # type: Any - def begin(self): ... - def close(self): ... - def flush(self): ... - def readable(self): ... - def isclosed(self): ... - def read(self, amt=None): ... - def readinto(self, b): ... - def fileno(self): ... - def getheader(self, name, default=None): ... - def getheaders(self): ... - def __iter__(self): ... - def info(self): ... - def geturl(self): ... - def getcode(self): ... - -class HTTPConnection: - response_class = ... # type: Any - default_port = ... # type: Any - auto_open = ... # type: Any - debuglevel = ... # type: Any - mss = ... # type: Any - timeout = ... # type: Any - source_address = ... # type: Any - sock = ... # type: Any - def __init__(self, host, port=None, timeout=..., source_address=None): ... - def set_tunnel(self, host, port=None, headers=None): ... - def set_debuglevel(self, level): ... - def connect(self): ... - def close(self): ... - def send(self, data): ... - def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): ... - def putheader(self, header, *values): ... - def endheaders(self, message_body=None): ... - def request(self, method, url, body=None, headers=...): ... - def getresponse(self): ... - -class HTTPSConnection(HTTPConnection): - default_port = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - def __init__(self, host, port=None, key_file=None, cert_file=None, timeout=..., - source_address=None, *, context=None, check_hostname=None): ... - sock = ... # type: Any - def connect(self): ... - -class HTTPException(Exception): ... -class NotConnected(HTTPException): ... -class InvalidURL(HTTPException): ... - -class UnknownProtocol(HTTPException): - args = ... # type: Any - version = ... # type: Any - def __init__(self, version): ... - -class UnknownTransferEncoding(HTTPException): ... -class UnimplementedFileMode(HTTPException): ... - -class IncompleteRead(HTTPException): - args = ... # type: Any - partial = ... # type: Any - expected = ... # type: Any - def __init__(self, partial, expected=None): ... - -class ImproperConnectionState(HTTPException): ... -class CannotSendRequest(ImproperConnectionState): ... -class CannotSendHeader(ImproperConnectionState): ... -class ResponseNotReady(ImproperConnectionState): ... - -class BadStatusLine(HTTPException): - args = ... # type: Any - line = ... # type: Any - def __init__(self, line): ... - -class LineTooLong(HTTPException): - def __init__(self, line_type): ... - -error = HTTPException diff --git a/stubs/3.2/http/cookiejar.pyi b/stubs/3.2/http/cookiejar.pyi deleted file mode 100644 index ca7c14e3f2b4..000000000000 --- a/stubs/3.2/http/cookiejar.pyi +++ /dev/null @@ -1,121 +0,0 @@ -# Stubs for http.cookiejar (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Cookie: - version = ... # type: Any - name = ... # type: Any - value = ... # type: Any - port = ... # type: Any - port_specified = ... # type: Any - domain = ... # type: Any - domain_specified = ... # type: Any - domain_initial_dot = ... # type: Any - path = ... # type: Any - path_specified = ... # type: Any - secure = ... # type: Any - expires = ... # type: Any - discard = ... # type: Any - comment = ... # type: Any - comment_url = ... # type: Any - rfc2109 = ... # type: Any - def __init__(self, version, name, value, port, port_specified, domain, domain_specified, - domain_initial_dot, path, path_specified, secure, expires, discard, comment, - comment_url, rest, rfc2109=False): ... - def has_nonstandard_attr(self, name): ... - def get_nonstandard_attr(self, name, default=None): ... - def set_nonstandard_attr(self, name, value): ... - def is_expired(self, now=None): ... - -class CookiePolicy: - def set_ok(self, cookie, request): ... - def return_ok(self, cookie, request): ... - def domain_return_ok(self, domain, request): ... - def path_return_ok(self, path, request): ... - -class DefaultCookiePolicy(CookiePolicy): - DomainStrictNoDots = ... # type: Any - DomainStrictNonDomain = ... # type: Any - DomainRFC2965Match = ... # type: Any - DomainLiberal = ... # type: Any - DomainStrict = ... # type: Any - netscape = ... # type: Any - rfc2965 = ... # type: Any - rfc2109_as_netscape = ... # type: Any - hide_cookie2 = ... # type: Any - strict_domain = ... # type: Any - strict_rfc2965_unverifiable = ... # type: Any - strict_ns_unverifiable = ... # type: Any - strict_ns_domain = ... # type: Any - strict_ns_set_initial_dollar = ... # type: Any - strict_ns_set_path = ... # type: Any - def __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, - rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, - strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, - strict_ns_domain=..., strict_ns_set_initial_dollar=False, - strict_ns_set_path=False): ... - def blocked_domains(self): ... - def set_blocked_domains(self, blocked_domains): ... - def is_blocked(self, domain): ... - def allowed_domains(self): ... - def set_allowed_domains(self, allowed_domains): ... - def is_not_allowed(self, domain): ... - def set_ok(self, cookie, request): ... - def set_ok_version(self, cookie, request): ... - def set_ok_verifiability(self, cookie, request): ... - def set_ok_name(self, cookie, request): ... - def set_ok_path(self, cookie, request): ... - def set_ok_domain(self, cookie, request): ... - def set_ok_port(self, cookie, request): ... - def return_ok(self, cookie, request): ... - def return_ok_version(self, cookie, request): ... - def return_ok_verifiability(self, cookie, request): ... - def return_ok_secure(self, cookie, request): ... - def return_ok_expires(self, cookie, request): ... - def return_ok_port(self, cookie, request): ... - def return_ok_domain(self, cookie, request): ... - def domain_return_ok(self, domain, request): ... - def path_return_ok(self, path, request): ... - -class Absent: ... - -class CookieJar: - non_word_re = ... # type: Any - quote_re = ... # type: Any - strict_domain_re = ... # type: Any - domain_re = ... # type: Any - dots_re = ... # type: Any - magic_re = ... # type: Any - def __init__(self, policy=None): ... - def set_policy(self, policy): ... - def add_cookie_header(self, request): ... - def make_cookies(self, response, request): ... - def set_cookie_if_ok(self, cookie, request): ... - def set_cookie(self, cookie): ... - def extract_cookies(self, response, request): ... - def clear(self, domain=None, path=None, name=None): ... - def clear_session_cookies(self): ... - def clear_expired_cookies(self): ... - def __iter__(self): ... - def __len__(self): ... - -class LoadError(OSError): ... - -class FileCookieJar(CookieJar): - filename = ... # type: Any - delayload = ... # type: Any - def __init__(self, filename=None, delayload=False, policy=None): ... - def save(self, filename=None, ignore_discard=False, ignore_expires=False): ... - def load(self, filename=None, ignore_discard=False, ignore_expires=False): ... - def revert(self, filename=None, ignore_discard=False, ignore_expires=False): ... - -class LWPCookieJar(FileCookieJar): - def as_lwp_str(self, ignore_discard=True, ignore_expires=True): ... - def save(self, filename=None, ignore_discard=False, ignore_expires=False): ... - -class MozillaCookieJar(FileCookieJar): - magic_re = ... # type: Any - header = ... # type: Any - def save(self, filename=None, ignore_discard=False, ignore_expires=False): ... diff --git a/stubs/3.2/imp.pyi b/stubs/3.2/imp.pyi deleted file mode 100644 index 76a6fefea03e..000000000000 --- a/stubs/3.2/imp.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for imp - -# NOTE: These are incomplete! - -from typing import TypeVar - -_T = TypeVar('_T') - -def cache_from_source(path: str, debug_override: bool = None) -> str: ... -def reload(module: _T) -> _T: ... # TODO imprecise signature diff --git a/stubs/3.2/importlib.pyi b/stubs/3.2/importlib.pyi deleted file mode 100644 index 586d2c379ae6..000000000000 --- a/stubs/3.2/importlib.pyi +++ /dev/null @@ -1,9 +0,0 @@ -# Stubs for importlib - -# NOTE: These are incomplete! - -from typing import Any - -# TODO more precise type? -def import_module(name: str, package: str = None) -> Any: ... -def invalidate_caches() -> None: ... diff --git a/stubs/3.2/inspect.pyi b/stubs/3.2/inspect.pyi deleted file mode 100644 index d4fae4b71d6b..000000000000 --- a/stubs/3.2/inspect.pyi +++ /dev/null @@ -1,31 +0,0 @@ -# Stubs for inspect - -from typing import Any, Tuple, List, Callable - -_object = object - -def getmembers(obj: object, predicate: Callable[[Any], bool]) -> List[Tuple[str, object]]: ... - -def isclass(obj: object) -> bool: ... - -# namedtuple('Attribute', 'name kind defining_class object') -class Attribute(tuple): - name = ... # type: str - kind = ... # type: str - defining_class = ... # type: type - object = ... # type: _object - -def classify_class_attrs(cls: type) -> List[Attribute]: ... - -def cleandoc(doc: str) -> str: ... - -def getsourcelines(obj: object) -> Tuple[List[str], int]: ... - -# namedtuple('ArgSpec', 'args varargs keywords defaults') -class ArgSpec(tuple): - args = ... # type: List[str] - varargs = ... # type: str - keywords = ... # type: str - defaults = ... # type: tuple - -def getargspec(func: object) -> ArgSpec: ... diff --git a/stubs/3.2/io.pyi b/stubs/3.2/io.pyi deleted file mode 100644 index 4865690f6939..000000000000 --- a/stubs/3.2/io.pyi +++ /dev/null @@ -1,150 +0,0 @@ -# Stubs for io - -# Based on http://docs.python.org/3.2/library/io.html - -from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any -import builtins -import codecs -import _io - -DEFAULT_BUFFER_SIZE = 0 # type: int -SEEK_SET = ... # type: int -SEEK_CUR = ... # type: int -SEEK_END = ... # type: int - -open = builtins.open - -class BlockingIOError(OSError): ... -class UnsupportedOperation(ValueError, OSError): ... - -class IncrementalNewlineDecoder(codecs.IncrementalDecoder): - newlines = ... # type: Any - def __init__(self, *args, **kwargs): ... - def decode(self, input, final=False): ... - def getstate(self): ... - def reset(self): ... - def setstate(self, state): ... - -class IOBase(_io._IOBase): ... -class RawIOBase(_io._RawIOBase, IOBase): ... -class BufferedIOBase(_io._BufferedIOBase, IOBase): ... -class TextIOBase(_io._TextIOBase, IOBase): ... - -class FileIO(_io._RawIOBase): - closefd = ... # type: Any - mode = ... # type: Any - def __init__(self, name, mode=..., closefd=..., opener=...): ... - def readinto(self, b): ... - def write(self, b): ... - -class BufferedReader(_io._BufferedIOBase): - mode = ... # type: Any - name = ... # type: Any - raw = ... # type: Any - def __init__(self, raw, buffer_size=...): ... - def peek(self, size: int = -1): ... - -class BufferedWriter(_io._BufferedIOBase): - mode = ... # type: Any - name = ... # type: Any - raw = ... # type: Any - def __init__(self, raw, buffer_size=...): ... - -class BufferedRWPair(_io._BufferedIOBase): - def __init__(self, reader, writer, buffer_size=...): ... - def peek(self, size: int = -1): ... - -class BufferedRandom(_io._BufferedIOBase): - mode = ... # type: Any - name = ... # type: Any - raw = ... # type: Any - def __init__(self, raw, buffer_size=...): ... - def peek(self, size: int = -1): ... - -class BytesIO(BinaryIO): - def __init__(self, initial_bytes: bytes = b'') -> None: ... - # TODO getbuffer - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> bytes: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> bytes: ... - def readlines(self, hint: int = -1) -> List[bytes]: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - @overload - def write(self, s: bytes) -> int: ... - @overload - def write(self, s: bytearray) -> int: ... - def writelines(self, lines: Iterable[bytes]) -> None: ... - def getvalue(self) -> bytes: ... - def read1(self) -> str: ... - - def __iter__(self) -> Iterator[bytes]: ... - def __enter__(self) -> 'BytesIO': ... - def __exit__(self, type, value, traceback) -> bool: ... - -class StringIO(TextIO): - def __init__(self, initial_value: str = '', - newline: str = None) -> None: ... - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> str: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> str: ... - def readlines(self, hint: int = -1) -> List[str]: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def write(self, s: str) -> int: ... - def writelines(self, lines: Iterable[str]) -> None: ... - def getvalue(self) -> str: ... - - def __iter__(self) -> Iterator[str]: ... - def __enter__(self) -> 'StringIO': ... - def __exit__(self, type, value, traceback) -> bool: ... - -class TextIOWrapper(TextIO): - # TODO: This is actually a base class of _io._TextIOBase. - # write_through is undocumented but used by subprocess - def __init__(self, buffer: IO[bytes], encoding: str = None, - errors: str = None, newline: str = None, - line_buffering: bool = False, - write_through: bool = True) -> None: ... - # TODO see comments in BinaryIO for missing functionality - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = -1) -> str: ... - def readable(self) -> bool: ... - def readline(self, limit: int = -1) -> str: ... - def readlines(self, hint: int = -1) -> List[str]: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int = None) -> int: ... - def writable(self) -> bool: ... - def write(self, s: str) -> int: ... - def writelines(self, lines: Iterable[str]) -> None: ... - - def __iter__(self) -> Iterator[str]: ... - def __enter__(self) -> StringIO: ... - def __exit__(self, type, value, traceback) -> bool: ... diff --git a/stubs/3.2/itertools.pyi b/stubs/3.2/itertools.pyi deleted file mode 100644 index 870c92918790..000000000000 --- a/stubs/3.2/itertools.pyi +++ /dev/null @@ -1,57 +0,0 @@ -# Stubs for itertools - -# Based on http://docs.python.org/3.2/library/itertools.html - -from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple, - Union, Sequence) - -_T = TypeVar('_T') -_S = TypeVar('_S') - -def count(start: int = 0, - step: int = 1) -> Iterator[int]: ... # more general types? -def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ... - -@overload -def repeat(object: _T) -> Iterator[_T]: ... -@overload -def repeat(object: _T, times: int) -> Iterator[_T]: ... - -def accumulate(iterable: Iterable[_T]) -> Iterator[_T]: ... -def chain(*iterables: Iterable[_T]) -> Iterator[_T]: ... -# TODO chain.from_Iterable -def compress(data: Iterable[_T], selectors: Iterable[Any]) -> Iterator[_T]: ... -def dropwhile(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... -def filterfalse(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... - -@overload -def groupby(iterable: Iterable[_T]) -> Iterator[Tuple[_T, Iterator[_T]]]: ... -@overload -def groupby(iterable: Iterable[_T], - key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... - -@overload -def islice(iterable: Iterable[_T], stop: int) -> Iterator[_T]: ... -@overload -def islice(iterable: Iterable[_T], start: int, stop: int, - step: int = 1) -> Iterator[_T]: ... - -def starmap(func: Any, iterable: Iterable[Any]) -> Iterator[Any]: ... -def takewhile(predicate: Callable[[_T], Any], - iterable: Iterable[_T]) -> Iterator[_T]: ... -def tee(iterable: Iterable[Any], n: int = 2) -> Iterator[Any]: ... -def zip_longest(*p: Iterable[Any], - fillvalue: Any = None) -> Iterator[Any]: ... - -# TODO: Return type should be Iterator[Tuple[..]], but unknown tuple shape. -# Iterator[Sequence[_T]] loses this type information. -def product(*p: Iterable[_T], repeat: int = 1) -> Iterator[Sequence[_T]]: ... - -def permutations(iterable: Iterable[_T], - r: Union[int, None] = None) -> Iterator[Sequence[_T]]: ... -def combinations(iterable: Iterable[_T], - r: int) -> Iterable[Sequence[_T]]: ... -def combinations_with_replacement(iterable: Iterable[_T], - r: int) -> Iterable[Sequence[_T]]: ... diff --git a/stubs/3.2/json.pyi b/stubs/3.2/json.pyi deleted file mode 100644 index 348f4af08ebd..000000000000 --- a/stubs/3.2/json.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, IO - -class JSONDecodeError(object): - def dumps(self, obj: Any) -> str: ... - def dump(self, obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... - def loads(self, s: str) -> Any: ... - def load(self, fp: IO[str]) -> Any: ... - -def dumps(obj: Any) -> str: ... -def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... -def loads(s: str) -> Any: ... -def load(fp: IO[str]) -> Any: ... diff --git a/stubs/3.2/linecache.pyi b/stubs/3.2/linecache.pyi deleted file mode 100644 index 552488cbb0a5..000000000000 --- a/stubs/3.2/linecache.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any - -def getline(filename:str, lineno:int, module_globals: Any=None) -> str: pass -def clearcache() -> None: pass -def getlines(filename: str, module_globals: Any=None) -> None: pass diff --git a/stubs/3.2/locale.pyi b/stubs/3.2/locale.pyi deleted file mode 100644 index 2831befcfa2e..000000000000 --- a/stubs/3.2/locale.pyi +++ /dev/null @@ -1,17 +0,0 @@ -# Stubs for locale (Python 3.4) -# -# NOTE: This stub is based on a stub automatically generated by stubgen. - -from _locale import * - -def format(percent, value, grouping=False, monetary=False, *additional): ... -def format_string(f, val, grouping=False): ... -def currency(val, symbol=True, grouping=False, international=False): ... -def str(val): ... -def atof(string, func=...): ... -def atoi(str): ... -def normalize(localename): ... -def getdefaultlocale(envvars=...): ... -def getlocale(category=...): ... -def resetlocale(category=...): ... -def getpreferredencoding(do_setlocale=True): ... diff --git a/stubs/3.2/logging/__init__.pyi b/stubs/3.2/logging/__init__.pyi deleted file mode 100644 index be8370a10a5b..000000000000 --- a/stubs/3.2/logging/__init__.pyi +++ /dev/null @@ -1,239 +0,0 @@ -# Stubs for logging (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -CRITICAL = ... # type: Any -FATAL = ... # type: Any -ERROR = ... # type: Any -WARNING = ... # type: Any -WARN = ... # type: Any -INFO = ... # type: Any -DEBUG = ... # type: Any -NOTSET = ... # type: Any - -def getLevelName(level): ... -def addLevelName(level, levelName): ... - -class LogRecord: - name = ... # type: Any - msg = ... # type: Any - args = ... # type: Any - levelname = ... # type: Any - levelno = ... # type: Any - pathname = ... # type: Any - filename = ... # type: Any - module = ... # type: Any - exc_info = ... # type: Any - exc_text = ... # type: Any - stack_info = ... # type: Any - lineno = ... # type: Any - funcName = ... # type: Any - created = ... # type: Any - msecs = ... # type: Any - relativeCreated = ... # type: Any - thread = ... # type: Any - threadName = ... # type: Any - processName = ... # type: Any - process = ... # type: Any - def __init__(self, name, level, pathname, lineno, msg, args, exc_info, func=None, sinfo=None, - **kwargs): ... - def getMessage(self): ... - -def setLogRecordFactory(factory): ... -def getLogRecordFactory(): ... -def makeLogRecord(dict): ... - -class PercentStyle: - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def __init__(self, fmt): ... - def usesTime(self): ... - def format(self, record): ... - -class StrFormatStyle(PercentStyle): - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def format(self, record): ... - -class StringTemplateStyle(PercentStyle): - default_format = ... # type: Any - asctime_format = ... # type: Any - asctime_search = ... # type: Any - def __init__(self, fmt): ... - def usesTime(self): ... - def format(self, record): ... - -BASIC_FORMAT = ... # type: Any - -class Formatter: - converter = ... # type: Any - datefmt = ... # type: Any - def __init__(self, fmt=None, datefmt=None, style=''): ... - default_time_format = ... # type: Any - default_msec_format = ... # type: Any - def formatTime(self, record, datefmt=None): ... - def formatException(self, ei): ... - def usesTime(self): ... - def formatMessage(self, record): ... - def formatStack(self, stack_info): ... - def format(self, record): ... - -class BufferingFormatter: - linefmt = ... # type: Any - def __init__(self, linefmt=None): ... - def formatHeader(self, records): ... - def formatFooter(self, records): ... - def format(self, records): ... - -class Filter: - name = ... # type: Any - nlen = ... # type: Any - def __init__(self, name=''): ... - def filter(self, record): ... - -class Filterer: - filters = ... # type: Any - def __init__(self): ... - def addFilter(self, filter): ... - def removeFilter(self, filter): ... - def filter(self, record): ... - -class Handler(Filterer): - level = ... # type: Any - formatter = ... # type: Any - def __init__(self, level=...): ... - def get_name(self): ... - def set_name(self, name): ... - name = ... # type: Any - lock = ... # type: Any - def createLock(self): ... - def acquire(self): ... - def release(self): ... - def setLevel(self, level): ... - def format(self, record): ... - def emit(self, record): ... - def handle(self, record): ... - def setFormatter(self, fmt): ... - def flush(self): ... - def close(self): ... - def handleError(self, record): ... - -class StreamHandler(Handler): - terminator = ... # type: Any - stream = ... # type: Any - def __init__(self, stream=None): ... - def flush(self): ... - def emit(self, record): ... - -class FileHandler(StreamHandler): - baseFilename = ... # type: Any - mode = ... # type: Any - encoding = ... # type: Any - delay = ... # type: Any - stream = ... # type: Any - def __init__(self, filename, mode='', encoding=None, delay=False): ... - def close(self): ... - def emit(self, record): ... - -class _StderrHandler(StreamHandler): - def __init__(self, level=...): ... - -lastResort = ... # type: Any - -class PlaceHolder: - loggerMap = ... # type: Any - def __init__(self, alogger): ... - def append(self, alogger): ... - -def setLoggerClass(klass): ... -def getLoggerClass(): ... - -class Manager: - root = ... # type: Any - disable = ... # type: Any - emittedNoHandlerWarning = ... # type: Any - loggerDict = ... # type: Any - loggerClass = ... # type: Any - logRecordFactory = ... # type: Any - def __init__(self, rootnode): ... - def getLogger(self, name): ... - def setLoggerClass(self, klass): ... - def setLogRecordFactory(self, factory): ... - -class Logger(Filterer): - name = ... # type: Any - level = ... # type: Any - parent = ... # type: Any - propagate = ... # type: Any - handlers = ... # type: Any - disabled = ... # type: Any - def __init__(self, name, level=...): ... - def setLevel(self, level): ... - def debug(self, msg, *args, **kwargs): ... - def info(self, msg, *args, **kwargs): ... - def warning(self, msg, *args, **kwargs): ... - def warn(self, msg, *args, **kwargs): ... - def error(self, msg, *args, **kwargs): ... - def exception(self, msg, *args, **kwargs): ... - def critical(self, msg, *args, **kwargs): ... - fatal = ... # type: Any - def log(self, level, msg, *args, **kwargs): ... - def findCaller(self, stack_info=False): ... - def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None, - sinfo=None): ... - def handle(self, record): ... - def addHandler(self, hdlr): ... - def removeHandler(self, hdlr): ... - def hasHandlers(self): ... - def callHandlers(self, record): ... - def getEffectiveLevel(self): ... - def isEnabledFor(self, level): ... - def getChild(self, suffix): ... - -class RootLogger(Logger): - def __init__(self, level): ... - -class LoggerAdapter: - logger = ... # type: Any - extra = ... # type: Any - def __init__(self, logger, extra): ... - def process(self, msg, kwargs): ... - def debug(self, msg, *args, **kwargs): ... - def info(self, msg, *args, **kwargs): ... - def warning(self, msg, *args, **kwargs): ... - def warn(self, msg, *args, **kwargs): ... - def error(self, msg, *args, **kwargs): ... - def exception(self, msg, *args, **kwargs): ... - def critical(self, msg, *args, **kwargs): ... - def log(self, level, msg, *args, **kwargs): ... - def isEnabledFor(self, level): ... - def setLevel(self, level): ... - def getEffectiveLevel(self): ... - def hasHandlers(self): ... - -def basicConfig(**kwargs): ... -def getLogger(name=None): ... -def critical(msg, *args, **kwargs): ... - -fatal = ... # type: Any - -def error(msg, *args, **kwargs): ... -def exception(msg, *args, **kwargs): ... -def warning(msg, *args, **kwargs): ... -def warn(msg, *args, **kwargs): ... -def info(msg, *args, **kwargs): ... -def debug(msg, *args, **kwargs): ... -def log(level, msg, *args, **kwargs): ... -def disable(level): ... - -class NullHandler(Handler): - def handle(self, record): ... - def emit(self, record): ... - lock = ... # type: Any - def createLock(self): ... - -def captureWarnings(capture): ... diff --git a/stubs/3.2/logging/handlers.pyi b/stubs/3.2/logging/handlers.pyi deleted file mode 100644 index 20ee72f3f9a7..000000000000 --- a/stubs/3.2/logging/handlers.pyi +++ /dev/null @@ -1,200 +0,0 @@ -# Stubs for logging.handlers (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import logging - -threading = ... # type: Any -DEFAULT_TCP_LOGGING_PORT = ... # type: Any -DEFAULT_UDP_LOGGING_PORT = ... # type: Any -DEFAULT_HTTP_LOGGING_PORT = ... # type: Any -DEFAULT_SOAP_LOGGING_PORT = ... # type: Any -SYSLOG_UDP_PORT = ... # type: Any -SYSLOG_TCP_PORT = ... # type: Any - -class BaseRotatingHandler(logging.FileHandler): - mode = ... # type: Any - encoding = ... # type: Any - namer = ... # type: Any - rotator = ... # type: Any - def __init__(self, filename, mode, encoding=None, delay=False): ... - def emit(self, record): ... - def rotation_filename(self, default_name): ... - def rotate(self, source, dest): ... - -class RotatingFileHandler(BaseRotatingHandler): - maxBytes = ... # type: Any - backupCount = ... # type: Any - def __init__(self, filename, mode='', maxBytes=0, backupCount=0, encoding=None, - delay=False): ... - stream = ... # type: Any - def doRollover(self): ... - def shouldRollover(self, record): ... - -class TimedRotatingFileHandler(BaseRotatingHandler): - when = ... # type: Any - backupCount = ... # type: Any - utc = ... # type: Any - atTime = ... # type: Any - interval = ... # type: Any - suffix = ... # type: Any - extMatch = ... # type: Any - dayOfWeek = ... # type: Any - rolloverAt = ... # type: Any - def __init__(self, filename, when='', interval=1, backupCount=0, encoding=None, delay=False, - utc=False, atTime=None): ... - def computeRollover(self, currentTime): ... - def shouldRollover(self, record): ... - def getFilesToDelete(self): ... - stream = ... # type: Any - def doRollover(self): ... - -class WatchedFileHandler(logging.FileHandler): - def __init__(self, filename, mode='', encoding=None, delay=False): ... - stream = ... # type: Any - def emit(self, record): ... - -class SocketHandler(logging.Handler): - host = ... # type: Any - port = ... # type: Any - address = ... # type: Any - sock = ... # type: Any - closeOnError = ... # type: Any - retryTime = ... # type: Any - retryStart = ... # type: Any - retryMax = ... # type: Any - retryFactor = ... # type: Any - def __init__(self, host, port): ... - def makeSocket(self, timeout=1): ... - retryPeriod = ... # type: Any - def createSocket(self): ... - def send(self, s): ... - def makePickle(self, record): ... - def handleError(self, record): ... - def emit(self, record): ... - def close(self): ... - -class DatagramHandler(SocketHandler): - closeOnError = ... # type: Any - def __init__(self, host, port): ... - def makeSocket(self, timeout=1): ... # TODO: Actually does not have the timeout argument. - def send(self, s): ... - -class SysLogHandler(logging.Handler): - LOG_EMERG = ... # type: Any - LOG_ALERT = ... # type: Any - LOG_CRIT = ... # type: Any - LOG_ERR = ... # type: Any - LOG_WARNING = ... # type: Any - LOG_NOTICE = ... # type: Any - LOG_INFO = ... # type: Any - LOG_DEBUG = ... # type: Any - LOG_KERN = ... # type: Any - LOG_USER = ... # type: Any - LOG_MAIL = ... # type: Any - LOG_DAEMON = ... # type: Any - LOG_AUTH = ... # type: Any - LOG_SYSLOG = ... # type: Any - LOG_LPR = ... # type: Any - LOG_NEWS = ... # type: Any - LOG_UUCP = ... # type: Any - LOG_CRON = ... # type: Any - LOG_AUTHPRIV = ... # type: Any - LOG_FTP = ... # type: Any - LOG_LOCAL0 = ... # type: Any - LOG_LOCAL1 = ... # type: Any - LOG_LOCAL2 = ... # type: Any - LOG_LOCAL3 = ... # type: Any - LOG_LOCAL4 = ... # type: Any - LOG_LOCAL5 = ... # type: Any - LOG_LOCAL6 = ... # type: Any - LOG_LOCAL7 = ... # type: Any - priority_names = ... # type: Any - facility_names = ... # type: Any - priority_map = ... # type: Any - address = ... # type: Any - facility = ... # type: Any - socktype = ... # type: Any - unixsocket = ... # type: Any - socket = ... # type: Any - formatter = ... # type: Any - def __init__(self, address=..., facility=..., socktype=None): ... - def encodePriority(self, facility, priority): ... - def close(self): ... - def mapPriority(self, levelName): ... - ident = ... # type: Any - append_nul = ... # type: Any - def emit(self, record): ... - -class SMTPHandler(logging.Handler): - username = ... # type: Any - fromaddr = ... # type: Any - toaddrs = ... # type: Any - subject = ... # type: Any - secure = ... # type: Any - timeout = ... # type: Any - def __init__(self, mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None, - timeout=0.0): ... - def getSubject(self, record): ... - def emit(self, record): ... - -class NTEventLogHandler(logging.Handler): - appname = ... # type: Any - dllname = ... # type: Any - logtype = ... # type: Any - deftype = ... # type: Any - typemap = ... # type: Any - def __init__(self, appname, dllname=None, logtype=''): ... - def getMessageID(self, record): ... - def getEventCategory(self, record): ... - def getEventType(self, record): ... - def emit(self, record): ... - def close(self): ... - -class HTTPHandler(logging.Handler): - host = ... # type: Any - url = ... # type: Any - method = ... # type: Any - secure = ... # type: Any - credentials = ... # type: Any - def __init__(self, host, url, method='', secure=False, credentials=None): ... - def mapLogRecord(self, record): ... - def emit(self, record): ... - -class BufferingHandler(logging.Handler): - capacity = ... # type: Any - buffer = ... # type: Any - def __init__(self, capacity): ... - def shouldFlush(self, record): ... - def emit(self, record): ... - def flush(self): ... - def close(self): ... - -class MemoryHandler(BufferingHandler): - flushLevel = ... # type: Any - target = ... # type: Any - def __init__(self, capacity, flushLevel=..., target=None): ... - def shouldFlush(self, record): ... - def setTarget(self, target): ... - buffer = ... # type: Any - def flush(self): ... - def close(self): ... - -class QueueHandler(logging.Handler): - queue = ... # type: Any - def __init__(self, queue): ... - def enqueue(self, record): ... - def prepare(self, record): ... - def emit(self, record): ... - -class QueueListener: - queue = ... # type: Any - handlers = ... # type: Any - def __init__(self, queue, *handlers): ... - def dequeue(self, block): ... - def start(self): ... - def prepare(self, record): ... - def handle(self, record): ... - def enqueue_sentinel(self): ... - def stop(self): ... diff --git a/stubs/3.2/math.pyi b/stubs/3.2/math.pyi deleted file mode 100644 index 447540a3825f..000000000000 --- a/stubs/3.2/math.pyi +++ /dev/null @@ -1,53 +0,0 @@ -# Stubs for math -# Ron Murawski - -# based on: http://docs.python.org/3.2/library/math.html - -from typing import overload, Tuple, Iterable - -# ----- variables and constants ----- -e = 0.0 -pi = 0.0 - -# ----- functions ----- -def ceil(x: float) -> int: ... -def copysign(x: float, y: float) -> float: ... -def fabs(x: float) -> float: ... -def factorial(x: int) -> int: ... -def floor(x: float) -> int: ... -def fmod(x: float, y: float) -> float: ... -def frexp(x: float) -> Tuple[float, int]: ... -def fsum(iterable: Iterable) -> float: ... -def isfinite(x: float) -> bool: ... -def isinf(x: float) -> bool: ... -def isnan(x: float) -> bool: ... -def ldexp(x: float, i: int) -> float: ... -def modf(x: float) -> Tuple[float, float]: ... -def trunc(x: float) -> float: ... -def exp(x: float) -> float: ... -def expm1(x: float) -> float: ... -def log(x: float, base: float = e) -> float: ... -def log1p(x: float) -> float: ... -def log10(x: float) -> float: ... -def pow(x: float, y: float) -> float: ... -def sqrt(x: float) -> float: ... -def acos(x: float) -> float: ... -def asin(x: float) -> float: ... -def atan(x: float) -> float: ... -def atan2(y: float, x: float) -> float: ... -def cos(x: float) -> float: ... -def hypot(x: float, y: float) -> float: ... -def sin(x: float) -> float: ... -def tan(x: float) -> float: ... -def degrees(x: float) -> float: ... -def radians(x: float) -> float: ... -def acosh(x: float) -> float: ... -def asinh(x: float) -> float: ... -def atanh(x: float) -> float: ... -def cosh(x: float) -> float: ... -def sinh(x: float) -> float: ... -def tanh(x: float) -> float: ... -def erf(x: object) -> float: ... -def erfc(x: object) -> float: ... -def gamma(x: object) -> float: ... -def lgamma(x: object) -> float: ... diff --git a/stubs/3.2/msvcrt.pyi b/stubs/3.2/msvcrt.pyi deleted file mode 100644 index bcab64cd9a0a..000000000000 --- a/stubs/3.2/msvcrt.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for msvcrt - -# NOTE: These are incomplete! - -from typing import overload, BinaryIO, TextIO - -def get_osfhandle(file: int) -> int: ... -def open_osfhandle(handle: int, flags: int) -> int: ... diff --git a/stubs/3.2/multiprocessing/__init__.pyi b/stubs/3.2/multiprocessing/__init__.pyi deleted file mode 100644 index 71dd1394d428..000000000000 --- a/stubs/3.2/multiprocessing/__init__.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for multiprocessing - -from typing import Any - -class Lock(): ... -class Process(): ... - -class Queue(): - def get(block: bool = None, timeout: float = None) -> Any: ... - -class Value(): - def __init__(typecode_or_type: str, *args: Any, lock: bool = True) -> None: ... diff --git a/stubs/3.2/multiprocessing/managers.pyi b/stubs/3.2/multiprocessing/managers.pyi deleted file mode 100644 index 692fb2eb3774..000000000000 --- a/stubs/3.2/multiprocessing/managers.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for multiprocessing.managers - -# NOTE: These are incomplete! - -from typing import Any - -class BaseManager(): - def register(typeid: str, callable: Any = None) -> None: ... diff --git a/stubs/3.2/multiprocessing/pool.pyi b/stubs/3.2/multiprocessing/pool.pyi deleted file mode 100644 index ad3c5f566a1b..000000000000 --- a/stubs/3.2/multiprocessing/pool.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for multiprocessing.pool - -# NOTE: These are incomplete! - -class ThreadPool(): - def __init__(self, processes: int = None) -> None: ... diff --git a/stubs/3.2/operator.pyi b/stubs/3.2/operator.pyi deleted file mode 100644 index 7785fbe6e4d0..000000000000 --- a/stubs/3.2/operator.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for operator - -# NOTE: These are incomplete! - -from typing import Any - -def add(a: Any, b: Any) -> Any: ... diff --git a/stubs/3.2/os/__init__.pyi b/stubs/3.2/os/__init__.pyi deleted file mode 100644 index 3ada3551f118..000000000000 --- a/stubs/3.2/os/__init__.pyi +++ /dev/null @@ -1,338 +0,0 @@ -# Stubs for os -# Ron Murawski - -# based on http://docs.python.org/3.2/library/os.html - -from typing import ( - Mapping, MutableMapping, Dict, List, Any, Tuple, Iterator, overload, Union, AnyStr, - Optional, Generic -) -from builtins import OSError as error -import os.path as path - -# ----- os variables ----- - -supports_bytes_environ = False # TODO: True when bytes implemented? - -SEEK_SET = 0 # type: int -SEEK_CUR = 1 # type: int -SEEK_END = 2 # type: int - -O_RDONLY = 0 -O_WRONLY = 0 -O_RDWR = 0 -O_APPEND = 0 -O_CREAT = 0 -O_EXCL = 0 -O_TRUNC = 0 -O_DSYNC = 0 # Unix only -O_RSYNC = 0 # Unix only -O_SYNC = 0 # Unix only -O_NDELAY = 0 # Unix only -O_NONBLOCK = 0 # Unix only -O_NOCTTY = 0 # Unix only -O_SHLOCK = 0 # Unix only -O_EXLOCK = 0 # Unix only -O_BINARY = 0 # Windows only -O_NOINHERIT = 0 # Windows only -O_SHORT_LIVED = 0# Windows only -O_TEMPORARY = 0 # Windows only -O_RANDOM = 0 # Windows only -O_SEQUENTIAL = 0 # Windows only -O_TEXT = 0 # Windows only -O_ASYNC = 0 # Gnu extension if in C library -O_DIRECT = 0 # Gnu extension if in C library -O_DIRECTORY = 0 # Gnu extension if in C library -O_NOFOLLOW = 0 # Gnu extension if in C library -O_NOATIME = 0 # Gnu extension if in C library - -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -linesep = '' -devnull = '' - -F_OK = 0 -R_OK = 0 -W_OK = 0 -X_OK = 0 - -class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]): - def copy(self) -> _Environ[AnyStr]: ... - -environ = ... # type: _Environ[str] -environb = ... # type: _Environ[bytes] - -confstr_names = ... # type: Dict[str, int] # Unix only -pathconf_names = ... # type: Dict[str, int] # Unix only -sysconf_names = ... # type: Dict[str, int] # Unix only - -EX_OK = 0 # Unix only -EX_USAGE = 0 # Unix only -EX_DATAERR = 0 # Unix only -EX_NOINPUT = 0 # Unix only -EX_NOUSER = 0 # Unix only -EX_NOHOST = 0 # Unix only -EX_UNAVAILABLE = 0 # Unix only -EX_SOFTWARE = 0 # Unix only -EX_OSERR = 0 # Unix only -EX_OSFILE = 0 # Unix only -EX_CANTCREAT = 0 # Unix only -EX_IOERR = 0 # Unix only -EX_TEMPFAIL = 0 # Unix only -EX_PROTOCOL = 0 # Unix only -EX_NOPERM = 0 # Unix only -EX_CONFIG = 0 # Unix only -EX_NOTFOUND = 0 # Unix only - -P_NOWAIT = 0 -P_NOWAITO = 0 -P_WAIT = 0 -#P_DETACH = 0 # Windows only -#P_OVERLAY = 0 # Windows only - -# wait()/waitpid() options -WNOHANG = 0 # Unix only -#WCONTINUED = 0 # some Unix systems -#WUNTRACED = 0 # Unix only - -TMP_MAX = 0 # Undocumented, but used by tempfile - -# ----- os classes (structures) ----- -class stat_result: - # For backward compatibility, the return value of stat() is also - # accessible as a tuple of at least 10 integers giving the most important - # (and portable) members of the stat structure, in the order st_mode, - # st_ino, st_dev, st_nlink, st_uid, st_gid, st_size, st_atime, st_mtime, - # st_ctime. More items may be added at the end by some implementations. - - st_mode = 0 # protection bits, - st_ino = 0 # inode number, - st_dev = 0 # device, - st_nlink = 0 # number of hard links, - st_uid = 0 # user id of owner, - st_gid = 0 # group id of owner, - st_size = 0 # size of file, in bytes, - st_atime = 0.0 # time of most recent access, - st_mtime = 0.0 # time of most recent content modification, - st_ctime = 0.0 # platform dependent (time of most recent metadata change - # on Unix, or the time of creation on Windows) - - def __init__(self, tuple) -> None: ... - - # On some Unix systems (such as Linux), the following attributes may also - # be available: - st_blocks = 0 # number of blocks allocated for file - st_blksize = 0 # filesystem blocksize - st_rdev = 0 # type of device if an inode device - st_flags = 0 # user defined flags for file - - # On other Unix systems (such as FreeBSD), the following attributes may be - # available (but may be only filled out if root tries to use them): - st_gen = 0 # file generation number - st_birthtime = 0 # time of file creation - - # On Mac OS systems, the following attributes may also be available: - st_rsize = 0 - st_creator = 0 - st_type = 0 - -class statvfs_result: # Unix only - f_bsize = 0 - f_frsize = 0 - f_blocks = 0 - f_bfree = 0 - f_bavail = 0 - f_files = 0 - f_ffree = 0 - f_favail = 0 - f_flag = 0 - f_namemax = 0 - -# ----- os function stubs ----- -def name() -> str: ... -def fsencode(filename: str) -> bytes: ... -def fsdecode(filename: bytes) -> str: ... -def get_exec_path(env=None) -> List[str] : ... -# NOTE: get_exec_path(): returns List[bytes] when env not None -def ctermid() -> str: ... # Unix only -def getegid() -> int: ... # Unix only -def geteuid() -> int: ... # Unix only -def getgid() -> int: ... # Unix only -def getgroups() -> List[int]: ... # Unix only, behaves differently on Mac -def initgroups(username: str, gid: int) -> None: ... # Unix only -def getlogin() -> str: ... -def getpgid(pid: int) -> int: ... # Unix only -def getpgrp() -> int: ... # Unix only -def getpid() -> int: ... -def getppid() -> int: ... -def getresuid() -> Tuple[int, int, int]: ... # Unix only -def getresgid() -> Tuple[int, int, int]: ... # Unix only -def getuid() -> int: ... # Unix only -def getenv(key: str, default: str = None) -> str: ... -def getenvb(key: bytes, default: bytes = None) -> bytes: ... -# TODO mixed str/bytes putenv arguments -def putenv(key: AnyStr, value: AnyStr) -> None: ... -def setegid(egid: int) -> None: ... # Unix only -def seteuid(euid: int) -> None: ... # Unix only -def setgid(gid: int) -> None: ... # Unix only -def setgroups(groups: List[int]) -> None: ... # Unix only -def setpgrp() -> int: ... # Unix only -def setpgid(pid: int, pgrp: int) -> int: ... # Unix only -def setregid(rgid: int, egid: int) -> None: ... # Unix only -def setresgid(rgid: int, egid: int, sgid: int) -> None: ... # Unix only -def setresuid(ruid: int, euid: int, suid: int) -> None: ... # Unix only -def setreuid(ruid: int, euid: int) -> None: ... # Unix only -def getsid(pid: int) -> int: ... # Unix only -def setsid() -> int: ... # Unix only -def setuid(uid) -> None: ... # Unix only -def strerror(code: int) -> str: ... -def umask(mask: int) -> int: ... -def uname() -> Tuple[str, str, str, str, str]: ... # Unix only -def unsetenv(key: AnyStr) -> None: ... -# Return IO or TextIO -def fdopen(fd: int, mode: str = 'r', encoding: str = None, errors: str = None, - newline: str = None, closefd: bool = True) -> Any: ... -def close(fd: int) -> None: ... -def closerange(fd_low: int, fd_high: int) -> None: ... -def device_encoding(fd: int) -> Optional[str]: ... -def dup(fd: int) -> int: ... -def dup2(fd: int, fd2: int) -> None: ... -def fchmod(fd: int, intmode) -> None: ... # Unix only -def fchown(fd: int, uid: int, gid: int) -> None: ... # Unix only -def fdatasync(fd: int) -> None: ... # Unix only, not Mac -def fpathconf(fd: int, name: str) -> int: ... # Unix only -def fstat(fd: int) -> stat_result: ... -def fstatvfs(fd: int) -> statvfs_result: ... # Unix only -def fsync(fd: int) -> None: ... -def ftruncate(fd: int, length: int) -> None: ... # Unix only -def isatty(fd: int) -> bool: ... # Unix only -def lseek(fd: int, pos: int, how: int) -> int: ... -def open(file: AnyStr, flags: int, mode: int = 0o777) -> int: ... -def openpty() -> Tuple[int, int]: ... # some flavors of Unix -def pipe() -> Tuple[int, int]: ... -def read(fd: int, n: int) -> bytes: ... -def tcgetpgrp(fd: int) -> int: ... # Unix only -def tcsetpgrp(fd: int, pg: int) -> None: ... # Unix only -def ttyname(fd: int) -> str: ... # Unix only -def write(fd: int, string: bytes) -> int: ... -def access(path: AnyStr, mode: int) -> bool: ... -def chdir(path: AnyStr) -> None: ... -def fchdir(fd: int) -> None: ... -def getcwd() -> str: ... -def getcwdb() -> bytes: ... -def chflags(path: str, flags: int) -> None: ... # Unix only -def chroot(path: str) -> None: ... # Unix only -def chmod(path: AnyStr, mode: int) -> None: ... -def chown(path: AnyStr, uid: int, gid: int) -> None: ... # Unix only -def lchflags(path: str, flags: int) -> None: ... # Unix only -def lchmod(path: str, mode: int) -> None: ... # Unix only -def lchown(path: str, uid: int, gid: int) -> None: ... # Unix only -def link(src: AnyStr, link_name: AnyStr) -> None: ... - -@overload -def listdir(path: str = '.') -> List[str]: ... -@overload -def listdir(path: bytes) -> List[bytes]: ... - -def lstat(path: AnyStr) -> stat_result: ... -def mkfifo(path, mode: int=0o666) -> None: ... # Unix only -def mknod(filename: AnyStr, mode: int = 0o600, device: int = 0) -> None: ... -def major(device: int) -> int: ... -def minor(device: int) -> int: ... -def makedev(major: int, minor: int) -> int: ... -def mkdir(path: AnyStr, mode: int = 0o777) -> None: ... -def makedirs(path: AnyStr, mode: int = 0o777, - exist_ok: bool = False) -> None: ... -def pathconf(path: str, name: str) -> int: ... # Unix only -def readlink(path: AnyStr) -> AnyStr: ... -def remove(path: AnyStr) -> None: ... -def removedirs(path: AnyStr) -> None: ... -def rename(src: AnyStr, dst: AnyStr) -> None: ... -def renames(old: AnyStr, new: AnyStr) -> None: ... -def rmdir(path: AnyStr) -> None: ... -def stat(path: AnyStr) -> stat_result: ... -def stat_float_times(newvalue: Union[bool, None] = None) -> bool: ... -def statvfs(path: str) -> statvfs_result: ... # Unix only -def symlink(source: AnyStr, link_name: AnyStr, - target_is_directory: bool = False) -> None: - ... # final argument in Windows only -def unlink(path: AnyStr) -> None: ... -def utime(path: AnyStr, times: Union[Tuple[int, int], Tuple[float, float]] = None) -> None: ... - -# TODO onerror: function from OSError to void -def walk(top: AnyStr, topdown: bool = True, onerror: Any = None, - followlinks: bool = False) -> Iterator[Tuple[AnyStr, List[AnyStr], - List[AnyStr]]]: ... -# walk(): "By default errors from the os.listdir() call are ignored. If -# optional arg 'onerror' is specified, it should be a function; it -# will be called with one argument, an os.error instance. It can -# report the error to continue with the walk, or raise the exception -# to abort the walk. Note that the filename is available as the -# filename attribute of the exception object." - -def abort() -> 'None': ... -def execl(path: AnyStr, arg0: AnyStr, *args: AnyStr) -> None: ... -def execle(path: AnyStr, arg0: AnyStr, - *args: Any) -> None: ... # Imprecise signature -def execlp(path: AnyStr, arg0: AnyStr, *args: AnyStr) -> None: ... -def execlpe(path: AnyStr, arg0: AnyStr, - *args: Any) -> None: ... # Imprecise signature -def execv(path: AnyStr, args: List[AnyStr]) -> None: ... -def execve(path: AnyStr, args: List[AnyStr], env: Mapping[AnyStr, AnyStr]) -> None: ... -def execvp(file: AnyStr, args: List[AnyStr]) -> None: ... -def execvpe(file: AnyStr, args: List[AnyStr], - env: Mapping[str, str]) -> None: ... -def _exit(n: int) -> None: ... -def fork() -> int: ... # Unix only -def forkpty() -> Tuple[int, int]: ... # some flavors of Unix -def kill(pid: int, sig: int) -> None: ... -def killpg(pgid: int, sig: int) -> None: ... # Unix only -def nice(increment: int) -> int: ... # Unix only -def plock(op: int) -> None: ... # Unix only ???op is int? - -from io import TextIOWrapper as _TextIOWrapper -class popen(_TextIOWrapper): - # TODO 'b' modes or bytes command not accepted? - def __init__(self, command: str, mode: str = 'r', - bufsize: int = -1) -> None: ... - def close(self) -> Any: ... # may return int - -def spawnl(mode: int, path: AnyStr, arg0: AnyStr, *args: AnyStr) -> int: ... -def spawnle(mode: int, path: AnyStr, arg0: AnyStr, - *args: Any) -> int: ... # Imprecise sig -def spawnlp(mode: int, file: AnyStr, arg0: AnyStr, - *args: AnyStr) -> int: ... # Unix only TODO -def spawnlpe(mode: int, file: AnyStr, arg0: AnyStr, *args: Any) -> int: - ... # Imprecise signature; Unix only TODO -def spawnv(mode: int, path: AnyStr, args: List[AnyStr]) -> int: ... -def spawnve(mode: int, path: AnyStr, args: List[AnyStr], - env: Mapping[str, str]) -> int: ... -def spawnvp(mode: int, file: AnyStr, args: List[AnyStr]) -> int: ... # Unix only -def spawnvpe(mode: int, file: AnyStr, args: List[AnyStr], - env: Mapping[str, str]) -> int: - ... # Unix only -def startfile(path: str, operation: Union[str, None] = None) -> None: ... # Windows only -def system(command: AnyStr) -> int: ... -def times() -> Tuple[float, float, float, float, float]: ... -def wait() -> Tuple[int, int]: ... # Unix only -def waitpid(pid: int, options: int) -> Tuple[int, int]: ... -def wait3(options: Union[int, None] = None) -> Tuple[int, int, Any]: ... # Unix only -def wait4(pid: int, options: int) -> Tuple[int, int, Any]: - ... # Unix only -def WCOREDUMP(status: int) -> bool: ... # Unix only -def WIFCONTINUED(status: int) -> bool: ... # Unix only -def WIFSTOPPED(status: int) -> bool: ... # Unix only -def WIFSIGNALED(status: int) -> bool: ... # Unix only -def WIFEXITED(status: int) -> bool: ... # Unix only -def WEXITSTATUS(status: int) -> bool: ... # Unix only -def WSTOPSIG(status: int) -> bool: ... # Unix only -def WTERMSIG(status: int) -> bool: ... # Unix only -def confstr(name: str) -> str: ... # Unix only -def getloadavg() -> Tuple[float, float, float]: ... # Unix only -def sysconf(name: str) -> int: ... # Unix only -def urandom(n: int) -> bytes: ... diff --git a/stubs/3.2/os/path.pyi b/stubs/3.2/os/path.pyi deleted file mode 100644 index cbb86d1d6604..000000000000 --- a/stubs/3.2/os/path.pyi +++ /dev/null @@ -1,61 +0,0 @@ -# Stubs for os.path -# Ron Murawski - -# based on http://docs.python.org/3.2/library/os.path.html - -from typing import overload, List, Any, AnyStr, Tuple, BinaryIO, TextIO - -# ----- os.path variables ----- -supports_unicode_filenames = False -# aliases (also in os) -curdir = '' -pardir = '' -sep = '' -altsep = '' -extsep = '' -pathsep = '' -defpath = '' -devnull = '' - -# ----- os.path function stubs ----- -def abspath(path: AnyStr) -> AnyStr: ... -def basename(path: AnyStr) -> AnyStr: ... - -# NOTE: Empty List[bytes] results in '' (str) => fall back to Any return type. -def commonprefix(list: List[AnyStr]) -> Any: ... -def dirname(path: AnyStr) -> AnyStr: ... -def exists(path: AnyStr) -> bool: ... -def lexists(path: AnyStr) -> bool: ... -def expanduser(path: AnyStr) -> AnyStr: ... -def expandvars(path: AnyStr) -> AnyStr: ... - - -# These return float if os.stat_float_times() == True -def getatime(path: AnyStr) -> Any: ... -def getmtime(path: AnyStr) -> Any: ... -def getctime(path: AnyStr) -> Any: ... - -def getsize(path: AnyStr) -> int: ... -def isabs(path: AnyStr) -> bool: ... -def isfile(path: AnyStr) -> bool: ... -def isdir(path: AnyStr) -> bool: ... -def islink(path: AnyStr) -> bool: ... -def ismount(path: AnyStr) -> bool: ... - -def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... - -def normcase(path: AnyStr) -> AnyStr: ... -def normpath(path: AnyStr) -> AnyStr: ... -def realpath(path: AnyStr) -> AnyStr: ... -def relpath(path: AnyStr, start: AnyStr = None) -> AnyStr: ... - -def samefile(path1: AnyStr, path2: AnyStr) -> bool: ... -def sameopenfile(fp1: int, fp2: int) -> bool: ... -#def samestat(stat1: stat_result, -# stat2: stat_result) -> bool: ... # Unix only - -def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... -def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... -def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... - -#def splitunc(path: str) -> Tuple[str, str]: ... # Windows only, deprecated diff --git a/stubs/3.2/pickle.pyi b/stubs/3.2/pickle.pyi deleted file mode 100644 index d4eaf8295a2b..000000000000 --- a/stubs/3.2/pickle.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for pickle - -# NOTE: These are incomplete! - -from typing import Any, IO - -def dumps(obj: Any, protocol: int = None, *, - fix_imports: bool = True) -> bytes: ... -def loads(p: bytes, *, fix_imports: bool = True, - encoding: str = 'ASCII', errors: str = 'strict') -> Any: ... -def load(file: IO[bytes], *, fix_imports: bool = True, encoding: str = 'ASCII', - errors: str = 'strict') -> Any: ... diff --git a/stubs/3.2/platform.pyi b/stubs/3.2/platform.pyi deleted file mode 100644 index 13d443b8ab8c..000000000000 --- a/stubs/3.2/platform.pyi +++ /dev/null @@ -1,9 +0,0 @@ -# Stubs for platform - -# NOTE: These are incomplete! - -from typing import Tuple - -def mac_ver(release: str = '', - version_info: Tuple[str, str, str] = ('', '', ''), - machine: str = '') -> Tuple[str, Tuple[str, str, str], str]: ... diff --git a/stubs/3.2/posix.pyi b/stubs/3.2/posix.pyi deleted file mode 100644 index 3debbbfa522e..000000000000 --- a/stubs/3.2/posix.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for posix - -# NOTE: These are incomplete! - -import typing -from os import stat_result - diff --git a/stubs/3.2/posixpath.pyi b/stubs/3.2/posixpath.pyi deleted file mode 100644 index a26fe2ffc475..000000000000 --- a/stubs/3.2/posixpath.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# Stubs for os.path -# Ron Murawski - -# based on http://docs.python.org/3.2/library/os.path.html - -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 = None) -> 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]: ... -#def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated diff --git a/stubs/3.2/pprint.pyi b/stubs/3.2/pprint.pyi deleted file mode 100644 index 35e17fb360f0..000000000000 --- a/stubs/3.2/pprint.pyi +++ /dev/null @@ -1,23 +0,0 @@ -# Stubs for pprint - -# Based on http://docs.python.org/3.2/library/pprint.html - -from typing import Any, Dict, Tuple, TextIO - -def pformat(o: object, indent: int = 1, width: int = 80, - depth: int = None) -> str: ... -def pprint(o: object, stream: TextIO = None, indent: int = 1, width: int = 80, - depth: int = None) -> None: ... -def isreadable(o: object) -> bool: ... -def isrecursive(o: object) -> bool: ... -def saferepr(o: object) -> str: ... - -class PrettyPrinter: - def __init__(self, indent: int = 1, width: int = 80, depth: int = None, - stream: TextIO = None) -> None: ... - def pformat(self, o: object) -> str: ... - def pprint(self, o: object) -> None: ... - def isreadable(self, o: object) -> bool: ... - def isrecursive(self, o: object) -> bool: ... - def format(self, o: object, context: Dict[int, Any], maxlevels: int, - level: int) -> Tuple[str, bool, bool]: ... diff --git a/stubs/3.2/pwd.pyi b/stubs/3.2/pwd.pyi deleted file mode 100644 index 942566269a25..000000000000 --- a/stubs/3.2/pwd.pyi +++ /dev/null @@ -1,18 +0,0 @@ -# Stubs for pwd - -# NOTE: These are incomplete! - -import typing - -class struct_passwd: - # TODO use namedtuple - pw_name = '' - pw_passwd = '' - pw_uid = 0 - pw_gid = 0 - pw_gecos = '' - pw_dir = '' - pw_shell = '' - -def getpwuid(uid: int) -> struct_passwd: ... -def getpwnam(name: str) -> struct_passwd: ... diff --git a/stubs/3.2/queue.pyi b/stubs/3.2/queue.pyi deleted file mode 100644 index b9bdebca9642..000000000000 --- a/stubs/3.2/queue.pyi +++ /dev/null @@ -1,20 +0,0 @@ -# Stubs for queue - -# NOTE: These are incomplete! - -from typing import Any, TypeVar, Generic - -_T = TypeVar('_T') - -class Queue(Generic[_T]): - def __init__(self, maxsize: int = 0) -> None: ... - def full(self) -> bool: ... - def get(self, block: bool = True, timeout: float = None) -> _T: ... - def get_nowait(self) -> _T: ... - def put(self, item: _T, block: bool = True, timeout: float = None) -> None: ... - def put_nowait(self, item: _T) -> None: ... - def join(self) -> None: ... - def qsize(self) -> int: ... - def task_done(self) -> None: pass - -class Empty: ... diff --git a/stubs/3.2/random.pyi b/stubs/3.2/random.pyi deleted file mode 100644 index 65f9934a63f0..000000000000 --- a/stubs/3.2/random.pyi +++ /dev/null @@ -1,70 +0,0 @@ -# Stubs for random -# Ron Murawski -# Updated by Jukka Lehtosalo - -# based on http://docs.python.org/3.2/library/random.html - -# ----- random classes ----- - -import _random -from typing import ( - Any, TypeVar, Sequence, List, Callable, AbstractSet, Union -) - -_T = TypeVar('_T') - -class Random(_random.Random): - def __init__(self, x: Any = None) -> None: ... - def seed(self, a: Any = None, version: int = 2) -> None: ... - def getstate(self) -> tuple: ... - def setstate(self, state: tuple) -> None: ... - def getrandbits(self, k: int) -> int: ... - def randrange(self, start: int, stop: Union[int, None] = None, step: int = 1) -> int: ... - def randint(self, a: int, b: int) -> int: ... - def choice(self, seq: Sequence[_T]) -> _T: ... - def shuffle(self, x: List[Any], random: Union[Callable[[], float], None] = None) -> None: ... - def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... - def random(self) -> float: ... - def uniform(self, a: float, b: float) -> float: ... - def triangular(self, low: float = 0.0, high: float = 1.0, - mode: float = None) -> float: ... - def betavariate(self, alpha: float, beta: float) -> float: ... - def expovariate(self, lambd: float) -> float: ... - def gammavariate(self, alpha: float, beta: float) -> float: ... - def gauss(self, mu: float, sigma: float) -> float: ... - def lognormvariate(self, mu: float, sigma: float) -> float: ... - def normalvariate(self, mu: float, sigma: float) -> float: ... - def vonmisesvariate(self, mu: float, kappa: float) -> float: ... - def paretovariate(self, alpha: float) -> float: ... - def weibullvariate(self, alpha: float, beta: float) -> float: ... - -# SystemRandom is not implemented for all OS's; good on Windows & Linux -class SystemRandom: - def __init__(self, randseed: object = None) -> None: ... - def random(self) -> float: ... - def getrandbits(self, k: int) -> int: ... - def seed(self, arg: object) -> None: ... - -# ----- random function stubs ----- -def seed(a: Any = None, version: int = 2) -> None: ... -def getstate() -> object: ... -def setstate(state: object) -> None: ... -def getrandbits(k: int) -> int: ... -def randrange(start: int, stop: Union[None, int] = None, step: int = 1) -> int: ... -def randint(a: int, b: int) -> int: ... -def choice(seq: Sequence[_T]) -> _T: ... -def shuffle(x: List[Any], random: Union[Callable[[], float], None] = None) -> None: ... -def sample(population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... -def random() -> float: ... -def uniform(a: float, b: float) -> float: ... -def triangular(low: float = 0.0, high: float = 1.0, - mode: float = None) -> float: ... -def betavariate(alpha: float, beta: float) -> float: ... -def expovariate(lambd: float) -> float: ... -def gammavariate(alpha: float, beta: float) -> float: ... -def gauss(mu: float, sigma: float) -> float: ... -def lognormvariate(mu: float, sigma: float) -> float: ... -def normalvariate(mu: float, sigma: float) -> float: ... -def vonmisesvariate(mu: float, kappa: float) -> float: ... -def paretovariate(alpha: float) -> float: ... -def weibullvariate(alpha: float, beta: float) -> float: ... diff --git a/stubs/3.2/re.pyi b/stubs/3.2/re.pyi deleted file mode 100644 index 33f83a689973..000000000000 --- a/stubs/3.2/re.pyi +++ /dev/null @@ -1,58 +0,0 @@ -# Stubs for re -# Ron Murawski -# 'bytes' support added by Jukka Lehtosalo - -# based on: http://docs.python.org/3.2/library/re.html -# and http://hg.python.org/cpython/file/618ea5612e83/Lib/re.py - -from typing import ( - List, Iterator, Callable, Tuple, Sequence, Dict, Union, - Generic, AnyStr, Match, Pattern -) - -# ----- re variables and constants ----- -A = 0 -ASCII = 0 -DEBUG = 0 -I = 0 -IGNORECASE = 0 -L = 0 -LOCALE = 0 -M = 0 -MULTILINE = 0 -S = 0 -DOTALL = 0 -X = 0 -VERBOSE = 0 -U = 0 -UNICODE = 0 - -class error(Exception): ... - -def compile(pattern: AnyStr, flags: int = 0) -> Pattern[AnyStr]: ... -def search(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Match[AnyStr]: ... -def match(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Match[AnyStr]: ... -def split(pattern: AnyStr, string: AnyStr, maxsplit: int = 0, - flags: int = 0) -> List[AnyStr]: ... -def findall(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> List[AnyStr]: ... - -# Return an iterator yielding match objects over all non-overlapping matches -# for the RE pattern in string. The string is scanned left-to-right, and -# matches are returned in the order found. Empty matches are included in the -# result unless they touch the beginning of another match. -def finditer(pattern: AnyStr, string: AnyStr, - flags: int = 0) -> Iterator[Match[AnyStr]]: ... - -def sub(pattern: AnyStr, repl: Union[AnyStr, Callable[[Match[AnyStr]], AnyStr]], - string: AnyStr, count: int = 0, flags: int = 0) -> AnyStr: ... - -def subn(pattern: AnyStr, repl: Union[AnyStr, Callable[[Match[AnyStr]], AnyStr]], - string: AnyStr, count: int = 0, flags: int = 0) -> Tuple[AnyStr, int]: - ... - -def escape(string: AnyStr) -> AnyStr: ... - -def purge() -> None: ... diff --git a/stubs/3.2/resource.pyi b/stubs/3.2/resource.pyi deleted file mode 100644 index bddc6df724e0..000000000000 --- a/stubs/3.2/resource.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for resource - -# NOTE: These are incomplete! - -from typing import Tuple - -RLIMIT_CORE = 0 - -def getrlimit(resource: int) -> Tuple[int, int]: ... -def setrlimit(resource: int, limits: Tuple[int, int]) -> None: ... - -# NOTE: This is an alias of OSError in Python 3.3. -class error(Exception): ... diff --git a/stubs/3.2/select.pyi b/stubs/3.2/select.pyi deleted file mode 100644 index fc3eff51bec5..000000000000 --- a/stubs/3.2/select.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for select - -# NOTE: These are incomplete! - -from typing import Any, Tuple, List, Sequence - -class error(Exception): ... - -POLLIN = 0 -POLLPRI = 0 -POLLOUT = 0 -POLLERR = 0 -POLLHUP = 0 -POLLNVAL = 0 - -class poll: - def __init__(self) -> None: ... - def register(self, fd: Any, - eventmask: int = POLLIN|POLLPRI|POLLOUT) -> None: ... - def modify(self, fd: Any, eventmask: int) -> None: ... - def unregister(self, fd: Any) -> None: ... - def poll(self, timeout: int = None) -> List[Tuple[int, int]]: ... - -def select(rlist: Sequence, wlist: Sequence, xlist: Sequence, - timeout: float = None) -> Tuple[List[int], - List[int], - List[int]]: ... diff --git a/stubs/3.2/shlex.pyi b/stubs/3.2/shlex.pyi deleted file mode 100644 index 8d6e01c27187..000000000000 --- a/stubs/3.2/shlex.pyi +++ /dev/null @@ -1,36 +0,0 @@ -# Stubs for shlex - -# Based on http://docs.python.org/3.2/library/shlex.html - -from typing import List, Tuple, Any, TextIO - -def split(s: str, comments: bool = False, - posix: bool = True) -> List[str]: ... - -class shlex: - commenters = '' - wordchars = '' - whitespace = '' - escape = '' - quotes = '' - escapedquotes = '' - whitespace_split = '' - infile = '' - instream = ... # type: TextIO - source = '' - debug = 0 - lineno = 0 - token = '' - eof = '' - - def __init__(self, instream=None, infile=None, - posix: bool = False) -> None: ... - def get_token(self) -> str: ... - def push_token(self, tok: str) -> None: ... - def read_token(self) -> str: ... - def sourcehook(self, filename: str) -> Tuple[str, TextIO]: ... - # TODO argument types - def push_source(self, newstream: Any, newfile: Any = None) -> None: ... - def pop_source(self) -> None: ... - def error_leader(self, infile: str = None, - lineno: int = None) -> None: ... diff --git a/stubs/3.2/shutil.pyi b/stubs/3.2/shutil.pyi deleted file mode 100644 index 9df4cbd4238f..000000000000 --- a/stubs/3.2/shutil.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# Stubs for shutil - -# Based on http://docs.python.org/3.2/library/shutil.html - -# 'bytes' paths are not properly supported: they don't work with all functions, -# sometimes they only work partially (broken exception messages), and the test -# cases don't use them. - -from typing import List, Iterable, Callable, Any, Tuple, Sequence, IO, AnyStr - -def copyfileobj(fsrc: IO[AnyStr], fdst: IO[AnyStr], - length: int = None) -> None: ... - -def copyfile(src: str, dst: str) -> None: ... -def copymode(src: str, dst: str) -> None: ... -def copystat(src: str, dst: str) -> None: ... -def copy(src: str, dst: str) -> None: ... -def copy2(src: str, dst: str) -> None: ... -def ignore_patterns(*patterns: str) -> Callable[[str, List[str]], - Iterable[str]]: ... -def copytree(src: str, dst: str, symlinks: bool = False, - ignore: Callable[[str, List[str]], Iterable[str]] = None, - copy_function: Callable[[str, str], None] = copy2, - ignore_dangling_symlinks: bool = False) -> None: ... -def rmtree(path: str, ignore_errors: bool = False, - onerror: Callable[[Any, str, Any], None] = None) -> None: ... -def move(src: str, dst: str) -> None: ... - -class Error(Exception): ... - -def make_archive(base_name: str, format: str, root_dir: str = None, - base_dir: str = None, verbose: bool = False, - dry_run: bool = False, owner: str = None, group: str = None, - logger: Any = None) -> str: ... -def get_archive_formats() -> List[Tuple[str, str]]: ... -def register_archive_format(name: str, function: Any, - extra_args: Sequence[Tuple[str, Any]] = None, - description: str = None) -> None: ... -def unregister_archive_format(name: str) -> None: ... -def unpack_archive(filename: str, extract_dir: str = None, - format: str = None) -> None: ... -def register_unpack_format(name: str, extensions: List[str], function: Any, - extra_args: Sequence[Tuple[str, Any]] = None, - description: str = None) -> None: ... -def unregister_unpack_format(name: str) -> None: ... -def get_unpack_formats() -> List[Tuple[str, List[str], str]]: ... diff --git a/stubs/3.2/signal.pyi b/stubs/3.2/signal.pyi deleted file mode 100644 index 31ddb10b2380..000000000000 --- a/stubs/3.2/signal.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for signal - -# Based on http://docs.python.org/3.2/library/signal.html - -from typing import Any, overload, Callable - -SIG_DFL = 0 -SIG_IGN = 0 - -# TODO more SIG* constants (these should be platform specific?) -SIGHUP = 0 -SIGINT = 0 -SIGQUIT = 0 -SIGABRT = 0 -SIGKILL = 0 -SIGALRM = 0 -SIGTERM = 0 - -SIGUSR1 = 0 -SIGUSR2 = 0 -SIGCONT = 0 -SIGSTOP = 0 - -SIGPOLL = 0 -SIGVTALRM = 0 - -CTRL_C_EVENT = 0 # Windows -CTRL_BREAK_EVENT = 0 # Windows - -NSIG = 0 -ITIMER_REAL = 0 -ITIMER_VIRTUAL = 0 -ITIMER_PROF = 0 - -class ItimerError(IOError): ... - -def alarm(time: int) -> int: ... # Unix -def getsignal(signalnum: int) -> Any: ... -def pause() -> None: ... # Unix -#def setitimer(which: int, seconds: float, -# internval: float = None) -> Tuple[float, float]: ... # Unix -#def getitimer(int which): ... # Unix -def set_wakeup_fd(fd: int) -> None: ... -def siginterrupt(signalnum: int, flag: bool) -> None: ... - -@overload -def signal(signalnum: int, handler: int) -> Any: ... -@overload -def signal(signalnum: int, - handler: Callable[[int, Any], None]) -> Any: - ... # TODO frame object type diff --git a/stubs/3.2/smtplib.pyi b/stubs/3.2/smtplib.pyi deleted file mode 100644 index fd510df152be..000000000000 --- a/stubs/3.2/smtplib.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# Stubs for smtplib (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class SMTPException(OSError): ... -class SMTPServerDisconnected(SMTPException): ... - -class SMTPResponseException(SMTPException): - smtp_code = ... # type: Any - smtp_error = ... # type: Any - args = ... # type: Any - def __init__(self, code, msg): ... - -class SMTPSenderRefused(SMTPResponseException): - smtp_code = ... # type: Any - smtp_error = ... # type: Any - sender = ... # type: Any - args = ... # type: Any - def __init__(self, code, msg, sender): ... - -class SMTPRecipientsRefused(SMTPException): - recipients = ... # type: Any - args = ... # type: Any - def __init__(self, recipients): ... - -class SMTPDataError(SMTPResponseException): ... -class SMTPConnectError(SMTPResponseException): ... -class SMTPHeloError(SMTPResponseException): ... -class SMTPAuthenticationError(SMTPResponseException): ... - -def quoteaddr(addrstring): ... -def quotedata(data): ... - -class SMTP: - debuglevel = ... # type: Any - file = ... # type: Any - helo_resp = ... # type: Any - ehlo_msg = ... # type: Any - ehlo_resp = ... # type: Any - does_esmtp = ... # type: Any - default_port = ... # type: Any - timeout = ... # type: Any - esmtp_features = ... # type: Any - source_address = ... # type: Any - local_hostname = ... # type: Any - def __init__(self, host='', port=0, local_hostname=None, timeout=..., - source_address=None): ... - def __enter__(self): ... - def __exit__(self, *args): ... - def set_debuglevel(self, debuglevel): ... - sock = ... # type: Any - def connect(self, host='', port=0, source_address=None): ... - def send(self, s): ... - def putcmd(self, cmd, args=''): ... - def getreply(self): ... - def docmd(self, cmd, args=''): ... - def helo(self, name=''): ... - def ehlo(self, name=''): ... - def has_extn(self, opt): ... - def help(self, args=''): ... - def rset(self): ... - def noop(self): ... - def mail(self, sender, options=...): ... - def rcpt(self, recip, options=...): ... - def data(self, msg): ... - def verify(self, address): ... - vrfy = ... # type: Any - def expn(self, address): ... - def ehlo_or_helo_if_needed(self): ... - def login(self, user, password): ... - def starttls(self, keyfile=None, certfile=None, context=None): ... - def sendmail(self, from_addr, to_addrs, msg, mail_options=..., - rcpt_options=...): ... - def send_message(self, msg, from_addr=None, to_addrs=None, mail_options=..., - rcpt_options=...): ... - def close(self): ... - def quit(self): ... - -class SMTP_SSL(SMTP): - default_port = ... # type: Any - keyfile = ... # type: Any - certfile = ... # type: Any - context = ... # type: Any - def __init__(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None, - timeout=..., source_address=None, context=None): ... - -class LMTP(SMTP): - ehlo_msg = ... # type: Any - def __init__(self, host='', port=..., local_hostname=None, source_address=None): ... - sock = ... # type: Any - file = ... # type: Any - def connect(self, host='', port=0, source_address=None): ... diff --git a/stubs/3.2/socket.pyi b/stubs/3.2/socket.pyi deleted file mode 100644 index 6a9d140f2ce8..000000000000 --- a/stubs/3.2/socket.pyi +++ /dev/null @@ -1,387 +0,0 @@ -# Stubs for socket -# Ron Murawski - -# based on: http://docs.python.org/3.2/library/socket.html -# see: http://hg.python.org/cpython/file/3d0686d90f55/Lib/socket.py -# see: http://nullege.com/codes/search/socket - -from typing import Any, Tuple, overload, List - -# ----- variables and constants ----- - -AF_UNIX = 0 -AF_INET = 0 -AF_INET6 = 0 -SOCK_STREAM = 0 -SOCK_DGRAM = 0 -SOCK_RAW = 0 -SOCK_RDM = 0 -SOCK_SEQPACKET = 0 -SOCK_CLOEXEC = 0 -SOCK_NONBLOCK = 0 -SOMAXCONN = 0 -has_ipv6 = False -_GLOBAL_DEFAULT_TIMEOUT = 0.0 -SocketType = ... # type: Any -SocketIO = ... # type: Any - - -# the following constants are included with Python 3.2.3 (Ubuntu) -# some of the constants may be Linux-only -# all Windows/Mac-specific constants are absent -AF_APPLETALK = 0 -AF_ASH = 0 -AF_ATMPVC = 0 -AF_ATMSVC = 0 -AF_AX25 = 0 -AF_BLUETOOTH = 0 -AF_BRIDGE = 0 -AF_DECnet = 0 -AF_ECONET = 0 -AF_IPX = 0 -AF_IRDA = 0 -AF_KEY = 0 -AF_LLC = 0 -AF_NETBEUI = 0 -AF_NETLINK = 0 -AF_NETROM = 0 -AF_PACKET = 0 -AF_PPPOX = 0 -AF_ROSE = 0 -AF_ROUTE = 0 -AF_SECURITY = 0 -AF_SNA = 0 -AF_TIPC = 0 -AF_UNSPEC = 0 -AF_WANPIPE = 0 -AF_X25 = 0 -AI_ADDRCONFIG = 0 -AI_ALL = 0 -AI_CANONNAME = 0 -AI_NUMERICHOST = 0 -AI_NUMERICSERV = 0 -AI_PASSIVE = 0 -AI_V4MAPPED = 0 -BDADDR_ANY = 0 -BDADDR_LOCAL = 0 -BTPROTO_HCI = 0 -BTPROTO_L2CAP = 0 -BTPROTO_RFCOMM = 0 -BTPROTO_SCO = 0 -CAPI = 0 -EAGAIN = 0 -EAI_ADDRFAMILY = 0 -EAI_AGAIN = 0 -EAI_BADFLAGS = 0 -EAI_FAIL = 0 -EAI_FAMILY = 0 -EAI_MEMORY = 0 -EAI_NODATA = 0 -EAI_NONAME = 0 -EAI_OVERFLOW = 0 -EAI_SERVICE = 0 -EAI_SOCKTYPE = 0 -EAI_SYSTEM = 0 -EBADF = 0 -EINTR = 0 -EWOULDBLOCK = 0 -HCI_DATA_DIR = 0 -HCI_FILTER = 0 -HCI_TIME_STAMP = 0 -INADDR_ALLHOSTS_GROUP = 0 -INADDR_ANY = 0 -INADDR_BROADCAST = 0 -INADDR_LOOPBACK = 0 -INADDR_MAX_LOCAL_GROUP = 0 -INADDR_NONE = 0 -INADDR_UNSPEC_GROUP = 0 -IPPORT_RESERVED = 0 -IPPORT_USERRESERVED = 0 -IPPROTO_AH = 0 -IPPROTO_DSTOPTS = 0 -IPPROTO_EGP = 0 -IPPROTO_ESP = 0 -IPPROTO_FRAGMENT = 0 -IPPROTO_GRE = 0 -IPPROTO_HOPOPTS = 0 -IPPROTO_ICMP = 0 -IPPROTO_ICMPV6 = 0 -IPPROTO_IDP = 0 -IPPROTO_IGMP = 0 -IPPROTO_IP = 0 -IPPROTO_IPIP = 0 -IPPROTO_IPV6 = 0 -IPPROTO_NONE = 0 -IPPROTO_PIM = 0 -IPPROTO_PUP = 0 -IPPROTO_RAW = 0 -IPPROTO_ROUTING = 0 -IPPROTO_RSVP = 0 -IPPROTO_TCP = 0 -IPPROTO_TP = 0 -IPPROTO_UDP = 0 -IPV6_CHECKSUM = 0 -IPV6_DSTOPTS = 0 -IPV6_HOPLIMIT = 0 -IPV6_HOPOPTS = 0 -IPV6_JOIN_GROUP = 0 -IPV6_LEAVE_GROUP = 0 -IPV6_MULTICAST_HOPS = 0 -IPV6_MULTICAST_IF = 0 -IPV6_MULTICAST_LOOP = 0 -IPV6_NEXTHOP = 0 -IPV6_PKTINFO = 0 -IPV6_RECVDSTOPTS = 0 -IPV6_RECVHOPLIMIT = 0 -IPV6_RECVHOPOPTS = 0 -IPV6_RECVPKTINFO = 0 -IPV6_RECVRTHDR = 0 -IPV6_RECVTCLASS = 0 -IPV6_RTHDR = 0 -IPV6_RTHDRDSTOPTS = 0 -IPV6_RTHDR_TYPE_0 = 0 -IPV6_TCLASS = 0 -IPV6_UNICAST_HOPS = 0 -IPV6_V6ONLY = 0 -IP_ADD_MEMBERSHIP = 0 -IP_DEFAULT_MULTICAST_LOOP = 0 -IP_DEFAULT_MULTICAST_TTL = 0 -IP_DROP_MEMBERSHIP = 0 -IP_HDRINCL = 0 -IP_MAX_MEMBERSHIPS = 0 -IP_MULTICAST_IF = 0 -IP_MULTICAST_LOOP = 0 -IP_MULTICAST_TTL = 0 -IP_OPTIONS = 0 -IP_RECVOPTS = 0 -IP_RECVRETOPTS = 0 -IP_RETOPTS = 0 -IP_TOS = 0 -IP_TTL = 0 -MSG_CTRUNC = 0 -MSG_DONTROUTE = 0 -MSG_DONTWAIT = 0 -MSG_EOR = 0 -MSG_OOB = 0 -MSG_PEEK = 0 -MSG_TRUNC = 0 -MSG_WAITALL = 0 -NETLINK_DNRTMSG = 0 -NETLINK_FIREWALL = 0 -NETLINK_IP6_FW = 0 -NETLINK_NFLOG = 0 -NETLINK_ROUTE = 0 -NETLINK_USERSOCK = 0 -NETLINK_XFRM = 0 -NI_DGRAM = 0 -NI_MAXHOST = 0 -NI_MAXSERV = 0 -NI_NAMEREQD = 0 -NI_NOFQDN = 0 -NI_NUMERICHOST = 0 -NI_NUMERICSERV = 0 -PACKET_BROADCAST = 0 -PACKET_FASTROUTE = 0 -PACKET_HOST = 0 -PACKET_LOOPBACK = 0 -PACKET_MULTICAST = 0 -PACKET_OTHERHOST = 0 -PACKET_OUTGOING = 0 -PF_PACKET = 0 -SHUT_RD = 0 -SHUT_RDWR = 0 -SHUT_WR = 0 -SOL_HCI = 0 -SOL_IP = 0 -SOL_SOCKET = 0 -SOL_TCP = 0 -SOL_TIPC = 0 -SOL_UDP = 0 -SO_ACCEPTCONN = 0 -SO_BROADCAST = 0 -SO_DEBUG = 0 -SO_DONTROUTE = 0 -SO_ERROR = 0 -SO_KEEPALIVE = 0 -SO_LINGER = 0 -SO_OOBINLINE = 0 -SO_RCVBUF = 0 -SO_RCVLOWAT = 0 -SO_RCVTIMEO = 0 -SO_REUSEADDR = 0 -SO_SNDBUF = 0 -SO_SNDLOWAT = 0 -SO_SNDTIMEO = 0 -SO_TYPE = 0 -TCP_CORK = 0 -TCP_DEFER_ACCEPT = 0 -TCP_INFO = 0 -TCP_KEEPCNT = 0 -TCP_KEEPIDLE = 0 -TCP_KEEPINTVL = 0 -TCP_LINGER2 = 0 -TCP_MAXSEG = 0 -TCP_NODELAY = 0 -TCP_QUICKACK = 0 -TCP_SYNCNT = 0 -TCP_WINDOW_CLAMP = 0 -TIPC_ADDR_ID = 0 -TIPC_ADDR_NAME = 0 -TIPC_ADDR_NAMESEQ = 0 -TIPC_CFG_SRV = 0 -TIPC_CLUSTER_SCOPE = 0 -TIPC_CONN_TIMEOUT = 0 -TIPC_CRITICAL_IMPORTANCE = 0 -TIPC_DEST_DROPPABLE = 0 -TIPC_HIGH_IMPORTANCE = 0 -TIPC_IMPORTANCE = 0 -TIPC_LOW_IMPORTANCE = 0 -TIPC_MEDIUM_IMPORTANCE = 0 -TIPC_NODE_SCOPE = 0 -TIPC_PUBLISHED = 0 -TIPC_SRC_DROPPABLE = 0 -TIPC_SUBSCR_TIMEOUT = 0 -TIPC_SUB_CANCEL = 0 -TIPC_SUB_PORTS = 0 -TIPC_SUB_SERVICE = 0 -TIPC_TOP_SRV = 0 -TIPC_WAIT_FOREVER = 0 -TIPC_WITHDRAWN = 0 -TIPC_ZONE_SCOPE = 0 - - -# ----- exceptions ----- -class error(IOError): - ... - -class herror(error): - def __init__(self, herror: int, string: str) -> None: ... - -class gaierror(error): - def __init__(self, error: int, string: str) -> None: ... - -class timeout(error): - ... - - -# Addresses can be either tuples of varying lengths (AF_INET, AF_INET6, -# AF_NETLINK, AF_TIPC) or strings (AF_UNIX). - -# TODO AF_PACKET and AF_BLUETOOTH address objects - - -# ----- classes ----- -class socket: - family = 0 - type = 0 - proto = 0 - - def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, - proto: int = 0, fileno: int = None) -> None: ... - - # --- methods --- - # second tuple item is an address - def accept(self) -> Tuple['socket', Any]: ... - - @overload - def bind(self, address: tuple) -> None: ... - @overload - def bind(self, address: str) -> None: ... - - def close(self) -> None: ... - - @overload - def connect(self, address: tuple) -> None: ... - @overload - def connect(self, address: str) -> None: ... - - @overload - def connect_ex(self, address: tuple) -> int: ... - @overload - def connect_ex(self, address: str) -> int: ... - - def detach(self) -> int: ... - def fileno(self) -> int: ... - - # return value is an address - def getpeername(self) -> Any: ... - def getsockname(self) -> Any: ... - - @overload - def getsockopt(self, level: int, optname: str) -> bytes: ... - @overload - def getsockopt(self, level: int, optname: str, buflen: int) -> bytes: ... - - def gettimeout(self) -> float: ... - def ioctl(self, control: object, - option: Tuple[int, int, int]) -> None: ... - def listen(self, backlog: int) -> None: ... - # TODO the return value may be BinaryIO or TextIO, depending on mode - def makefile(self, mode: str = 'r', buffering: int = None, - encoding: str = None, errors: str = None, - newline: str = None) -> Any: - ... - def recv(self, bufsize: int, flags: int = 0) -> bytes: ... - - # return type is an address - def recvfrom(self, bufsize: int, flags: int = 0) -> Any: ... - def recvfrom_into(self, buffer: bytes, nbytes: int, - flags: int = 0) -> Any: ... - def recv_into(self, buffer: bytes, nbytes: int, - flags: int = 0) -> Any: ... - def send(self, data: bytes, flags=0) -> int: ... - def sendall(self, data: bytes, flags=0) -> Any: - ... # return type: None on success - - @overload - def sendto(self, data: bytes, address: tuple, flags: int = 0) -> int: ... - @overload - def sendto(self, data: bytes, address: str, flags: int = 0) -> int: ... - - def setblocking(self, flag: bool) -> None: ... - # TODO None valid for the value argument - def settimeout(self, value: float) -> None: ... - - @overload - def setsockopt(self, level: int, optname: str, value: int) -> None: ... - @overload - def setsockopt(self, level: int, optname: str, value: bytes) -> None: ... - - def shutdown(self, how: int) -> None: ... - - -# ----- functions ----- -def create_connection(address: Tuple[str, int], - timeout: float = _GLOBAL_DEFAULT_TIMEOUT, - source_address: Tuple[str, int] = None) -> socket: ... - -# the 5th tuple item is an address -def getaddrinfo( - host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, - flags: int = 0) -> List[Tuple[int, int, int, str, tuple]]: - ... - -def getfqdn(name: str = '') -> str: ... -def gethostbyname(hostname: str) -> str: ... -def gethostbyname_ex(hostname: str) -> Tuple[str, List[str], List[str]]: ... -def gethostname() -> str: ... -def gethostbyaddr(ip_address: str) -> Tuple[str, List[str], List[str]]: ... -def getnameinfo(sockaddr: tuple, flags: int) -> Tuple[str, int]: ... -def getprotobyname(protocolname: str) -> int: ... -def getservbyname(servicename: str, protocolname: str = None) -> int: ... -def getservbyport(port: int, protocolname: str = None) -> str: ... -def socketpair(family: int = AF_INET, - type: int = SOCK_STREAM, - proto: int = 0) -> Tuple[socket, socket]: ... -def fromfd(fd: int, family: int, type: int, proto: int = 0) -> socket: ... -def ntohl(x: int) -> int: ... # param & ret val are 32-bit ints -def ntohs(x: int) -> int: ... # param & ret val are 16-bit ints -def htonl(x: int) -> int: ... # param & ret val are 32-bit ints -def htons(x: int) -> int: ... # param & ret val are 16-bit ints -def inet_aton(ip_string: str) -> bytes: ... # ret val 4 bytes in length -def inet_ntoa(packed_ip: bytes) -> str: ... -def inet_pton(address_family: int, ip_string: str) -> bytes: ... -def inet_ntop(address_family: int, packed_ip: bytes) -> str: ... -# TODO the timeout may be None -def getdefaulttimeout() -> float: ... -def setdefaulttimeout(timeout: float) -> None: ... diff --git a/stubs/3.2/socketserver.pyi b/stubs/3.2/socketserver.pyi deleted file mode 100644 index ca59357b83c7..000000000000 --- a/stubs/3.2/socketserver.pyi +++ /dev/null @@ -1,15 +0,0 @@ -# Stubs for socketserver - -# NOTE: These are incomplete! - -from typing import Tuple - -class BaseRequestHandler(): ... - -class TCPServer(): - def __init__( - self, - server_address: Tuple[str, int], - request_handler: BaseRequestHandler, - bind_and_activate: bool = True, - ) -> None: ... diff --git a/stubs/3.2/ssl.pyi b/stubs/3.2/ssl.pyi deleted file mode 100644 index 1ba5dbbc3e12..000000000000 --- a/stubs/3.2/ssl.pyi +++ /dev/null @@ -1,202 +0,0 @@ -# Stubs for ssl (Python 3.4) - -from typing import Any -from enum import Enum as _Enum -from socket import socket -from collections import namedtuple - -class SSLError(OSError): ... -class SSLEOFError(SSLError): ... -class SSLSyscallError(SSLError): ... -class SSLWantReadError(SSLError): ... -class SSLWantWriteError(SSLError): ... -class SSLZeroReturnError(SSLError): ... - -OPENSSL_VERSION = ... # type: str -OPENSSL_VERSION_INFO = ... # type: Any -OPENSSL_VERSION_NUMBER = ... # type: int - -VERIFY_CRL_CHECK_CHAIN = ... # type: int -VERIFY_CRL_CHECK_LEAF = ... # type: int -VERIFY_DEFAULT = ... # type: int -VERIFY_X509_STRICT = ... # type: int - -ALERT_DESCRIPTION_ACCESS_DENIED = ... # type: int -ALERT_DESCRIPTION_BAD_CERTIFICATE = ... # type: int -ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = ... # type: int -ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = ... # type: int -ALERT_DESCRIPTION_BAD_RECORD_MAC = ... # type: int -ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = ... # type: int -ALERT_DESCRIPTION_CERTIFICATE_REVOKED = ... # type: int -ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = ... # type: int -ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = ... # type: int -ALERT_DESCRIPTION_CLOSE_NOTIFY = ... # type: int -ALERT_DESCRIPTION_DECODE_ERROR = ... # type: int -ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = ... # type: int -ALERT_DESCRIPTION_DECRYPT_ERROR = ... # type: int -ALERT_DESCRIPTION_HANDSHAKE_FAILURE = ... # type: int -ALERT_DESCRIPTION_ILLEGAL_PARAMETER = ... # type: int -ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = ... # type: int -ALERT_DESCRIPTION_INTERNAL_ERROR = ... # type: int -ALERT_DESCRIPTION_NO_RENEGOTIATION = ... # type: int -ALERT_DESCRIPTION_PROTOCOL_VERSION = ... # type: int -ALERT_DESCRIPTION_RECORD_OVERFLOW = ... # type: int -ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = ... # type: int -ALERT_DESCRIPTION_UNKNOWN_CA = ... # type: int -ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = ... # type: int -ALERT_DESCRIPTION_UNRECOGNIZED_NAME = ... # type: int -ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = ... # type: int -ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = ... # type: int -ALERT_DESCRIPTION_USER_CANCELLED = ... # type: int - -OP_ALL = ... # type: int -OP_CIPHER_SERVER_PREFERENCE = ... # type: int -OP_NO_COMPRESSION = ... # type: int -OP_NO_SSLv2 = ... # type: int -OP_NO_SSLv3 = ... # type: int -OP_NO_TLSv1 = ... # type: int -OP_NO_TLSv1_1 = ... # type: int -OP_NO_TLSv1_2 = ... # type: int -OP_SINGLE_DH_USE = ... # type: int -OP_SINGLE_ECDH_USE = ... # type: int - -SSL_ERROR_EOF = ... # type: int -SSL_ERROR_INVALID_ERROR_CODE = ... # type: int -SSL_ERROR_SSL = ... # type: int -SSL_ERROR_SYSCALL = ... # type: int -SSL_ERROR_WANT_CONNECT = ... # type: int -SSL_ERROR_WANT_READ = ... # type: int -SSL_ERROR_WANT_WRITE = ... # type: int -SSL_ERROR_WANT_X509_LOOKUP = ... # type: int -SSL_ERROR_ZERO_RETURN = ... # type: int - -CERT_NONE = ... # type: int -CERT_OPTIONAL = ... # type: int -CERT_REQUIRED = ... # type: int - -PROTOCOL_SSLv23 = ... # type: int -PROTOCOL_SSLv3 = ... # type: int -PROTOCOL_TLSv1 = ... # type: int -PROTOCOL_TLSv1_1 = ... # type: int -PROTOCOL_TLSv1_2 = ... # type: int - -HAS_ECDH = ... # type: bool -HAS_NPN = ... # type: bool -HAS_SNI = ... # type: bool - -def RAND_add(string, entropy): ... -def RAND_bytes(n): ... -def RAND_egd(path): ... -def RAND_pseudo_bytes(n): ... -def RAND_status(): ... - -socket_error = OSError - -CHANNEL_BINDING_TYPES = ... # type: Any - -class CertificateError(ValueError): ... - -def match_hostname(cert, hostname): ... - -DefaultVerifyPaths = namedtuple( - 'DefaultVerifyPaths', - 'cafile capath openssl_cafile_env openssl_cafile openssl_capath_env openssl_capath') - -def get_default_verify_paths(): ... - -class _ASN1Object: - def __new__(cls, oid): ... - @classmethod - def fromnid(cls, nid): ... - @classmethod - def fromname(cls, name): ... - -class Purpose(_ASN1Object, _Enum): - SERVER_AUTH = ... # type: Any - CLIENT_AUTH = ... # type: Any - -class _SSLContext: - check_hostname = ... # type: Any - options = ... # type: Any - verify_flags = ... # type: Any - verify_mode = ... # type: Any - def __init__(self, *args, **kwargs): ... - def _set_npn_protocols(self, *args, **kwargs): ... - def _wrap_socket(self, *args, **kwargs): ... - def cert_store_stats(self): ... - def get_ca_certs(self, binary_form=False): ... - def load_cert_chain(self, *args, **kwargs): ... - def load_dh_params(self, *args, **kwargs): ... - def load_verify_locations(self, *args, **kwargs): ... - def session_stats(self, *args, **kwargs): ... - def set_ciphers(self, *args, **kwargs): ... - def set_default_verify_paths(self, *args, **kwargs): ... - def set_ecdh_curve(self, *args, **kwargs): ... - def set_servername_callback(self, method): ... - -class SSLContext(_SSLContext): - def __new__(cls, protocol, *args, **kwargs): ... - protocol = ... # type: Any - def __init__(self, protocol): ... - def wrap_socket(self, sock, server_side=False, do_handshake_on_connect=True, - suppress_ragged_eofs=True, server_hostname=None): ... - def set_npn_protocols(self, npn_protocols): ... - def load_default_certs(self, purpose=...): ... - -def create_default_context(purpose=..., *, cafile=None, capath=None, cadata=None): ... - -class SSLSocket(socket): - keyfile = ... # type: Any - certfile = ... # type: Any - cert_reqs = ... # type: Any - ssl_version = ... # type: Any - ca_certs = ... # type: Any - ciphers = ... # type: Any - server_side = ... # type: Any - server_hostname = ... # type: Any - do_handshake_on_connect = ... # type: Any - suppress_ragged_eofs = ... # type: Any - context = ... # type: Any # TODO: This should be a property. - def __init__(self, sock=None, keyfile=None, certfile=None, server_side=False, - cert_reqs=..., ssl_version=..., ca_certs=None, - do_handshake_on_connect=True, family=..., type=..., proto=0, - fileno=None, suppress_ragged_eofs=True, npn_protocols=None, ciphers=None, - server_hostname=None, _context=None): ... - def dup(self): ... - def read(self, len=0, buffer=None): ... - def write(self, data): ... - def getpeercert(self, binary_form=False): ... - def selected_npn_protocol(self): ... - def cipher(self): ... - def compression(self): ... - def send(self, data, flags=0): ... - def sendto(self, data, flags_or_addr, addr=None): ... - def sendmsg(self, *args, **kwargs): ... - def sendall(self, data, flags=0): ... - def recv(self, buflen=1024, flags=0): ... - def recv_into(self, buffer, nbytes=None, flags=0): ... - def recvfrom(self, buflen=1024, flags=0): ... - def recvfrom_into(self, buffer, nbytes=None, flags=0): ... - def recvmsg(self, *args, **kwargs): ... - def recvmsg_into(self, *args, **kwargs): ... - def pending(self): ... - def shutdown(self, how): ... - def unwrap(self): ... - def do_handshake(self, block=False): ... - def connect(self, addr): ... - def connect_ex(self, addr): ... - def accept(self): ... - def get_channel_binding(self, cb_type=''): ... - -def wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=..., - ssl_version=..., ca_certs=None, do_handshake_on_connect=True, - suppress_ragged_eofs=True, ciphers=None): ... -def cert_time_to_seconds(cert_time): ... - -PEM_HEADER = ... # type: Any -PEM_FOOTER = ... # type: Any - -def DER_cert_to_PEM_cert(der_cert_bytes): ... -def PEM_cert_to_DER_cert(pem_cert_string): ... -def get_server_certificate(addr, ssl_version=..., ca_certs=None): ... -def get_protocol_name(protocol_code): ... diff --git a/stubs/3.2/stat.pyi b/stubs/3.2/stat.pyi deleted file mode 100644 index eadffb908a04..000000000000 --- a/stubs/3.2/stat.pyi +++ /dev/null @@ -1,71 +0,0 @@ -# Stubs for stat - -# Based on http://docs.python.org/3.2/library/stat.html - -import typing - -def S_ISDIR(mode: int) -> bool: ... -def S_ISCHR(mode: int) -> bool: ... -def S_ISBLK(mode: int) -> bool: ... -def S_ISREG(mode: int) -> bool: ... -def S_ISFIFO(mode: int) -> bool: ... -def S_ISLNK(mode: int) -> bool: ... -def S_ISSOCK(mode: int) -> bool: ... - -def S_IMODE(mode: int) -> int: ... -def S_IFMT(mode) -> int: ... - -ST_MODE = 0 -ST_INO = 0 -ST_DEV = 0 -ST_NLINK = 0 -ST_UID = 0 -ST_GID = 0 -ST_SIZE = 0 -ST_ATIME = 0 -ST_MTIME = 0 -ST_CTIME = 0 - -S_IFSOCK = 0 -S_IFLNK = 0 -S_IFREG = 0 -S_IFBLK = 0 -S_IFDIR = 0 -S_IFCHR = 0 -S_IFIFO = 0 -S_ISUID = 0 -S_ISGID = 0 -S_ISVTX = 0 - -S_IRWXU = 0 -S_IRUSR = 0 -S_IWUSR = 0 -S_IXUSR = 0 - -S_IRWXG = 0 -S_IRGRP = 0 -S_IWGRP = 0 -S_IXGRP = 0 - -S_IRWXO = 0 -S_IROTH = 0 -S_IWOTH = 0 -S_IXOTH = 0 - -S_ENFMT = 0 -S_IREAD = 0 -S_IWRITE = 0 -S_IEXEC = 0 - -UF_NODUMP = 0 -UF_IMMUTABLE = 0 -UF_APPEND = 0 -UF_OPAQUE = 0 -UF_NOUNLINK = 0 -#int UF_COMPRESSED # OS X 10.6+ only -#int UF_HIDDEN # OX X 10.5+ only -SF_ARCHIVED = 0 -SF_IMMUTABLE = 0 -SF_APPEND = 0 -SF_NOUNLINK = 0 -SF_SNAPSHOT = 0 diff --git a/stubs/3.2/string.pyi b/stubs/3.2/string.pyi deleted file mode 100644 index 4ce4b33d8968..000000000000 --- a/stubs/3.2/string.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for string - -# Based on http://docs.python.org/3.2/library/string.html - -from typing import Mapping - -ascii_letters = '' -ascii_lowercase = '' -ascii_uppercase = '' -digits = '' -hexdigits = '' -octdigits = '' -punctuation = '' -printable = '' -whitespace = '' - -def capwords(s: str, sep: str = None) -> str: ... - -class Template: - template = '' - - def __init__(self, template: str) -> None: ... - def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... - def safe_substitute(self, mapping: Mapping[str, str], - **kwds: str) -> str: ... - -# TODO Formatter diff --git a/stubs/3.2/struct.pyi b/stubs/3.2/struct.pyi deleted file mode 100644 index 95fc2eb70000..000000000000 --- a/stubs/3.2/struct.pyi +++ /dev/null @@ -1,30 +0,0 @@ -# Stubs for struct - -# Based on http://docs.python.org/3.2/library/struct.html - -from typing import overload, Any, AnyStr, Tuple - -class error(Exception): ... - -def pack(fmt: AnyStr, *v: Any) -> bytes: ... -# TODO buffer type -def pack_into(fmt: AnyStr, buffer: Any, offset: int, *v: Any) -> None: ... - -# TODO buffer type -def unpack(fmt: AnyStr, buffer: Any) -> Tuple[Any, ...]: ... -def unpack_from(fmt: AnyStr, buffer: Any, offset: int = 0) -> Tuple[Any, ...]: ... - -def calcsize(fmt: AnyStr) -> int: ... - -class Struct: - format = b'' - size = 0 - - def __init__(self, format: AnyStr) -> None: ... - - def pack(self, *v: Any) -> bytes: ... - # TODO buffer type - def pack_into(self, buffer: Any, offset: int, *v: Any) -> None: ... - # TODO buffer type - def unpack(self, buffer: Any) -> Tuple[Any, ...]: ... - def unpack_from(self, buffer: Any, offset: int = 0) -> Tuple[Any, ...]: ... diff --git a/stubs/3.2/subprocess.pyi b/stubs/3.2/subprocess.pyi deleted file mode 100644 index d34fe3d40474..000000000000 --- a/stubs/3.2/subprocess.pyi +++ /dev/null @@ -1,71 +0,0 @@ -# Stubs for subprocess - -# Based on http://docs.python.org/3.2/library/subprocess.html - -from typing import Sequence, Any, Mapping, Callable, Tuple, IO - -# TODO force keyword arguments -# TODO more keyword arguments -def call(args: Sequence[str], *, stdin: Any = None, stdout: Any = None, - stderr: Any = None, shell: bool = False, - env: Mapping[str, str] = None, - cwd: str = None) -> int: ... -def check_call(args: Sequence[str], *, stdin: Any = None, stdout: Any = None, - stderr: Any = None, shell: bool = False, - env: Mapping[str, str] = None) -> int: ... -# Return str/bytes -def check_output(args: Sequence[str], *, stdin: Any = None, stderr: Any = None, - shell: bool = False, universal_newlines: bool = False, - env: Mapping[str, str] = None) -> Any: ... - -# TODO types -PIPE = ... # type: Any -STDOUT = ... # type: Any - -class CalledProcessError(Exception): - returncode = 0 - cmd = '' - output = b'' # May be None - - def __init__(self, returncode: int, cmd: str, output: str) -> None: ... - -class Popen: - stdin = ... # type: IO[Any] - stdout = ... # type: IO[Any] - stderr = ... # type: IO[Any] - pid = 0 - returncode = 0 - - def __init__(self, - args: Sequence[str], - bufsize: int = 0, - executable: str = None, - stdin: Any = None, - stdout: Any = None, - stderr: Any = None, - preexec_fn: Callable[[], Any] = None, - close_fds: bool = True, - shell: bool = False, - cwd: str = None, - env: Mapping[str, str] = None, - universal_newlines: bool = False, - startupinfo: Any = None, - creationflags: int = 0, - restore_signals: bool = True, - start_new_session: bool = False, - pass_fds: Any = ()) -> None: ... - - def poll(self) -> int: ... - def wait(self) -> int: ... - # Return str/bytes - def communicate(self, input=None) -> Tuple[Any, Any]: ... - def send_signal(self, signal: int) -> None: ... - def terminatate(self) -> None: ... - def kill(self) -> None: ... - def __enter__(self) -> 'Popen': ... - def __exit__(self, type, value, traceback) -> bool: ... - -def getstatusoutput(cmd: str) -> Tuple[int, str]: ... -def getoutput(cmd: str) -> str: ... - -# Windows-only: STARTUPINFO etc. diff --git a/stubs/3.2/sys.pyi b/stubs/3.2/sys.pyi deleted file mode 100644 index 210216bd3ebc..000000000000 --- a/stubs/3.2/sys.pyi +++ /dev/null @@ -1,154 +0,0 @@ -# Stubs for sys -# Ron Murawski - -# based on http://docs.python.org/3.2/library/sys.html - -from typing import ( - List, Sequence, Any, Dict, Tuple, TextIO, overload, Optional -) -from types import TracebackType - -# ----- sys variables ----- -abiflags = '' -argv = ... # type: List[str] -byteorder = '' -builtin_module_names = ... # type: Sequence[str] # actually a tuple of strings -copyright = '' -#dllhandle = 0 # Windows only -dont_write_bytecode = False -__displayhook__ = ... # type: Any # contains the original value of displayhook -__excepthook__ = ... # type: Any # contains the original value of excepthook -exec_prefix = '' -executable = '' -float_repr_style = '' -hexversion = 0 # this is a 32-bit int -last_type = ... # type: Any -last_value = ... # type: Any -last_traceback = ... # type: Any -maxsize = 0 -maxunicode = 0 -meta_path = ... # type: List[Any] -modules = ... # type: Dict[str, Any] -path = ... # type: List[str] -path_hooks = ... # type: List[Any] # TODO precise type; function, path to finder -path_importer_cache = ... # type: Dict[str, Any] # TODO precise type -platform = '' -prefix = '' -ps1 = '' -ps2 = '' -stdin = ... # type: TextIO -stdout = ... # type: TextIO -stderr = ... # type: TextIO -__stdin__ = ... # type: TextIO -__stdout__ = ... # type: TextIO -__stderr__ = ... # type: TextIO -# deprecated and removed in Python 3.3: -subversion = ... # type: Tuple[str, str, str] -tracebacklimit = 0 -version = '' -api_version = 0 -warnoptions = ... # type: Any -# Each entry is a tuple of the form (action, message, category, module, -# lineno) -#winver = '' # Windows only -_xoptions = ... # type: Dict[Any, Any] - -flags = ... # type: _flags -class _flags: - debug = 0 - division_warning = 0 - inspect = 0 - interactive = 0 - optimize = 0 - dont_write_bytecode = 0 - no_user_site = 0 - no_site = 0 - ignore_environment = 0 - verbose = 0 - bytes_warning = 0 - quiet = 0 - hash_randomization = 0 - -float_info = ... # type: _float_info -class _float_info: - epsilon = 0.0 # DBL_EPSILON - dig = 0 # DBL_DIG - mant_dig = 0 # DBL_MANT_DIG - max = 0.0 # DBL_MAX - max_exp = 0 # DBL_MAX_EXP - max_10_exp = 0 # DBL_MAX_10_EXP - min = 0.0 # DBL_MIN - min_exp = 0 # DBL_MIN_EXP - min_10_exp = 0 # DBL_MIN_10_EXP - radix = 0 # FLT_RADIX - rounds = 0 # FLT_ROUNDS - -hash_info = ... # type: _hash_info -class _hash_info: - width = 0 # width in bits used for hash values - modulus = 0 # prime modulus P used for numeric hash scheme - inf = 0 # hash value returned for a positive infinity - nan = 0 # hash value returned for a nan - imag = 0 # multiplier used for the imaginary part of a complex number - -int_info = ... # type: _int_info -class _int_info: - bits_per_digit = 0 # number of bits held in each digit. Python integers - # are stored internally in - # base 2**int_info.bits_per_digit - sizeof_digit = 0 # size in bytes of C type used to represent a digit - -class _version_info(Tuple[int, int, int, str, int]): - major = 0 - minor = 0 - micro = 0 - releaselevel = '' - serial = 0 -version_info = ... # type: _version_info - - -# ----- sys function stubs ----- -def call_tracing(fn: Any, args: Any) -> object: ... -def _clear_type_cache() -> None: ... -def _current_frames() -> Dict[int, Any]: ... -def displayhook(value: Optional[int]) -> None: ... -def excepthook(type_: type, value: BaseException, - traceback: TracebackType) -> None: ... -def exc_info() -> Tuple[type, BaseException, TracebackType]: ... -def exit(arg: int = None) -> None: ... -def getcheckinterval() -> int: ... # deprecated -def getdefaultencoding() -> str: ... -def getdlopenflags() -> int: ... # Unix only -def getfilesystemencoding() -> str: ... # cannot return None -def getrefcount(object) -> int: ... -def getrecursionlimit() -> int: ... - -@overload -def getsizeof(obj: object) -> int: ... -@overload -def getsizeof(obj: object, default: int) -> int: ... - -def getswitchinterval() -> float: ... - -@overload -def _getframe() -> Any: ... -@overload -def _getframe(depth: int) -> Any: ... - -def getprofile() -> Any: ... # TODO return type -def gettrace() -> Any: ... # TODO return -def getwindowsversion() -> Any: ... # Windows only, TODO return type -def intern(string: str) -> str: ... -def setcheckinterval(interval: int) -> None: ... # deprecated -def setdlopenflags(n: int) -> None: ... # Linux only -def setprofile(profilefunc: Any) -> None: ... # TODO type -def setrecursionlimit(limit: int) -> None: ... -def setswitchinterval(interval: float) -> None: ... -def settrace(tracefunc: Any) -> None: ... # TODO type -# Trace functions should have three arguments: frame, event, and arg. frame -# is the current stack frame. event is a string: 'call', 'line', 'return', -# 'exception', 'c_call', 'c_return', or 'c_exception'. arg depends on the -# event type. -def settscdump(on_flag: bool) -> None: ... - -def gettotalrefcount() -> int: ... # Debug builds only diff --git a/stubs/3.2/sysconfig.pyi b/stubs/3.2/sysconfig.pyi deleted file mode 100644 index 8d7ab2cd1361..000000000000 --- a/stubs/3.2/sysconfig.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for sysconfig - -# NOTE: These are incomplete! - -import typing - -def get_config_var(name: str) -> str: ... -def is_python_build() -> bool: ... diff --git a/stubs/3.2/tarfile.pyi b/stubs/3.2/tarfile.pyi deleted file mode 100644 index 519075b07fda..000000000000 --- a/stubs/3.2/tarfile.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# TODO these are incomplete - -from typing import Any, List, overload, Callable - -class TarError(Exception): ... - -class TarInfo: - name = '' - size = 0 - uid = 0 - gid = 0 - -class TarFile: - def getmember(self, name: str) -> TarInfo: ... - def getmembers(self) -> List[TarInfo]: ... - def getnames(self) -> List[str]: ... - def extractall(self, path: str = ".", - members: List[TarInfo] = None) -> None: ... - - @overload - def extract(self, member: str, path: str = "", - set_attrs: bool = True) -> None: ... - @overload - def extract(self, member: TarInfo, path: str = "", - set_attrs: bool = True) -> None: ... - - def add(self, name: str, arcname: str = None, recursive: bool = True, - exclude: Callable[[str], bool] = None, *, - filter: 'Callable[[TarFile], TarFile]' = None) -> None: ... - def close(self) -> None: ... - -def open(name: str = None, mode: str = 'r', fileobj: Any = None, bufsize: int = 10240, - **kwargs) -> TarFile: ... diff --git a/stubs/3.2/tempfile.pyi b/stubs/3.2/tempfile.pyi deleted file mode 100644 index 1b3a123b5ccc..000000000000 --- a/stubs/3.2/tempfile.pyi +++ /dev/null @@ -1,45 +0,0 @@ -# Stubs for tempfile -# Ron Murawski - -# based on http://docs.python.org/3.3/library/tempfile.html - -from typing import Tuple, BinaryIO - -# global variables -tempdir = '' -template = '' - -# TODO text files - -# function stubs -def TemporaryFile( - mode: str = 'w+b', buffering: int = None, encoding: str = None, - newline: str = None, suffix: str = '', prefix: str = 'tmp', - dir: str = None) -> BinaryIO: - ... -def NamedTemporaryFile( - mode: str = 'w+b', buffering: int = None, encoding: str = None, - newline: str = None, suffix: str = '', prefix: str = 'tmp', - dir: str = None, delete=True) -> BinaryIO: - ... -def SpooledTemporaryFile( - max_size: int = 0, mode: str = 'w+b', buffering: int = None, - encoding: str = None, newline: str = None, suffix: str = '', - prefix: str = 'tmp', dir: str = None) -> BinaryIO: - ... - -class TemporaryDirectory: - name = '' - def __init__(self, suffix: str = '', prefix: str = 'tmp', - dir: str = None) -> None: ... - def cleanup(self) -> None: ... - def __enter__(self) -> str: ... - def __exit__(self, type, value, traceback) -> bool: ... - -def mkstemp(suffix: str = '', prefix: str = 'tmp', dir: str = None, - text: bool = False) -> Tuple[int, str]: ... -def mkdtemp(suffix: str = '', prefix: str = 'tmp', - dir: str = None) -> str: ... -def mktemp(suffix: str = '', prefix: str = 'tmp', dir: str = None) -> str: ... -def gettempdir() -> str: ... -def gettempprefix() -> str: ... diff --git a/stubs/3.2/threading.pyi b/stubs/3.2/threading.pyi deleted file mode 100644 index c3d86729cc67..000000000000 --- a/stubs/3.2/threading.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# Stubs for threading - -# NOTE: These are incomplete! - -from typing import Any, Dict, Optional, Callable, TypeVar, Union - -class Thread: - name = '' - ident = 0 - daemon = False - - def __init__(self, group: Any = None, target: Any = None, args: Any = (), - kwargs: Dict[Any, Any] = None, - verbose: Any = None) -> None: ... - def start(self) -> None: ... - def run(self) -> None: ... - def join(self, timeout: float = 0.0) -> None: ... - def is_alive(self) -> bool: ... - - # Legacy methods - def getName(self) -> str: ... - def setName(self, name: str) -> None: ... - def isDaemon(self) -> bool: ... - def setDaemon(self, daemon: bool) -> None: ... - -class Event: - def is_set(self) -> bool: ... - def set(self) -> None: ... - def clear(self) -> None: ... - # TODO can it return None? - def wait(self, timeout: float = 0.0) -> bool: ... - -class Lock: - def acquire(self, blocking: bool = True, timeout: float = -1.0) -> bool: ... - def release(self) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -class RLock: - def acquire(self, blocking: bool = True, - timeout: float = -1.0) -> Optional[bool]: ... - def release(self) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... - -_T = TypeVar('_T') - -class Condition: - def acquire(self, blocking: bool = True, timeout: float = -1.0) -> bool: ... - def release(self) -> None: ... - def notify(self, n: int = 1) -> None: ... - def notify_all(self) -> None: ... - def wait(self, timeout: float = None) -> bool: ... - def wait_for(self, predicate: Callable[[], _T], timeout: float = None) -> Union[_T, bool]: ... - def __enter__(self) -> bool: ... - def __exit__(self, *args): ... diff --git a/stubs/3.2/time.pyi b/stubs/3.2/time.pyi deleted file mode 100644 index 89902df3b42f..000000000000 --- a/stubs/3.2/time.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# Stubs for time -# Ron Murawski - -# based on: http://docs.python.org/3.2/library/time.html#module-time -# see: http://nullege.com/codes/search?cq=time - -from typing import Tuple, Union - -# ----- variables and constants ----- -accept2dyear = False -altzone = 0 -daylight = 0 -timezone = 0 -tzname = ... # type: Tuple[str, str] - - -# ----- classes/methods ----- -class struct_time: - # this is supposed to be a namedtuple object - # namedtuple is not yet implemented (see file: mypy/stubs/collections.py) - # see: http://docs.python.org/3.2/library/time.html#time.struct_time - # see: http://nullege.com/codes/search/time.struct_time - # TODO: namedtuple() object problem - #namedtuple __init__(self, int, int, int, int, int, int, int, int, int): - # ... - tm_year = 0 - tm_mon = 0 - tm_mday = 0 - tm_hour = 0 - tm_min = 0 - tm_sec = 0 - tm_wday = 0 - tm_yday = 0 - tm_isdst = 0 - - -# ----- functions ----- -def asctime(t: Union[Tuple[int, int, int, int, int, int, int, int, int], - struct_time, - None] = None) -> str: ... # return current time - -def clock() -> float: ... - -def ctime(secs: Union[float, None] = None) -> str: ... # return current time - -def gmtime(secs: Union[float, None] = None) -> struct_time: ... # return current time - -def localtime(secs: Union[float, None] = None) -> struct_time: ... # return current time - -def mktime(t: Union[Tuple[int, int, int, int, int, - int, int, int, int], - struct_time]) -> float: ... - -def sleep(secs: Union[int, float]) -> None: ... - -def strftime(format: str, t: Union[Tuple[int, int, int, int, int, - int, int, int, int], - struct_time, - None] = None) -> str: ... # return current time - -def strptime(string: str, - format: str = "%a %b %d %H:%M:%S %Y") -> struct_time: ... -def time() -> float: ... -def tzset() -> None: ... # Unix only diff --git a/stubs/3.2/traceback.pyi b/stubs/3.2/traceback.pyi deleted file mode 100644 index 30f2cb54b15c..000000000000 --- a/stubs/3.2/traceback.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for traceback - -import typing - -# TODO signatures -def format_exception_only(etype, value): ... -def format_tb(traceback): ... -def print_exc(limit=None, file=None, chain=True): ... - -# TODO add more diff --git a/stubs/3.2/types.pyi b/stubs/3.2/types.pyi deleted file mode 100644 index 866f05d44970..000000000000 --- a/stubs/3.2/types.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for types - -# TODO this is work in progress - -from typing import Any - -class ModuleType: - __name__ = ... # type: str - __file__ = ... # type: str - def __init__(self, name: str, doc: Any) -> None: ... - -class MethodType: ... -class BuiltinMethodType: ... - -class TracebackType: - tb_frame = ... # type: Any - tb_lasti = ... # type: int - tb_lineno = ... # type: int - tb_next = ... # type: Any diff --git a/stubs/3.2/typing.pyi b/stubs/3.2/typing.pyi deleted file mode 100644 index 89fac9284aa0..000000000000 --- a/stubs/3.2/typing.pyi +++ /dev/null @@ -1,336 +0,0 @@ -# Stubs for typing - -from abc import abstractmethod, ABCMeta - -# Definitions of special type checking related constructs. Their definition -# are not used, so their value does not matter. - -cast = object() -overload = object() -Any = object() -TypeVar = object() -Generic = object() -Tuple = object() -Callable = object() -builtinclass = object() -_promote = object() -NamedTuple = object() -no_type_check = object() - -# Type aliases and type constructors - -class TypeAlias: - # Class for defining generic aliases for library types. - def __init__(self, target_type): ... - def __getitem__(self, typeargs): ... - -Union = TypeAlias(object) -Optional = TypeAlias(object) -List = TypeAlias(object) -Dict = TypeAlias(object) -Set = TypeAlias(object) - -# Predefined type variables. -AnyStr = TypeVar('AnyStr', str, bytes) - -# Abstract base classes. - -# These type variables are used by the container types. -_T = TypeVar('_T') -_S = TypeVar('_S') -_KT = TypeVar('_KT') # Key type. -_VT = TypeVar('_VT') # Value type. -_T_co = TypeVar('_T_co', covariant=True) # Any type covariant containers. -_V_co = TypeVar('_V_co', covariant=True) # Any type covariant containers. -_KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers. -_VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers. -_T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant. - -# TODO Container etc. - -class SupportsInt(metaclass=ABCMeta): - @abstractmethod - def __int__(self) -> int: ... - -class SupportsFloat(metaclass=ABCMeta): - @abstractmethod - def __float__(self) -> float: ... - -class SupportsAbs(Generic[_T]): - @abstractmethod - def __abs__(self) -> _T: ... - -class SupportsRound(Generic[_T]): - @abstractmethod - def __round__(self, ndigits: int = 0) -> _T: ... - -class Reversible(Generic[_T]): - @abstractmethod - def __reversed__(self) -> Iterator[_T]: ... - -class Sized(metaclass=ABCMeta): - @abstractmethod - def __len__(self) -> int: ... - -class Hashable(metaclass=ABCMeta): - # TODO: This is special, in that a subclass of a hashable class may not be hashable - # (for example, list vs. object). It's not obvious how to represent this. This class - # is currently mostly useless for static checking. - @abstractmethod - def __hash__(self) -> int: ... - -class Iterable(Generic[_T_co]): - @abstractmethod - def __iter__(self) -> Iterator[_T_co]: ... - -class Iterator(Iterable[_T_co], Generic[_T_co]): - @abstractmethod - def __next__(self) -> _T_co: ... - def __iter__(self) -> Iterator[_T_co]: ... - -class Container(Generic[_T_co]): - @abstractmethod - def __contains__(self, x: object) -> bool: ... - -class Sequence(Iterable[_T_co], Container[_T_co], Sized, Reversible[_T_co], Generic[_T_co]): - @overload - @abstractmethod - def __getitem__(self, i: int) -> _T_co: ... - @overload - @abstractmethod - def __getitem__(self, s: slice) -> Sequence[_T_co]: ... - # Mixin methods - def index(self, x: Any) -> int: ... - def count(self, x: Any) -> int: ... - def __contains__(self, x: object) -> bool: ... - def __iter__(self) -> Iterator[_T_co]: ... - def __reversed__(self) -> Iterator[_T_co]: ... - -class MutableSequence(Sequence[_T], Generic[_T]): - @abstractmethod - def insert(self, index: int, object: _T) -> None: ... - @overload - @abstractmethod - def __setitem__(self, i: int, o: _T) -> None: ... - @overload - @abstractmethod - def __setitem__(self, s: slice, o: Sequence[_T]) -> None: ... - @abstractmethod - def __delitem__(self, i: Union[int, slice]) -> None: ... - # Mixin methods - def append(self, object: _T) -> None: ... - def extend(self, iterable: Iterable[_T]) -> None: ... - def reverse(self) -> None: ... - def pop(self, index: int = -1) -> _T: ... - def remove(self, object: _T) -> None: ... - def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... - -class AbstractSet(Iterable[_KT_co], Container[_KT_co], Sized, Generic[_KT_co]): - @abstractmethod - def __contains__(self, x: object) -> bool: ... - # Mixin methods - def __le__(self, s: AbstractSet[Any]) -> bool: ... - def __lt__(self, s: AbstractSet[Any]) -> bool: ... - def __gt__(self, s: AbstractSet[Any]) -> bool: ... - def __ge__(self, s: AbstractSet[Any]) -> bool: ... - def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_KT_co]: ... - def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_KT_co, _T]]: ... - def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_KT_co]: ... - def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_KT_co, _T]]: ... - # TODO: Argument can be a more general ABC? - def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... - -class MutableSet(AbstractSet[_T], Generic[_T]): - @abstractmethod - def add(self, x: _T) -> None: ... - @abstractmethod - def discard(self, x: _T) -> None: ... - # Mixin methods - def clear(self) -> None: ... - def pop(self) -> _T: ... - def remove(self, element: _T) -> None: ... - def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... - def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... - def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... - def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... - -class MappingView(Sized): - def __len__(self) -> int: ... - -class ItemsView(AbstractSet[Tuple[_KT_co, _VT_co]], MappingView, Generic[_KT_co, _VT_co]): - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... - -class KeysView(AbstractSet[_KT_co], MappingView, Generic[_KT_co]): - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_KT_co]: ... - -class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_VT_co]: ... - -class Mapping(Iterable[_KT], Container[_KT], Sized, Generic[_KT, _VT]): - # TODO: Value type should be covariant, but currently we can't give a good signature for - # get if this is the case. - @abstractmethod - def __getitem__(self, k: _KT) -> _VT: ... - # Mixin methods - def get(self, k: _KT, default: _VT = ...) -> _VT: ... - def items(self) -> AbstractSet[Tuple[_KT, _VT]]: ... - def keys(self) -> AbstractSet[_KT]: ... - def values(self) -> ValuesView[_VT]: ... - def __contains__(self, o: object) -> bool: ... - -class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): - @abstractmethod - def __setitem__(self, k: _KT, v: _VT) -> None: ... - @abstractmethod - def __delitem__(self, v: _KT) -> None: ... - - def clear(self) -> None: ... - def pop(self, k: _KT, default: _VT = ...) -> _VT: ... - def popitem(self) -> Tuple[_KT, _VT]: ... - def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... - def update(self, m: Union[Mapping[_KT, _VT], - Iterable[Tuple[_KT, _VT]]]) -> None: ... - -class IO(Iterable[AnyStr], Generic[AnyStr]): - # TODO detach - # TODO use abstract properties - @property - def mode(self) -> str: ... - @property - def name(self) -> str: ... - @abstractmethod - def close(self) -> None: ... - @property - def closed(self) -> bool: ... - @abstractmethod - def fileno(self) -> int: ... - @abstractmethod - def flush(self) -> None: ... - @abstractmethod - def isatty(self) -> bool: ... - # TODO what if n is None? - @abstractmethod - def read(self, n: int = -1) -> AnyStr: ... - @abstractmethod - def readable(self) -> bool: ... - @abstractmethod - def readline(self, limit: int = -1) -> AnyStr: ... - @abstractmethod - def readlines(self, hint: int = -1) -> list[AnyStr]: ... - @abstractmethod - def seek(self, offset: int, whence: int = 0) -> int: ... - @abstractmethod - def seekable(self) -> bool: ... - @abstractmethod - def tell(self) -> int: ... - # TODO None should not be compatible with int - @abstractmethod - def truncate(self, size: int = None) -> int: ... - @abstractmethod - def writable(self) -> bool: ... - # TODO buffer objects - @abstractmethod - def write(self, s: AnyStr) -> int: ... - @abstractmethod - def writelines(self, lines: Iterable[AnyStr]) -> None: ... - - @abstractmethod - def __iter__(self) -> Iterator[AnyStr]: ... - @abstractmethod - def __enter__(self) -> 'IO[AnyStr]': ... - @abstractmethod - def __exit__(self, type, value, traceback) -> bool: ... - -class BinaryIO(IO[bytes]): - # TODO readinto - # TODO read1? - # TODO peek? - @overload - @abstractmethod - def write(self, s: bytes) -> int: ... - @overload - @abstractmethod - def write(self, s: bytearray) -> int: ... - - @abstractmethod - def __enter__(self) -> BinaryIO: ... - -class TextIO(IO[str]): - # TODO use abstractproperty - @property - def buffer(self) -> BinaryIO: ... - @property - def encoding(self) -> str: ... - @property - def errors(self) -> str: ... - @property - def line_buffering(self) -> int: ... # int on PyPy, bool on CPython - @property - def newlines(self) -> Any: ... # None, str or tuple - @abstractmethod - def __enter__(self) -> TextIO: ... - -class ByteString(Sequence[int]): ... - -class Match(Generic[AnyStr]): - pos = 0 - endpos = 0 - lastindex = 0 - lastgroup = ... # type: AnyStr - string = ... # type: AnyStr - - # The regular expression object whose match() or search() method produced - # this match instance. - re = ... # type: 'Pattern[AnyStr]' - - def expand(self, template: AnyStr) -> AnyStr: ... - - @overload - def group(self, group1: int = 0) -> AnyStr: ... - @overload - def group(self, group1: str) -> AnyStr: ... - @overload - def group(self, group1: int, group2: int, - *groups: int) -> Sequence[AnyStr]: ... - @overload - def group(self, group1: str, group2: str, - *groups: str) -> Sequence[AnyStr]: ... - - def groups(self, default: AnyStr = None) -> Sequence[AnyStr]: ... - def groupdict(self, default: AnyStr = None) -> dict[str, AnyStr]: ... - def start(self, group: int = 0) -> int: ... - def end(self, group: int = 0) -> int: ... - def span(self, group: int = 0) -> Tuple[int, int]: ... - -class Pattern(Generic[AnyStr]): - flags = 0 - groupindex = 0 - groups = 0 - pattern = ... # type: AnyStr - - def search(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Match[AnyStr]: ... - def match(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Match[AnyStr]: ... - def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr]: ... - def findall(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> list[AnyStr]: ... - def finditer(self, string: AnyStr, pos: int = 0, - endpos: int = -1) -> Iterator[Match[AnyStr]]: ... - - @overload - def sub(self, repl: AnyStr, string: AnyStr, - count: int = 0) -> AnyStr: ... - @overload - def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, - count: int = 0) -> AnyStr: ... - - @overload - def subn(self, repl: AnyStr, string: AnyStr, - count: int = 0) -> Tuple[AnyStr, int]: ... - @overload - def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, - count: int = 0) -> Tuple[AnyStr, int]: ... diff --git a/stubs/3.2/unicodedata.pyi b/stubs/3.2/unicodedata.pyi deleted file mode 100644 index 08ad413067a3..000000000000 --- a/stubs/3.2/unicodedata.pyi +++ /dev/null @@ -1,37 +0,0 @@ -# Stubs for unicodedata (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -ucd_3_2_0 = ... # type: Any -ucnhash_CAPI = ... # type: Any -unidata_version = ... # type: str - -def bidirectional(unichr): ... -def category(unichr): ... -def combining(unichr): ... -def decimal(chr, default=...): ... -def decomposition(unichr): ... -def digit(chr, default=...): ... -def east_asian_width(unichr): ... -def lookup(name): ... -def mirrored(unichr): ... -def name(chr, default=...): ... -def normalize(form, unistr): ... -def numeric(chr, default=...): ... - -class UCD: - unidata_version = ... # type: Any - def bidirectional(self, unichr): ... - def category(self, unichr): ... - def combining(self, unichr): ... - def decimal(self, chr, default=...): ... - def decomposition(self, unichr): ... - def digit(self, chr, default=...): ... - def east_asian_width(self, unichr): ... - def lookup(self, name): ... - def mirrored(self, unichr): ... - def name(self, chr, default=...): ... - def normalize(self, form, unistr): ... - def numeric(self, chr, default=...): ... diff --git a/stubs/3.2/unittest.pyi b/stubs/3.2/unittest.pyi deleted file mode 100644 index eb4a50e6367b..000000000000 --- a/stubs/3.2/unittest.pyi +++ /dev/null @@ -1,167 +0,0 @@ -# Stubs for unittest - -# Based on http://docs.python.org/3.0/library/unittest.html - -# NOTE: These stubs are based on the 3.0 version API, since later versions -# would require featurs not supported currently by mypy. - -# Only a subset of functionality is included. - -from typing import ( - Any, Callable, Iterable, Tuple, List, TextIO, Sequence, - overload, TypeVar, Pattern -) -from abc import abstractmethod, ABCMeta - -_T = TypeVar('_T') -_FT = TypeVar('_FT') - -class Testable(metaclass=ABCMeta): - @abstractmethod - def run(self, result: 'TestResult') -> None: ... - @abstractmethod - def debug(self) -> None: ... - @abstractmethod - def countTestCases(self) -> int: ... - -# TODO ABC for test runners? - -class TestResult: - errors = ... # type: List[Tuple[Testable, str]] - failures = ... # type: List[Tuple[Testable, str]] - testsRun = 0 - shouldStop = False - - def wasSuccessful(self) -> bool: ... - def stop(self) -> None: ... - def startTest(self, test: Testable) -> None: ... - def stopTest(self, test: Testable) -> None: ... - def addError(self, test: Testable, - err: Tuple[type, Any, Any]) -> None: ... # TODO - def addFailure(self, test: Testable, - err: Tuple[type, Any, Any]) -> None: ... # TODO - def addSuccess(self, test: Testable) -> None: ... - -class _AssertRaisesBaseContext: - expected = ... # type: Any - failureException = ... # type: type - obj_name = '' - expected_regex = ... # type: Pattern[str] - -class _AssertRaisesContext(_AssertRaisesBaseContext): - exception = ... # type: Any # TODO precise type - def __enter__(self) -> _AssertRaisesContext: ... - def __exit__(self, exc_type, exc_value, tb) -> bool: ... - -class _AssertWarnsContext(_AssertRaisesBaseContext): - warning = ... # type: Any # TODO precise type - filename = '' - lineno = 0 - def __enter__(self) -> _AssertWarnsContext: ... - def __exit__(self, exc_type, exc_value, tb) -> bool: ... - -class TestCase(Testable): - def __init__(self, methodName: str = 'runTest') -> None: ... - # TODO failureException - def setUp(self) -> None: ... - def tearDown(self) -> None: ... - def run(self, result: TestResult = None) -> None: ... - def debug(self) -> None: ... - def assert_(self, expr: Any, msg: object = None) -> None: ... - def failUnless(self, expr: Any, msg: object = None) -> None: ... - def assertTrue(self, expr: Any, msg: object = None) -> None: ... - def assertEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - def failUnlessEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertNotEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertSequenceEqual(self, first: Sequence[Any], second: Sequence[Any], - msg: object = None, - seq_type: type = None) -> None: ... - def failIfEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertAlmostEqual(self, first: float, second: float, places: int = 7, - msg: object = None, - delta: float = None) -> None: ... - def failUnlessAlmostEqual(self, first: float, second: float, - places: int = 7, - msg: object = None) -> None: ... - def assertNotAlmostEqual(self, first: float, second: float, - places: int = 7, msg: object = None, - delta: float = None) -> None: ... - def failIfAlmostEqual(self, first: float, second: float, places: int = 7, - msg: object = None) -> None: ... - def assertGreater(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertGreaterEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertLess(self, first: Any, second: Any, - msg: object = None) -> None: ... - def assertLessEqual(self, first: Any, second: Any, - msg: object = None) -> None: ... - # TODO: If callableObj is None, the return value is None. - def assertRaises(self, excClass: type, callableObj: Any = None, - *args: Any, **kwargs: Any) -> _AssertRaisesContext: ... - def failIf(self, expr: Any, msg: object = None) -> None: ... - def assertFalse(self, expr: Any, msg: object = None) -> None: ... - def assertIs(self, first: object, second: object, - msg: object = None) -> None: ... - def assertIsNot(self, first: object, second: object, - msg: object = None) -> None: ... - def assertIsNone(self, expr: Any, msg: object = None) -> None: ... - def assertIsNotNone(self, expr: Any, msg: object = None) -> None: ... - def assertIn(self, first: _T, second: Iterable[_T], - msg: object = None) -> None: ... - def assertNotIn(self, first: _T, second: Iterable[_T], - msg: object = None) -> None: ... - def assertIsInstance(self, obj: Any, cls: type, - msg: object = None) -> None: ... - def assertNotIsInstance(self, obj: Any, cls: type, - msg: object = None) -> None: ... - def assertWarns(self, expected_warning: type, callable_obj: Any = None, - *args: Any, **kwargs: Any) -> _AssertWarnsContext: ... - def fail(self, msg: object = None) -> None: ... - def countTestCases(self) -> int: ... - def defaultTestResult(self) -> TestResult: ... - def id(self) -> str: ... - def shortDescription(self) -> str: ... # May return None - def addCleanup(function: Any, *args: Any, **kwargs: Any) -> None: ... - def skipTest(self, reason: Any) -> None: ... - -class CallableTestCase(Testable): - def __init__(self, testFunc: Callable[[], None], - setUp: Callable[[], None] = None, - tearDown: Callable[[], None] = None, - description: str = None) -> None: ... - def run(self, result: TestResult) -> None: ... - def debug(self) -> None: ... - def countTestCases(self) -> int: ... - -class TestSuite(Testable): - def __init__(self, tests: Iterable[Testable] = None) -> None: ... - def addTest(self, test: Testable) -> None: ... - def addTests(self, tests: Iterable[Testable]) -> None: ... - def run(self, result: TestResult) -> None: ... - def debug(self) -> None: ... - def countTestCases(self) -> int: ... - -# TODO TestLoader -# TODO defaultTestLoader - -class TextTestRunner: - def __init__(self, stream: TextIO = None, descriptions: bool = True, - verbosity: int = 1, failfast: bool = False) -> None: ... - -class SkipTest(Exception): - ... - -# TODO precise types -def skipUnless(condition: Any, reason: str) -> Any: ... -def skipIf(condition: Any, reason: str) -> Any: ... -def expectedFailure(func: _FT) -> _FT: ... -def skip(reason: str) -> Any: ... - -def main(module: str = '__main__', defaultTest: str = None, - argv: List[str] = None, testRunner: Any = None, - testLoader: Any = None) -> None: ... # TODO types diff --git a/stubs/3.2/urllib/__init__.pyi b/stubs/3.2/urllib/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/urllib/error.pyi b/stubs/3.2/urllib/error.pyi deleted file mode 100644 index e9730002a840..000000000000 --- a/stubs/3.2/urllib/error.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for urllib.error - -# NOTE: These are incomplete! - -class URLError(IOError): ... -class HTTPError(URLError): ... diff --git a/stubs/3.2/urllib/parse.pyi b/stubs/3.2/urllib/parse.pyi deleted file mode 100644 index e7711d11ae20..000000000000 --- a/stubs/3.2/urllib/parse.pyi +++ /dev/null @@ -1,123 +0,0 @@ -# Stubs for urllib.parse -from typing import List, Dict, Tuple, AnyStr, Generic, overload, Sequence, Mapping - -__all__ = ( - 'urlparse', - 'urlunparse', - 'urljoin', - 'urldefrag', - 'urlsplit', - 'urlunsplit', - 'urlencode', - 'parse_qs', - 'parse_qsl', - 'quote', - 'quote_plus', - 'quote_from_bytes', - 'unquote', - 'unquote_plus', - 'unquote_to_bytes' -) - - -class _ResultMixinBase(Generic[AnyStr]): - def geturl(self) -> AnyStr: ... - -class _ResultMixinStr(_ResultMixinBase[str]): - def encode(self, encoding: str = 'ascii', errors: str = 'strict') -> '_ResultMixinBytes': ... - - -class _ResultMixinBytes(_ResultMixinBase[str]): - def decode(self, encoding: str = 'ascii', errors: str = 'strict') -> '_ResultMixinStr': ... - - -class _NetlocResultMixinBase(Generic[AnyStr]): - username = ... # type: AnyStr - password = ... # type: AnyStr - hostname = ... # type: AnyStr - port = ... # type: int - -class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ... - - -class _NetlocResultMixinBytes(_NetlocResultMixinBase[str], _ResultMixinBytes): ... - -class _DefragResultBase(tuple, Generic[AnyStr]): - url = ... # type: AnyStr - fragment = ... # type: AnyStr - -class _SplitResultBase(tuple, Generic[AnyStr]): - scheme = ... # type: AnyStr - netloc = ... # type: AnyStr - path = ... # type: AnyStr - query = ... # type: AnyStr - fragment = ... # type: AnyStr - -class _ParseResultBase(tuple, Generic[AnyStr]): - scheme = ... # type: AnyStr - netloc = ... # type: AnyStr - path = ... # type: AnyStr - params = ... # type: AnyStr - query = ... # type: AnyStr - fragment = ... # type: AnyStr - -# Structured result objects for string data -class DefragResult(_DefragResultBase[str], _ResultMixinStr): ... - -class SplitResult(_SplitResultBase[str], _NetlocResultMixinStr): ... - -class ParseResult(_ParseResultBase[str], _NetlocResultMixinStr): ... - -# Structured result objects for bytes data -class DefragResultBytes(_DefragResultBase[bytes], _ResultMixinBytes): ... - -class SplitResultBytes(_SplitResultBase[bytes], _NetlocResultMixinBytes): ... - -class ParseResultBytes(_ParseResultBase[bytes], _NetlocResultMixinBytes): ... - - -def parse_qs(qs: str, keep_blank_values : bool = False, strict_parsing : bool = False, encoding : str = 'utf-8', errors: str = 'replace') -> Dict[str, List[str]]: ... - -def parse_qsl(qs: str, keep_blank_values: bool = False, strict_parsing: bool = False, encoding: str = 'utf-8', errors: str = 'replace') -> List[Tuple[str,str]]: ... - -def quote(string: AnyStr, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ... - -def quote_from_bytes(bs: bytes, safe: AnyStr = None) -> bytes: ... - -def quote_plus(string: AnyStr, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ... - -def unquote(string: str, encoding: str = 'utf-8', errors: str = 'replace') -> str: ... - -def unquote_to_bytes(string: AnyStr) -> bytes: ... - -@overload -def urldefrag(url: str) -> DefragResult: ... -@overload -def urldefrag(url: bytes) -> DefragResultBytes: ... - -@overload -def urlencode(query: Mapping[AnyStr, AnyStr], doseq: bool = False, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ... -@overload -def urlencode(query: Sequence[Tuple[AnyStr, AnyStr]], doseq: bool = False, safe: AnyStr = None, encoding: str = None, errors: str = None) -> str: ... - -def urljoin(base: AnyStr, url: AnyStr, allow_fragments: bool = True) -> AnyStr: ... - -@overload -def urlparse(url: str, scheme: str = None, allow_framgents: bool = True) -> ParseResult: ... -@overload -def urlparse(url: bytes, scheme: bytes = None, allow_framgents: bool = True) -> ParseResultBytes: ... - -@overload -def urlsplit(url: str, scheme: str = None, allow_fragments: bool = True) -> SplitResult: ... -@overload -def urlsplit(url: bytes, scheme: bytes = None, allow_fragments: bool = True) -> SplitResultBytes: ... - -@overload -def urlunparse(components: Sequence[AnyStr]) -> AnyStr: ... -@overload -def urlunparse(components: Tuple[AnyStr, AnyStr, AnyStr, AnyStr, AnyStr, AnyStr]) -> AnyStr: ... - -@overload -def urlunsplit(components: Sequence[AnyStr]) -> AnyStr: ... -@overload -def urlunsplit(components: Tuple[AnyStr, AnyStr, AnyStr, AnyStr, AnyStr]) -> AnyStr: ... diff --git a/stubs/3.2/urllib/request.pyi b/stubs/3.2/urllib/request.pyi deleted file mode 100644 index fffc13fa51b4..000000000000 --- a/stubs/3.2/urllib/request.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for urllib.request - -# NOTE: These are incomplete! - -from typing import Any - -class BaseHandler(): ... -class HTTPRedirectHandler(BaseHandler): ... -class OpenerDirector(): ... - -# TODO args should be types that extend BaseHandler (types, not instances) -def build_opener(*args: Any) -> OpenerDirector: ... -def install_opener(opener: OpenerDirector) -> None: ... diff --git a/stubs/3.2/uuid.pyi b/stubs/3.2/uuid.pyi deleted file mode 100644 index 433a4200c56f..000000000000 --- a/stubs/3.2/uuid.pyi +++ /dev/null @@ -1,73 +0,0 @@ -# Stubs for uuid - -from typing import Tuple - -Int = __builtins__.int -Bytes = __builtins__.bytes -FieldsType = Tuple[Int, Int, Int, Int, Int, Int] - -class UUID: - def __init__(self, hex: str=None, bytes: Bytes=None, bytes_le: Bytes=None, fields: FieldsType=None, int: Int=None, version: Int=None) -> None: ... - - @property - def bytes(self) -> Bytes: ... - - @property - def bytes_le(self) -> Bytes: ... - - @property - def clock_seq(self) -> Int: ... - - @property - def clock_seq_hi_variant(self) -> Int: ... - - @property - def clock_seq_low(self) -> Int: ... - - @property - def fields(self) -> FieldsType: ... - - @property - def hex(self) -> str: ... - - @property - def int(self) -> Int: ... - - @property - def node(self) -> Int: ... - - @property - def time(self) -> Int: ... - - @property - def time_hi_version(self) -> Int: ... - - @property - def time_low(self) -> Int: ... - - @property - def time_mid(self) -> Int: ... - - @property - def urn(self) -> str: ... - - @property - def variant(self) -> str: ... - - @property - def version(self) -> str: ... - -def getnode() -> Int: ... -def uuid1(node: Int=None, clock_seq: Int=None) -> UUID: ... -def uuid3(namespace: UUID, name: str) -> UUID: ... -def uuid4() -> UUID: ... -def uuid5(namespace: UUID, name: str) -> UUID: ... - -NAMESPACE_DNS = ... # type: UUID -NAMESPACE_URL = ... # type: UUID -NAMESPACE_OID = ... # type: UUID -NAMESPACE_X500 = ... # type: UUID -RESERVED_NCS = ... # type: str -RFC_4122 = ... # type: str -RESERVED_MICROSOFT = ... # type: str -RESERVED_FUTURE = ... # type: str diff --git a/stubs/3.2/warnings.pyi b/stubs/3.2/warnings.pyi deleted file mode 100644 index b66a6a8bb72a..000000000000 --- a/stubs/3.2/warnings.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# Stubs for warnings - -# Based on http://docs.python.org/3.2/library/warnings.html - -from typing import Any, List, TextIO, Union - -def warn(message: Union[str, Warning], category: type = None, - stacklevel: int = 1) -> None: ... - -def warn_explicit(message: Union[str, Warning], category: type, filename: str, - lineno: int, module: str = None, registry: Any = None, - module_globals: Any = None) -> None: ... - -# logging modifies showwarning => make it a variable. -def _showwarning(message: str, category: type, filename: str, lineno: int, - file: TextIO = None, line: str = None) -> None: ... -showwarning = _showwarning - -def formatwarning(message: str, category: type, filename: str, lineno: int, - line: str = None) -> None: ... -def filterwarnings(action: str, message: str = '', category: type = Warning, - module: str = '', lineno: int = 0, - append: bool = False) -> None: ... -def simplefilter(action: str, category: type = Warning, lineno: int = 0, - append: bool = False) -> None: ... -def resetwarnings() -> None: ... - -class catch_warnings: - # TODO record and module must be keyword arguments! - # TODO type of module? - def __init__(self, record: bool = False, module: Any = None) -> None: ... - def __enter__(self) -> List[Any]: ... - def __exit__(self, type, value, traceback) -> bool: ... diff --git a/stubs/3.2/weakref.pyi b/stubs/3.2/weakref.pyi deleted file mode 100644 index 06278a1153ad..000000000000 --- a/stubs/3.2/weakref.pyi +++ /dev/null @@ -1,71 +0,0 @@ -# Stubs for weakref - -# NOTE: These are incomplete! - -from typing import ( - TypeVar, Generic, Any, Callable, overload, Mapping, Iterator, Dict, Tuple, - Iterable, Optional -) - -_T = TypeVar('_T') -_KT = TypeVar('_KT') -_VT = TypeVar('_VT') - -class ReferenceType(Generic[_T]): - # TODO rest of members - def __call__(self) -> Optional[_T]: - ... - -def ref(o: _T, callback: Callable[[ReferenceType[_T]], - Any] = None) -> ReferenceType[_T]: ... - -# TODO callback -def proxy(object: _T) -> _T: ... - -class WeakValueDictionary(Generic[_KT, _VT]): - # TODO tuple iterable argument? - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, map: Mapping[_KT, _VT]) -> None: ... - - def __len__(self) -> int: ... - def __getitem__(self, k: _KT) -> _VT: ... - def __setitem__(self, k: _KT, v: _VT) -> None: ... - def __delitem__(self, v: _KT) -> None: ... - def __contains__(self, o: object) -> bool: ... - def __iter__(self) -> Iterator[_KT]: ... - def __str__(self) -> str: ... - - def clear(self) -> None: ... - def copy(self) -> Dict[_KT, _VT]: ... - - @overload - def get(self, k: _KT) -> _VT: ... - @overload - def get(self, k: _KT, default: _VT) -> _VT: ... - - @overload - def pop(self, k: _KT) -> _VT: ... - @overload - def pop(self, k: _KT, default: _VT) -> _VT: ... - - def popitem(self) -> Tuple[_KT, _VT]: ... - - @overload - def setdefault(self, k: _KT) -> _VT: ... - @overload - def setdefault(self, k: _KT, default: _VT) -> _VT: ... - - @overload - def update(self, m: Mapping[_KT, _VT]) -> None: ... - @overload - def update(self, m: Iterable[Tuple[_KT, _VT]]) -> None: ... - - # NOTE: incompatible with Mapping - def keys(self) -> Iterator[_KT]: ... - def values(self) -> Iterator[_VT]: ... - def items(self) -> Iterator[Tuple[_KT, _VT]]: ... - - # TODO return type - def valuerefs(self) -> Iterable[Any]: ... diff --git a/stubs/3.2/webbrowser.pyi b/stubs/3.2/webbrowser.pyi deleted file mode 100644 index 3c8e6181d4b6..000000000000 --- a/stubs/3.2/webbrowser.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# Stubs for webbrowser (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Error(Exception): ... - -def register(name, klass, instance=None, update_tryorder=1): ... -def get(using=None): ... -def open(url, new=0, autoraise=True): ... -def open_new(url): ... -def open_new_tab(url): ... - -class BaseBrowser: - args = ... # type: Any - name = ... # type: Any - basename = ... # type: Any - def __init__(self, name=''): ... - def open(self, url, new=0, autoraise=True): ... - def open_new(self, url): ... - def open_new_tab(self, url): ... - -class GenericBrowser(BaseBrowser): - name = ... # type: Any - args = ... # type: Any - basename = ... # type: Any - def __init__(self, name): ... - def open(self, url, new=0, autoraise=True): ... - -class BackgroundBrowser(GenericBrowser): - def open(self, url, new=0, autoraise=True): ... - -class UnixBrowser(BaseBrowser): - raise_opts = ... # type: Any - background = ... # type: Any - redirect_stdout = ... # type: Any - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - remote_action_newtab = ... # type: Any - def open(self, url, new=0, autoraise=True): ... - -class Mozilla(UnixBrowser): - raise_opts = ... # type: Any - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - remote_action_newtab = ... # type: Any - background = ... # type: Any - -class Galeon(UnixBrowser): - raise_opts = ... # type: Any - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - background = ... # type: Any - -class Chrome(UnixBrowser): - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - remote_action_newtab = ... # type: Any - background = ... # type: Any - -class Opera(UnixBrowser): - raise_opts = ... # type: Any - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - remote_action_newtab = ... # type: Any - background = ... # type: Any - -class Elinks(UnixBrowser): - remote_args = ... # type: Any - remote_action = ... # type: Any - remote_action_newwin = ... # type: Any - remote_action_newtab = ... # type: Any - background = ... # type: Any - redirect_stdout = ... # type: Any - -class Konqueror(BaseBrowser): - def open(self, url, new=0, autoraise=True): ... - -class Grail(BaseBrowser): - def open(self, url, new=0, autoraise=True): ... - -class WindowsDefault(BaseBrowser): - def open(self, url, new=0, autoraise=True): ... - -class MacOSX(BaseBrowser): - name = ... # type: Any - def __init__(self, name): ... - def open(self, url, new=0, autoraise=True): ... - -class MacOSXOSAScript(BaseBrowser): - def __init__(self, name): ... - def open(self, url, new=0, autoraise=True): ... diff --git a/stubs/3.2/xml/__init__.pyi b/stubs/3.2/xml/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/xml/etree/ElementInclude.pyi b/stubs/3.2/xml/etree/ElementInclude.pyi deleted file mode 100644 index da7edfe5c229..000000000000 --- a/stubs/3.2/xml/etree/ElementInclude.pyi +++ /dev/null @@ -1,14 +0,0 @@ -# Stubs for xml.etree.ElementInclude (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -XINCLUDE = ... # type: Any -XINCLUDE_INCLUDE = ... # type: Any -XINCLUDE_FALLBACK = ... # type: Any - -class FatalIncludeError(SyntaxError): ... - -def default_loader(href, parse, encoding=None): ... -def include(elem, loader=None): ... diff --git a/stubs/3.2/xml/etree/ElementPath.pyi b/stubs/3.2/xml/etree/ElementPath.pyi deleted file mode 100644 index 072a71953d8b..000000000000 --- a/stubs/3.2/xml/etree/ElementPath.pyi +++ /dev/null @@ -1,28 +0,0 @@ -# Stubs for xml.etree.ElementPath (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -xpath_tokenizer_re = ... # type: Any - -def xpath_tokenizer(pattern, namespaces=None): ... -def get_parent_map(context): ... -def prepare_child(next, token): ... -def prepare_star(next, token): ... -def prepare_self(next, token): ... -def prepare_descendant(next, token): ... -def prepare_parent(next, token): ... -def prepare_predicate(next, token): ... - -ops = ... # type: Any - -class _SelectorContext: - parent_map = ... # type: Any - root = ... # type: Any - def __init__(self, root): ... - -def iterfind(elem, path, namespaces=None): ... -def find(elem, path, namespaces=None): ... -def findall(elem, path, namespaces=None): ... -def findtext(elem, path, default=None, namespaces=None): ... diff --git a/stubs/3.2/xml/etree/ElementTree.pyi b/stubs/3.2/xml/etree/ElementTree.pyi deleted file mode 100644 index 96fddb7affdb..000000000000 --- a/stubs/3.2/xml/etree/ElementTree.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# Stubs for xml.etree.ElementTree (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import io - -VERSION = ... # type: Any - -class ParseError(SyntaxError): ... - -def iselement(element): ... - -class Element: - def __init__(self, tag, attrib=..., **extra): ... - def append(self, *args, **kwargs): ... - def clear(self, *args, **kwargs): ... - def extend(self, *args, **kwargs): ... - def find(self, *args, **kwargs): ... - def findall(self, *args, **kwargs): ... - def findtext(self, match, default=..., namespaces=...): ... - def get(self, *args, **kwargs): ... - def getchildren(self): ... - def getiterator(self, tag=...): ... - def insert(self, *args, **kwargs): ... - def items(self, *args, **kwargs): ... - def iter(self, *args, **kwargs): ... - def iterfind(self, match, namespaces=...): ... - def itertext(self): ... - def keys(self): ... - def makeelement(self, tag, attrib): ... - def remove(self, *args, **kwargs): ... - def set(self, *args, **kwargs): ... - def __copy__(self): ... - def __deepcopy__(self): ... - def __delattr__(self, name): ... - def __delitem__(self, name): ... - def __getitem__(self, name): ... - def __getstate__(self): ... - def __len__(self): ... - def __setattr__(self, name, value): ... - def __setitem__(self, index, object): ... - def __setstate__(self, state): ... - def __sizeof__(self): ... - -def SubElement(parent, tag, attrib=..., **extra): ... -def Comment(text=None): ... -def ProcessingInstruction(target, text=None): ... - -PI = ... # type: Any - -class QName: - text = ... # type: Any - def __init__(self, text_or_uri, tag=None): ... - def __hash__(self): ... - def __le__(self, other): ... - def __lt__(self, other): ... - def __ge__(self, other): ... - def __gt__(self, other): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class ElementTree: - def __init__(self, element=None, file=None): ... - def getroot(self): ... - def parse(self, source, parser=None): ... - def iter(self, tag=None): ... - def getiterator(self, tag=None): ... - def find(self, path, namespaces=None): ... - def findtext(self, path, default=None, namespaces=None): ... - def findall(self, path, namespaces=None): ... - def iterfind(self, path, namespaces=None): ... - def write(self, file_or_filename, encoding=None, xml_declaration=None, default_namespace=None, method=None, *, short_empty_elements=True): ... - def write_c14n(self, file): ... - -def register_namespace(prefix, uri): ... -def tostring(element, encoding=None, method=None, *, short_empty_elements=True): ... - -class _ListDataStream(io.BufferedIOBase): - lst = ... # type: Any - def __init__(self, lst): ... - def writable(self): ... - def seekable(self): ... - def write(self, b): ... - def tell(self): ... - -def tostringlist(element, encoding=None, method=None, *, short_empty_elements=True): ... -def dump(elem): ... -def parse(source, parser=None): ... -def iterparse(source, events=None, parser=None): ... - -class XMLPullParser: - def __init__(self, events=None, *, _parser=None): ... - def feed(self, data): ... - def close(self): ... - def read_events(self): ... - -class _IterParseIterator: - root = ... # type: Any - def __init__(self, source, events, parser, close_source=False): ... - def __next__(self): ... - def __iter__(self): ... - -def XML(text, parser=None): ... -def XMLID(text, parser=None): ... - -fromstring = ... # type: Any - -def fromstringlist(sequence, parser=None): ... - -class TreeBuilder: - def __init__(self, element_factory=None): ... - def close(self): ... - def data(self, data): ... - def start(self, tag, attrs): ... - def end(self, tag): ... - -class XMLParser: - target = ... # type: Any - entity = ... # type: Any - version = ... # type: Any - def __init__(self, html=..., target=..., encoding=...): ... - def _parse_whole(self, *args, **kwargs): ... - def _setevents(self, *args, **kwargs): ... - def close(self, *args, **kwargs): ... - def doctype(self, name, pubid, system): ... - def feed(self, data): ... diff --git a/stubs/3.2/xml/etree/__init__.pyi b/stubs/3.2/xml/etree/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.2/xml/etree/cElementTree.pyi b/stubs/3.2/xml/etree/cElementTree.pyi deleted file mode 100644 index a6f4274de8d6..000000000000 --- a/stubs/3.2/xml/etree/cElementTree.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for xml.etree.cElementTree (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from xml.etree.ElementTree import * diff --git a/stubs/3.2/zipfile.pyi b/stubs/3.2/zipfile.pyi deleted file mode 100644 index 9d6a7f4dd830..000000000000 --- a/stubs/3.2/zipfile.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# TODO these are incomplete - -from typing import List, Tuple, BinaryIO, Union - -ZIP_STORED = 0 -ZIP_DEFLATED = 0 - -def is_zipfile(filename: Union[str, BinaryIO]) -> bool: ... - -class ZipInfo: - filename = '' - date_time = ... # type: Tuple[int, int, int, int, int, int] - compressed_size = 0 - file_size = 0 - -class ZipFile: - def __init__(self, file: Union[str, BinaryIO], mode: str = 'r', - compression: int = ZIP_STORED, - allowZip64: bool = False) -> None: ... - def close(self) -> None: ... - def getinfo(name: str) -> ZipInfo: ... - def infolist(self) -> List[ZipInfo]: ... - def namelist(self) -> List[str]: ... - def read(self, name: Union[str, ZipInfo], pwd: str = None) -> bytes: ... - def write(self, filename: str, arcname: str = None, - compress_type: int = None) -> None: ... - - def __enter__(self) -> 'ZipFile': ... - def __exit__(self, type, value, traceback) -> bool: ... diff --git a/stubs/3.2/zlib.pyi b/stubs/3.2/zlib.pyi deleted file mode 100644 index 53fc8f095b81..000000000000 --- a/stubs/3.2/zlib.pyi +++ /dev/null @@ -1,32 +0,0 @@ -# Stubs for zlib (Python 3.4) -# -# NOTE: This stub was automatically generated by stubgen. - -# TODO: Compress and Decompress classes are not published by the module. - -DEFLATED = ... # type: int -DEF_BUF_SIZE = ... # type: int -DEF_MEM_LEVEL = ... # type: int -MAX_WBITS = ... # type: int -ZLIB_RUNTIME_VERSION = ... # type: str -ZLIB_VERSION = ... # type: str -Z_BEST_COMPRESSION = ... # type: int -Z_BEST_SPEED = ... # type: int -Z_DEFAULT_COMPRESSION = ... # type: int -Z_DEFAULT_STRATEGY = ... # type: int -Z_FILTERED = ... # type: int -Z_FINISH = ... # type: int -Z_FULL_FLUSH = ... # type: int -Z_HUFFMAN_ONLY = ... # type: int -Z_NO_FLUSH = ... # type: int -Z_SYNC_FLUSH = ... # type: int - -def adler32(data, value=...) -> int: ... -def compress(data, level: int = 6): ... -def compressobj(level=..., method=..., wbits=..., memlevel=..., - strategy=..., zdict=...): ... -def crc32(data, value=...) -> int: ... -def decompress(data, wbits=..., bufsize=...): ... -def decompressobj(wbits=..., zdict=...): ... - -class error(Exception): ... diff --git a/stubs/3.3/do-not-remove b/stubs/3.3/do-not-remove deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/3.3/ipaddress.pyi b/stubs/3.3/ipaddress.pyi deleted file mode 100644 index 21696493150c..000000000000 --- a/stubs/3.3/ipaddress.pyi +++ /dev/null @@ -1,201 +0,0 @@ -# Stubs for ipaddress (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -IPV4LENGTH = ... # type: Any -IPV6LENGTH = ... # type: Any - -class AddressValueError(ValueError): ... -class NetmaskValueError(ValueError): ... - -def ip_address(address): ... -def ip_network(address, strict=True): ... -def ip_interface(address): ... -def v4_int_to_packed(address): ... -def v6_int_to_packed(address): ... -def summarize_address_range(first, last): ... -def collapse_addresses(addresses): ... -def get_mixed_type_key(obj): ... - -class _TotalOrderingMixin: - def __eq__(self, other): ... - def __ne__(self, other): ... - def __lt__(self, other): ... - def __le__(self, other): ... - def __gt__(self, other): ... - def __ge__(self, other): ... - -class _IPAddressBase(_TotalOrderingMixin): - @property - def exploded(self): ... - @property - def compressed(self): ... - @property - def version(self): ... - -class _BaseAddress(_IPAddressBase): - def __init__(self, address): ... - def __int__(self): ... - def __eq__(self, other): ... - def __lt__(self, other): ... - def __add__(self, other): ... - def __sub__(self, other): ... - def __hash__(self): ... - -class _BaseNetwork(_IPAddressBase): - def __init__(self, address): ... - def hosts(self): ... - def __iter__(self): ... - def __getitem__(self, n): ... - def __lt__(self, other): ... - def __eq__(self, other): ... - def __hash__(self): ... - def __contains__(self, other): ... - def overlaps(self, other): ... - @property - def broadcast_address(self): ... - @property - def hostmask(self): ... - @property - def with_prefixlen(self): ... - @property - def with_netmask(self): ... - @property - def with_hostmask(self): ... - @property - def num_addresses(self): ... - @property - def prefixlen(self): ... - def address_exclude(self, other): ... - def compare_networks(self, other): ... - def subnets(self, prefixlen_diff=1, new_prefix=None): ... - def supernet(self, prefixlen_diff=1, new_prefix=None): ... - @property - def is_multicast(self): ... - @property - def is_reserved(self): ... - @property - def is_link_local(self): ... - @property - def is_private(self): ... - @property - def is_global(self): ... - @property - def is_unspecified(self): ... - @property - def is_loopback(self): ... - -class _BaseV4: - def __init__(self, address): ... - @property - def max_prefixlen(self): ... - @property - def version(self): ... - -class IPv4Address(_BaseV4, _BaseAddress): - def __init__(self, address): ... - @property - def packed(self): ... - @property - def is_reserved(self): ... - @property - def is_private(self): ... - @property - def is_multicast(self): ... - @property - def is_unspecified(self): ... - @property - def is_loopback(self): ... - @property - def is_link_local(self): ... - -class IPv4Interface(IPv4Address): - network = ... # type: Any - netmask = ... # type: Any - hostmask = ... # type: Any - def __init__(self, address): ... - def __eq__(self, other): ... - def __lt__(self, other): ... - def __hash__(self): ... - @property - def ip(self): ... - @property - def with_prefixlen(self): ... - @property - def with_netmask(self): ... - @property - def with_hostmask(self): ... - -class IPv4Network(_BaseV4, _BaseNetwork): - network_address = ... # type: Any - netmask = ... # type: Any - hosts = ... # type: Any - def __init__(self, address, strict=True): ... - @property - def is_global(self): ... - -class _BaseV6: - def __init__(self, address): ... - @property - def max_prefixlen(self): ... - @property - def version(self): ... - -class IPv6Address(_BaseV6, _BaseAddress): - def __init__(self, address): ... - @property - def packed(self): ... - @property - def is_multicast(self): ... - @property - def is_reserved(self): ... - @property - def is_link_local(self): ... - @property - def is_site_local(self): ... - @property - def is_private(self): ... - @property - def is_global(self): ... - @property - def is_unspecified(self): ... - @property - def is_loopback(self): ... - @property - def ipv4_mapped(self): ... - @property - def teredo(self): ... - @property - def sixtofour(self): ... - -class IPv6Interface(IPv6Address): - network = ... # type: Any - netmask = ... # type: Any - hostmask = ... # type: Any - def __init__(self, address): ... - def __eq__(self, other): ... - def __lt__(self, other): ... - def __hash__(self): ... - @property - def ip(self): ... - @property - def with_prefixlen(self): ... - @property - def with_netmask(self): ... - @property - def with_hostmask(self): ... - @property - def is_unspecified(self): ... - @property - def is_loopback(self): ... - -class IPv6Network(_BaseV6, _BaseNetwork): - network_address = ... # type: Any - netmask = ... # type: Any - hosts = ... # type: Any - def __init__(self, address, strict=True): ... - def hosts(self): ... - @property - def is_site_local(self): ... diff --git a/stubs/3.4/asyncio/__init__.pyi b/stubs/3.4/asyncio/__init__.pyi deleted file mode 100644 index 1f86a7422c4e..000000000000 --- a/stubs/3.4/asyncio/__init__.pyi +++ /dev/null @@ -1,13 +0,0 @@ -"""The asyncio package, tracking PEP 3156.""" -from asyncio.futures import Future -from asyncio.tasks import (coroutine, sleep, Task, FIRST_COMPLETED, - FIRST_EXCEPTION, ALL_COMPLETED, wait, wait_for) -from asyncio.events import (AbstractEventLoopPolicy, AbstractEventLoop, - Handle, get_event_loop) -from asyncio.queues import (Queue, PriorityQueue, LifoQueue, JoinableQueue, - QueueFull, QueueEmpty) - -__all__ = (futures.__all__ + - tasks.__all__ + - events.__all__ + - queues.__all__) diff --git a/stubs/3.4/asyncio/events.pyi b/stubs/3.4/asyncio/events.pyi deleted file mode 100644 index 34a462fc782d..000000000000 --- a/stubs/3.4/asyncio/events.pyi +++ /dev/null @@ -1,172 +0,0 @@ -from typing import Any, TypeVar, List, Callable, Tuple, Union, Dict -from abc import ABCMeta, abstractmethod -from asyncio.futures import Future - -# __all__ = ['AbstractServer', -# 'TimerHandle', -# 'get_event_loop_policy', 'set_event_loop_policy', -# 'set_event_loop', 'new_event_loop', -# 'get_child_watcher', 'set_child_watcher', -# ] - - -__all__ = ['AbstractEventLoopPolicy', 'AbstractEventLoop', 'Handle', 'get_event_loop'] - -_T = TypeVar('_T') - -PIPE = ... # type: Any # from subprocess.PIPE - -AF_UNSPEC = 0 # from socket -AI_PASSIVE = 0 - -class Handle: - __slots__ = [] # type: List[str] - _cancelled = False - _args = [] # type: List[Any] - def __init__(self, callback: Callable[[],Any], args: List[Any], - loop: AbstractEventLoop) -> None: ... - def __repr__(self) -> str: ... - def cancel(self) -> None: ... - def _run(self) -> None: ... - - -class AbstractEventLoop(metaclass=ABCMeta): - @abstractmethod - def run_forever(self) -> None: ... - @abstractmethod - def run_until_complete(self, future: Future[_T]) -> _T: ... - @abstractmethod - def stop(self) -> None: ... - @abstractmethod - def is_running(self) -> bool: ... - @abstractmethod - def close(self) -> None: ... - # Methods scheduling callbacks. All these return Handles. - @abstractmethod - def call_soon(self, callback: Callable[[],Any], *args: Any) -> Handle: ... - @abstractmethod - def call_later(self, delay: Union[int, float], callback: Callable[[],Any], *args: Any) -> Handle: ... - @abstractmethod - def call_at(self, when: float, callback: Callable[[],Any], *args: Any) -> Handle: ... - @abstractmethod - def time(self) -> float: ... - # Methods for interacting with threads - @abstractmethod - def call_soon_threadsafe(self, callback: Callable[[],Any], *args: Any) -> Handle: ... - @abstractmethod - def run_in_executor(self, executor: Any, - callback: Callable[[],Any], *args: Any) -> Future[Any]: ... - @abstractmethod - def set_default_executor(self, executor: Any) -> None: ... - # Network I/O methods returning Futures. - @abstractmethod - def getaddrinfo(self, host: str, port: int, *, - family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> List[Tuple[int, int, int, str, tuple]]: ... - @abstractmethod - def getnameinfo(self, sockaddr: tuple, flags: int = 0) -> Tuple[str, int]: ... - @abstractmethod - def create_connection(self, protocol_factory: Any, host: str = None, port: int = None, *, - ssl: Any = None, family: int = 0, proto: int = 0, flags: int = 0, sock: Any = None, - local_addr: str = None, server_hostname: str = None) -> tuple: ... - # ?? check Any - # return (Transport, Protocol) - @abstractmethod - def create_server(self, protocol_factory: Any, host: str = None, port: int = None, *, - family: int = AF_UNSPEC, flags: int = AI_PASSIVE, - sock: Any = None, backlog: int = 100, ssl: Any = None, reuse_address: Any = None) -> Any: ... - # ?? check Any - # return Server - @abstractmethod - def create_unix_connection(self, protocol_factory: Any, path: str, *, - ssl: Any = None, sock: Any = None, - server_hostname: str = None) -> tuple: ... - # ?? check Any - # return tuple(Transport, Protocol) - @abstractmethod - def create_unix_server(self, protocol_factory: Any, path: str, *, - sock: Any = None, backlog: int = 100, ssl: Any = None) -> Any: ... - # ?? check Any - # return Server - @abstractmethod - def create_datagram_endpoint(self, protocol_factory: Any, - local_addr: str = None, remote_addr: str = None, *, - family: int = 0, proto: int = 0, flags: int = 0) -> tuple: ... - #?? check Any - # return (Transport, Protocol) - # Pipes and subprocesses. - @abstractmethod - def connect_read_pipe(self, protocol_factory: Any, pipe: Any) -> tuple: ... - #?? check Any - # return (Transport, Protocol) - @abstractmethod - def connect_write_pipe(self, protocol_factory: Any, pipe: Any) -> tuple: ... - #?? check Any - # return (Transport, Protocol) - @abstractmethod - def subprocess_shell(self, protocol_factory: Any, cmd: Union[bytes, str], *, stdin: Any = PIPE, - stdout: Any = PIPE, stderr: Any = PIPE, - **kwargs: Dict[str, Any]) -> tuple: ... - #?? check Any - # return (Transport, Protocol) - @abstractmethod - def subprocess_exec(self, protocol_factory: Any, *args: List[Any], stdin: Any = PIPE, - stdout: Any = PIPE, stderr: Any = PIPE, - **kwargs: Dict[str, Any]) -> tuple: ... - #?? check Any - # return (Transport, Protocol) - @abstractmethod - def add_reader(self, fd: int, callback: Callable[[],Any], *args: List[Any]) -> None: ... - @abstractmethod - def remove_reader(self, fd: int) -> None: ... - @abstractmethod - def add_writer(self, fd: int, callback: Callable[[],Any], *args: List[Any]) -> None: ... - @abstractmethod - def remove_writer(self, fd: int) -> None: ... - # Completion based I/O methods returning Futures. - @abstractmethod - def sock_recv(self, sock: Any, nbytes: int) -> Any: ... #TODO - @abstractmethod - def sock_sendall(self, sock: Any, data: bytes) -> None: ... #TODO - @abstractmethod - def sock_connect(self, sock: Any, address: str) -> Any: ... #TODO - @abstractmethod - def sock_accept(self, sock: Any) -> Any: ... - # Signal handling. - @abstractmethod - def add_signal_handler(self, sig: int, callback: Callable[[],Any], *args: List[Any]) -> None: ... - @abstractmethod - def remove_signal_handler(self, sig: int) -> None: ... - # Error handlers. - @abstractmethod - def set_exception_handler(self, handler: Callable[[], Any]) -> None: ... - @abstractmethod - def default_exception_handler(self, context: Any) -> None: ... - @abstractmethod - def call_exception_handler(self, context: Any) -> None: ... - # Debug flag management. - @abstractmethod - def get_debug(self) -> bool: ... - @abstractmethod - def set_debug(self, enabled: bool) -> None: ... - -class AbstractEventLoopPolicy(metaclass=ABCMeta): - @abstractmethod - def get_event_loop(self) -> AbstractEventLoop: ... - @abstractmethod - def set_event_loop(self, loop: AbstractEventLoop): ... - @abstractmethod - def new_event_loop(self) -> Any: ... # return selector_events.BaseSelectorEventLoop - # Child processes handling (Unix only). - @abstractmethod - def get_child_watcher(self) -> Any: ... # return unix_events.AbstractChildWatcher - @abstractmethod - def set_child_watcher(self, watcher: Any) -> None: ... # gen unix_events.AbstractChildWatcher - -class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy): - def __init__(self) -> None: ... - def get_event_loop(self) -> AbstractEventLoop: ... - def set_event_loop(self, loop: AbstractEventLoop): ... - def new_event_loop(self) -> Any: ... # Same return than AbstractEventLoop - - -def get_event_loop() -> AbstractEventLoop: ... diff --git a/stubs/3.4/asyncio/futures.pyi b/stubs/3.4/asyncio/futures.pyi deleted file mode 100644 index fb21cd6827a3..000000000000 --- a/stubs/3.4/asyncio/futures.pyi +++ /dev/null @@ -1,41 +0,0 @@ -from typing import Any, Callable, TypeVar, List, Generic, Iterable, Iterator -from asyncio.events import AbstractEventLoop -# __all__ = ['CancelledError', 'TimeoutError', -# 'InvalidStateError', -# 'wrap_future', -# ] -__all__ = ['Future'] - -_T = TypeVar('_T') - -class _TracebackLogger: - __slots__ = [] # type: List[str] - exc = Any # Exception - tb = [] # type: List[str] - def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ... - def activate(self) -> None: ... - def clear(self) -> None: ... - def __del__(self) -> None: ... - -class Future(Iterator[_T], Generic[_T]): - _state = '' - _exception = Any #Exception - _blocking = False - _log_traceback = False - _tb_logger = _TracebackLogger - def __init__(self, *, loop: AbstractEventLoop = None) -> None: ... - def __repr__(self) -> str: ... - def __del__(self) -> None: ... - def cancel(self) -> bool: ... - def _schedule_callbacks(self) -> None: ... - def cancelled(self) -> bool: ... - def done(self) -> bool: ... - def result(self) -> _T: ... - def exception(self) -> Any: ... - def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ... - def remove_done_callback(self, fn: Callable[[Future[_T]], Any]) -> int: ... - def set_result(self, result: _T) -> None: ... - def set_exception(self, exception: Any) -> None: ... - def _copy_state(self, other: Any) -> None: ... - def __iter__(self) -> Iterator[_T]: ... - def __next__(self) -> _T: ... diff --git a/stubs/3.4/asyncio/queues.pyi b/stubs/3.4/asyncio/queues.pyi deleted file mode 100644 index 2b7b0945f54e..000000000000 --- a/stubs/3.4/asyncio/queues.pyi +++ /dev/null @@ -1,47 +0,0 @@ -from typing import TypeVar, Generic - -__all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', - 'QueueFull', 'QueueEmpty'] - -from asyncio.events import AbstractEventLoop -from .tasks import coroutine - - -class QueueEmpty(Exception): ... -class QueueFull(Exception): ... - -T = TypeVar('T') - -class Queue(Generic[T]): - def __init__(self, maxsize: int = 0, *, loop: AbstractEventLoop = None) -> None: ... - def _init(self, maxsize: int) -> None: ... - def _get(self) -> T: ... - def _put(self, item: T) -> None: ... - def __repr__(self) -> str: ... - def __str__(self) -> str: ... - def _format(self) -> str: ... - def _consume_done_getters(self) -> None: ... - def _consume_done_putters(self) -> None: ... - def qsize(self) -> int: ... - @property - def maxsize(self) -> int: ... - def empty(self) -> bool: ... - def full(self) -> bool: ... - @coroutine - def put(self, item: T) -> None: ... - def put_nowait(self, item: T) -> None: ... - @coroutine - def get(self) -> T: ... - def get_nowait(self) -> T: ... - - -class PriorityQueue(Queue): ... - - -class LifoQueue(Queue): ... - - -class JoinableQueue(Queue): - def task_done(self) -> None: ... - @coroutine - def join(self) -> None: ... diff --git a/stubs/3.4/asyncio/tasks.pyi b/stubs/3.4/asyncio/tasks.pyi deleted file mode 100644 index 82a3b8899e2e..000000000000 --- a/stubs/3.4/asyncio/tasks.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from typing import Any, Iterable, TypeVar, Set, Dict, List, TextIO, Union, Tuple, Generic, Callable -from asyncio.events import AbstractEventLoop -from asyncio.futures import Future -# __all__ = ['iscoroutinefunction', 'iscoroutine', -# 'as_completed', 'async', -# 'gather', 'shield', -# ] - -__all__ = ['coroutine', 'Task', 'sleep', - 'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED', - 'wait', 'wait_for'] - -FIRST_EXCEPTION = 'FIRST_EXCEPTION' -FIRST_COMPLETED = 'FIRST_COMPLETED' -ALL_COMPLETED = 'ALL_COMPLETED' -_T = TypeVar('_T') -def coroutine(f: _T) -> _T: ... # Here comes and go a function -def sleep(delay: float, result: _T = None, loop: AbstractEventLoop = None) -> Future[_T]: ... -def wait(fs: List[Task[_T]], *, loop: AbstractEventLoop = None, - timeout: float = None, return_when: str = ALL_COMPLETED) -> Future[Tuple[Set[Future[_T]], Set[Future[_T]]]]: ... -def wait_for(fut: Future[_T], timeout: float, *, loop: AbstractEventLoop = None) -> Future[_T]: ... - - -class Task(Future[_T], Generic[_T]): - _all_tasks = None # type: Set[Task] - _current_tasks = {} # type: Dict[AbstractEventLoop, Task] - @classmethod - def current_task(cls, loop: AbstractEventLoop = None) -> Task: ... - @classmethod - def all_tasks(cls, loop: AbstractEventLoop = None) -> Set[Task]: ... - def __init__(self, coro: Future[_T], *, loop: AbstractEventLoop = None) -> None: ... - def __repr__(self) -> str: ... - def get_stack(self, *, limit: int = None) -> List[Any]: ... # return List[stackframe] - def print_stack(self, *, limit: int = None, file: TextIO = None) -> None: ... - def cancel(self) -> bool: ... - def _step(self, value: Any = None, exc: Exception = None) -> None: ... - def _wakeup(self, future: Future[Any]) -> None: ... - diff --git a/stubs/3.4/enum.pyi b/stubs/3.4/enum.pyi deleted file mode 100644 index 8cd5757b18f5..000000000000 --- a/stubs/3.4/enum.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import List, Any, TypeVar - -class Enum: - def __new__(cls, value: Any) -> None: ... - def __repr__(self) -> str: ... - def __str__(self) -> str: ... - def __dir__(self) -> List[str]: ... - def __format__(self, format_spec: str) -> str: ... - def __hash__(self) -> Any: ... - def __reduce_ex__(self, proto: Any) -> Any: ... - - name = '' - value = None # type: Any - -class IntEnum(int, Enum): ... - -_T = TypeVar('_T') - -def unique(enumeration: _T) -> _T: ... diff --git a/stubs/3.4/pathlib.pyi b/stubs/3.4/pathlib.pyi deleted file mode 100644 index 0dc26a6d1ff4..000000000000 --- a/stubs/3.4/pathlib.pyi +++ /dev/null @@ -1,164 +0,0 @@ -# Stubs for pathlib (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from collections import Sequence - -class _Flavour: - join = ... # type: Any - def __init__(self): ... - def parse_parts(self, parts): ... - def join_parsed_parts(self, drv, root, parts, drv2, root2, parts2): ... - -class _WindowsFlavour(_Flavour): - sep = ... # type: Any - altsep = ... # type: Any - has_drv = ... # type: Any - pathmod = ... # type: Any - is_supported = ... # type: Any - drive_letters = ... # type: Any - ext_namespace_prefix = ... # type: Any - reserved_names = ... # type: Any - def splitroot(self, part, sep=...): ... - def casefold(self, s): ... - def casefold_parts(self, parts): ... - def resolve(self, path): ... - def is_reserved(self, parts): ... - def make_uri(self, path): ... - -class _PosixFlavour(_Flavour): - sep = ... # type: Any - altsep = ... # type: Any - has_drv = ... # type: Any - pathmod = ... # type: Any - is_supported = ... # type: Any - def splitroot(self, part, sep=...): ... - def casefold(self, s): ... - def casefold_parts(self, parts): ... - def resolve(self, path): ... - def is_reserved(self, parts): ... - def make_uri(self, path): ... - -class _Accessor: ... - -class _NormalAccessor(_Accessor): - stat = ... # type: Any - lstat = ... # type: Any - open = ... # type: Any - listdir = ... # type: Any - chmod = ... # type: Any - lchmod = ... # type: Any - mkdir = ... # type: Any - unlink = ... # type: Any - rmdir = ... # type: Any - rename = ... # type: Any - replace = ... # type: Any - def symlink(a, b, target_is_directory): ... - utime = ... # type: Any - def readlink(self, path): ... - -class _Selector: - child_parts = ... # type: Any - successor = ... # type: Any - def __init__(self, child_parts): ... - def select_from(self, parent_path): ... - -class _TerminatingSelector: ... - -class _PreciseSelector(_Selector): - name = ... # type: Any - def __init__(self, name, child_parts): ... - -class _WildcardSelector(_Selector): - pat = ... # type: Any - def __init__(self, pat, child_parts): ... - -class _RecursiveWildcardSelector(_Selector): - def __init__(self, pat, child_parts): ... - -class _PathParents(Sequence): - def __init__(self, path): ... - def __len__(self): ... - def __getitem__(self, idx): ... - -class PurePath: - def __init__(self, *args): ... - def __reduce__(self): ... - def as_posix(self): ... - def __bytes__(self): ... - def as_uri(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def __hash__(self): ... - def __lt__(self, other): ... - def __le__(self, other): ... - def __gt__(self, other): ... - def __ge__(self, other): ... - drive = ... # type: Any - root = ... # type: Any - @property - def anchor(self): ... - @property - def name(self): ... - @property - def suffix(self): ... - @property - def suffixes(self): ... - @property - def stem(self): ... - def with_name(self, name): ... - def with_suffix(self, suffix): ... - def relative_to(self, *other): ... - @property - def parts(self): ... - def joinpath(self, *args): ... - def __truediv__(self, key): ... - def __rtruediv__(self, key): ... - @property - def parent(self): ... - @property - def parents(self): ... - def is_absolute(self): ... - def is_reserved(self): ... - def match(self, path_pattern): ... - -class PurePosixPath(PurePath): ... -class PureWindowsPath(PurePath): ... - -class Path(PurePath): - def __init__(self, *args, **kwargs): ... - def __enter__(self): ... - def __exit__(self, t, v, tb): ... - @classmethod - def cwd(cls): ... - def iterdir(self): ... - def glob(self, pattern): ... - def rglob(self, pattern): ... - def absolute(self): ... - def resolve(self): ... - def stat(self): ... - def owner(self): ... - def group(self): ... - def open(self, mode='', buffering=-1, encoding=None, errors=None, newline=None): ... - def touch(self, mode=438, exist_ok=True): ... - def mkdir(self, mode=511, parents=False): ... - def chmod(self, mode): ... - def lchmod(self, mode): ... - def unlink(self): ... - def rmdir(self): ... - def lstat(self): ... - def rename(self, target): ... - def replace(self, target): ... - def symlink_to(self, target, target_is_directory=False): ... - def exists(self): ... - def is_dir(self): ... - def is_file(self): ... - def is_symlink(self): ... - def is_block_device(self): ... - def is_char_device(self): ... - def is_fifo(self): ... - def is_socket(self): ... - -class PosixPath(Path, PurePosixPath): ... -class WindowsPath(Path, PureWindowsPath): ... diff --git a/stubs/third-party-2.7/Crypto/Cipher/AES.pyi b/stubs/third-party-2.7/Crypto/Cipher/AES.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/Crypto/Cipher/__init__.pyi b/stubs/third-party-2.7/Crypto/Cipher/__init__.pyi deleted file mode 100644 index b6e2a04d73c9..000000000000 --- a/stubs/third-party-2.7/Crypto/Cipher/__init__.pyi +++ /dev/null @@ -1,15 +0,0 @@ -# Stubs for Crypto.Cipher (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# Names in __all__ with no definition: -# AES -# ARC2 -# ARC4 -# Blowfish -# CAST -# DES -# DES3 -# PKCS1_OAEP -# PKCS1_v1_5 -# XOR diff --git a/stubs/third-party-2.7/Crypto/Random/__init__.pyi b/stubs/third-party-2.7/Crypto/Random/__init__.pyi deleted file mode 100644 index c13ab8232868..000000000000 --- a/stubs/third-party-2.7/Crypto/Random/__init__.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for Crypto.Random (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def get_random_bytes(n: int) -> str: ... diff --git a/stubs/third-party-2.7/Crypto/Random/random.pyi b/stubs/third-party-2.7/Crypto/Random/random.pyi deleted file mode 100644 index 76f27809170b..000000000000 --- a/stubs/third-party-2.7/Crypto/Random/random.pyi +++ /dev/null @@ -1,3 +0,0 @@ -# very stubby version of Crypto.Random - -def randint(min: int, max: int) -> int: ... diff --git a/stubs/third-party-2.7/Crypto/__init__.py b/stubs/third-party-2.7/Crypto/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/OpenSSL/__init__.pyi b/stubs/third-party-2.7/OpenSSL/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/OpenSSL/crypto.pyi b/stubs/third-party-2.7/OpenSSL/crypto.pyi deleted file mode 100644 index ef352acacfe3..000000000000 --- a/stubs/third-party-2.7/OpenSSL/crypto.pyi +++ /dev/null @@ -1,6 +0,0 @@ -class X509: - ... - -def sign(key: str, data: str, digest: str) -> str: ... -def verify(certificate: X509, signature: str, data: str, digest: str) -> None: - raise Exception() diff --git a/stubs/third-party-2.7/boto/__init__.pyi b/stubs/third-party-2.7/boto/__init__.pyi deleted file mode 100644 index ff3b32e81c7e..000000000000 --- a/stubs/third-party-2.7/boto/__init__.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# Stubs for boto (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import logging - -Version = ... # type: Any -UserAgent = ... # type: Any -config = ... # type: Any -BUCKET_NAME_RE = ... # type: Any -TOO_LONG_DNS_NAME_COMP = ... # type: Any -GENERATION_RE = ... # type: Any -VERSION_RE = ... # type: Any -ENDPOINTS_PATH = ... # type: Any - -def init_logging(): ... - -class NullHandler(logging.Handler): - def emit(self, record): ... - -log = ... # type: Any -perflog = ... # type: Any - -def set_file_logger(name, filepath, level=..., format_string=None): ... -def set_stream_logger(name, level=..., format_string=None): ... -def connect_sqs(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_gs(gs_access_key_id=None, gs_secret_access_key=None, **kwargs): ... -def connect_ec2(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_elb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_autoscale(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudwatch(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_sdb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_fps(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_mturk(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudfront(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_vpc(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_rds(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_rds2(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_emr(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_sns(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_iam(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_route53(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudformation(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_euca(host=None, aws_access_key_id=None, aws_secret_access_key=None, port=8773, path='', is_secure=False, **kwargs): ... -def connect_glacier(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_ec2_endpoint(url, aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_walrus(host=None, aws_access_key_id=None, aws_secret_access_key=None, port=8773, path='', is_secure=False, **kwargs): ... -def connect_ses(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_sts(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_ia(ia_access_key_id=None, ia_secret_access_key=None, is_secure=False, **kwargs): ... -def connect_dynamodb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_swf(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudsearch(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudsearch2(aws_access_key_id=None, aws_secret_access_key=None, sign_request=False, **kwargs): ... -def connect_cloudsearchdomain(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_beanstalk(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_elastictranscoder(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_opsworks(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_redshift(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_support(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudtrail(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_directconnect(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_kinesis(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_logs(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_route53domains(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cognito_identity(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cognito_sync(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_kms(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_awslambda(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_codedeploy(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_configservice(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_cloudhsm(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_ec2containerservice(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def connect_machinelearning(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): ... -def storage_uri(uri_str, default_scheme='', debug=0, validate=True, bucket_storage_uri_class=..., suppress_consec_slashes=True, is_latest=False): ... -def storage_uri_for_key(key): ... diff --git a/stubs/third-party-2.7/boto/connection.pyi b/stubs/third-party-2.7/boto/connection.pyi deleted file mode 100644 index daac8cfb58df..000000000000 --- a/stubs/third-party-2.7/boto/connection.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# Stubs for boto.connection (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -HAVE_HTTPS_CONNECTION = ... # type: Any -ON_APP_ENGINE = ... # type: Any -PORTS_BY_SECURITY = ... # type: Any -DEFAULT_CA_CERTS_FILE = ... # type: Any - -class HostConnectionPool: - queue = ... # type: Any - def __init__(self): ... - def size(self): ... - def put(self, conn): ... - def get(self): ... - def clean(self): ... - -class ConnectionPool: - CLEAN_INTERVAL = ... # type: Any - STALE_DURATION = ... # type: Any - host_to_pool = ... # type: Any - last_clean_time = ... # type: Any - mutex = ... # type: Any - def __init__(self): ... - def size(self): ... - def get_http_connection(self, host, port, is_secure): ... - def put_http_connection(self, host, port, is_secure, conn): ... - def clean(self): ... - -class HTTPRequest: - method = ... # type: Any - protocol = ... # type: Any - host = ... # type: Any - port = ... # type: Any - path = ... # type: Any - auth_path = ... # type: Any - params = ... # type: Any - headers = ... # type: Any - body = ... # type: Any - def __init__(self, method, protocol, host, port, path, auth_path, params, headers, body): ... - def authorize(self, connection, **kwargs): ... - -class AWSAuthConnection: - suppress_consec_slashes = ... # type: Any - num_retries = ... # type: Any - is_secure = ... # type: Any - https_validate_certificates = ... # type: Any - ca_certificates_file = ... # type: Any - port = ... # type: Any - http_exceptions = ... # type: Any - http_unretryable_exceptions = ... # type: Any - socket_exception_values = ... # type: Any - https_connection_factory = ... # type: Any - protocol = ... # type: Any - host = ... # type: Any - path = ... # type: Any - debug = ... # type: Any - host_header = ... # type: Any - http_connection_kwargs = ... # type: Any - provider = ... # type: Any - auth_service_name = ... # type: Any - request_hook = ... # type: Any - def __init__(self, host, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, path='', provider='', security_token=None, suppress_consec_slashes=True, validate_certs=True, profile_name=None): ... - auth_region_name = ... # type: Any - def connection(self): ... - def aws_access_key_id(self): ... - gs_access_key_id = ... # type: Any - access_key = ... # type: Any - def aws_secret_access_key(self): ... - gs_secret_access_key = ... # type: Any - secret_key = ... # type: Any - def profile_name(self): ... - def get_path(self, path=''): ... - def server_name(self, port=None): ... - proxy = ... # type: Any - proxy_port = ... # type: Any - proxy_user = ... # type: Any - proxy_pass = ... # type: Any - no_proxy = ... # type: Any - use_proxy = ... # type: Any - def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass): ... - def get_http_connection(self, host, port, is_secure): ... - def skip_proxy(self, host): ... - def new_http_connection(self, host, port, is_secure): ... - def put_http_connection(self, host, port, is_secure, connection): ... - def proxy_ssl(self, host=None, port=None): ... - def prefix_proxy_to_path(self, path, host=None): ... - def get_proxy_auth_header(self): ... - def get_proxy_url_with_auth(self): ... - def set_host_header(self, request): ... - def set_request_hook(self, hook): ... - def build_base_http_request(self, method, path, auth_path, params=None, headers=None, data='', host=None): ... - def make_request(self, method, path, headers=None, data='', host=None, auth_path=None, sender=None, override_num_retries=None, params=None, retry_handler=None): ... - def close(self): ... - -class AWSQueryConnection(AWSAuthConnection): - APIVersion = ... # type: Any - ResponseError = ... # type: Any - def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=None, debug=0, https_connection_factory=None, path='', security_token=None, validate_certs=True, profile_name=None, provider=''): ... - def get_utf8_value(self, value): ... - def make_request(self, action, params=None, path='', verb=''): ... - def build_list_params(self, params, items, label): ... - def build_complex_list_params(self, params, items, label, names): ... - def get_list(self, action, params, markers, path='', parent=None, verb=''): ... - def get_object(self, action, params, cls, path='', parent=None, verb=''): ... - def get_status(self, action, params, path='', parent=None, verb=''): ... diff --git a/stubs/third-party-2.7/boto/ec2/__init__.pyi b/stubs/third-party-2.7/boto/ec2/__init__.pyi deleted file mode 100644 index 67908a5337fd..000000000000 --- a/stubs/third-party-2.7/boto/ec2/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for boto.ec2 (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -RegionData = ... # type: Any - -def regions(**kw_params): ... -def connect_to_region(region_name, **kw_params): ... -def get_region(region_name, **kw_params): ... diff --git a/stubs/third-party-2.7/boto/ec2/elb/__init__.pyi b/stubs/third-party-2.7/boto/ec2/elb/__init__.pyi deleted file mode 100644 index 7ea74763c4e5..000000000000 --- a/stubs/third-party-2.7/boto/ec2/elb/__init__.pyi +++ /dev/null @@ -1,43 +0,0 @@ -# Stubs for boto.ec2.elb (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from boto.connection import AWSQueryConnection - -RegionData = ... # type: Any - -def regions(): ... -def connect_to_region(region_name, **kw_params): ... - -class ELBConnection(AWSQueryConnection): - APIVersion = ... # type: Any - DefaultRegionName = ... # type: Any - DefaultRegionEndpoint = ... # type: Any - region = ... # type: Any - def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='', security_token=None, validate_certs=True, profile_name=None): ... - def build_list_params(self, params, items, label): ... - def get_all_load_balancers(self, load_balancer_names=None, marker=None): ... - def create_load_balancer(self, name, zones, listeners=None, subnets=None, security_groups=None, scheme='', complex_listeners=None): ... - def create_load_balancer_listeners(self, name, listeners=None, complex_listeners=None): ... - def delete_load_balancer(self, name): ... - def delete_load_balancer_listeners(self, name, ports): ... - def enable_availability_zones(self, load_balancer_name, zones_to_add): ... - def disable_availability_zones(self, load_balancer_name, zones_to_remove): ... - def modify_lb_attribute(self, load_balancer_name, attribute, value): ... - def get_all_lb_attributes(self, load_balancer_name): ... - def get_lb_attribute(self, load_balancer_name, attribute): ... - def register_instances(self, load_balancer_name, instances): ... - def deregister_instances(self, load_balancer_name, instances): ... - def describe_instance_health(self, load_balancer_name, instances=None): ... - def configure_health_check(self, name, health_check): ... - def set_lb_listener_SSL_certificate(self, lb_name, lb_port, ssl_certificate_id): ... - def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name): ... - def create_lb_cookie_stickiness_policy(self, cookie_expiration_period, lb_name, policy_name): ... - def create_lb_policy(self, lb_name, policy_name, policy_type, policy_attributes): ... - def delete_lb_policy(self, lb_name, policy_name): ... - def set_lb_policies_of_listener(self, lb_name, lb_port, policies): ... - def set_lb_policies_of_backend_server(self, lb_name, instance_port, policies): ... - def apply_security_groups_to_lb(self, name, security_groups): ... - def attach_lb_to_subnets(self, name, subnets): ... - def detach_lb_from_subnets(self, name, subnets): ... diff --git a/stubs/third-party-2.7/concurrent/__init__.pyi b/stubs/third-party-2.7/concurrent/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/concurrent/futures/__init__.pyi b/stubs/third-party-2.7/concurrent/futures/__init__.pyi deleted file mode 100644 index b6b2f8312589..000000000000 --- a/stubs/third-party-2.7/concurrent/futures/__init__.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple - -_T = TypeVar('_T') - -class Future(Generic[_T]): - def cancel(self) -> bool: ... - def cancelled(self) -> bool: ... - def running(self) -> bool: ... - def done(self) -> bool: ... - def result(self, timeout: float = None) -> _T: ... - def exception(self, timeout: float = None) -> Exception: ... - def add_done_callback(self, fn: Callable[[Future], Any]) -> None: ... - - def set_running_or_notify_cancel(self) -> None: ... - def set_result(self, result: _T) -> None: ... - def set_exception(self, exception: Exception) -> None: ... - -class Executor: - def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ... - def map(self, func: Callable[..., _T], *iterables: Any, timeout: float = None) -> Iterable[_T]: ... - def shutdown(self, wait: bool = True) -> None: ... - -class ThreadPoolExecutor(Executor): - def __init__(self, max_workers: int) -> None: ... - -class ProcessPoolExecutor(Executor): - def __init__(self, max_workers: None) -> None: ... - -def wait(fs: Iterable[Future], timeout: float = None, return_when: str = None) -> Tuple[Iterable[Future], Iterable[Future]]: ... - -FIRST_COMPLETED = '' -FIRST_EXCEPTION = '' -ALL_COMPLETED = '' - -def as_completed(fs: Iterable[Future], timeout: float = None) -> Iterator[Future]: ... diff --git a/stubs/third-party-2.7/croniter.pyi b/stubs/third-party-2.7/croniter.pyi deleted file mode 100644 index 154e1cfb76ea..000000000000 --- a/stubs/third-party-2.7/croniter.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for croniter.croniter (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class croniter: - MONTHS_IN_YEAR = ... # type: Any - RANGES = ... # type: Any - DAYS = ... # type: Any - ALPHACONV = ... # type: Any - LOWMAP = ... # type: Any - bad_length = ... # type: Any - tzinfo = ... # type: Any - cur = ... # type: Any - exprs = ... # type: Any - expanded = ... # type: Any - def __init__(self, expr_format, start_time=None): ... - def get_next(self, ret_type=...): ... - def get_prev(self, ret_type=...): ... - def get_current(self, ret_type=...): ... - def __iter__(self): ... - __next__ = ... # type: Any - def all_next(self, ret_type=...): ... - def all_prev(self, ret_type=...): ... - iter = ... # type: Any - def is_leap(self, year): ... diff --git a/stubs/third-party-2.7/fb303/FacebookService.pyi b/stubs/third-party-2.7/fb303/FacebookService.pyi deleted file mode 100644 index def29ced0481..000000000000 --- a/stubs/third-party-2.7/fb303/FacebookService.pyi +++ /dev/null @@ -1,301 +0,0 @@ -# Stubs for fb303.FacebookService (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from thrift.Thrift import TProcessor - -fastbinary = ... # type: Any - -class Iface: - def getName(self): ... - def getVersion(self): ... - def getStatus(self): ... - def getStatusDetails(self): ... - def getCounters(self): ... - def getCounter(self, key): ... - def setOption(self, key, value): ... - def getOption(self, key): ... - def getOptions(self): ... - def getCpuProfile(self, profileDurationInSec): ... - def aliveSince(self): ... - def reinitialize(self): ... - def shutdown(self): ... - -class Client(Iface): - def __init__(self, iprot, oprot=None): ... - def getName(self): ... - def send_getName(self): ... - def recv_getName(self): ... - def getVersion(self): ... - def send_getVersion(self): ... - def recv_getVersion(self): ... - def getStatus(self): ... - def send_getStatus(self): ... - def recv_getStatus(self): ... - def getStatusDetails(self): ... - def send_getStatusDetails(self): ... - def recv_getStatusDetails(self): ... - def getCounters(self): ... - def send_getCounters(self): ... - def recv_getCounters(self): ... - def getCounter(self, key): ... - def send_getCounter(self, key): ... - def recv_getCounter(self): ... - def setOption(self, key, value): ... - def send_setOption(self, key, value): ... - def recv_setOption(self): ... - def getOption(self, key): ... - def send_getOption(self, key): ... - def recv_getOption(self): ... - def getOptions(self): ... - def send_getOptions(self): ... - def recv_getOptions(self): ... - def getCpuProfile(self, profileDurationInSec): ... - def send_getCpuProfile(self, profileDurationInSec): ... - def recv_getCpuProfile(self): ... - def aliveSince(self): ... - def send_aliveSince(self): ... - def recv_aliveSince(self): ... - def reinitialize(self): ... - def send_reinitialize(self): ... - def shutdown(self): ... - def send_shutdown(self): ... - -class Processor(Iface, TProcessor): - def __init__(self, handler): ... - def process(self, iprot, oprot): ... - def process_getName(self, seqid, iprot, oprot): ... - def process_getVersion(self, seqid, iprot, oprot): ... - def process_getStatus(self, seqid, iprot, oprot): ... - def process_getStatusDetails(self, seqid, iprot, oprot): ... - def process_getCounters(self, seqid, iprot, oprot): ... - def process_getCounter(self, seqid, iprot, oprot): ... - def process_setOption(self, seqid, iprot, oprot): ... - def process_getOption(self, seqid, iprot, oprot): ... - def process_getOptions(self, seqid, iprot, oprot): ... - def process_getCpuProfile(self, seqid, iprot, oprot): ... - def process_aliveSince(self, seqid, iprot, oprot): ... - def process_reinitialize(self, seqid, iprot, oprot): ... - def process_shutdown(self, seqid, iprot, oprot): ... - -class getName_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getName_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getVersion_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getVersion_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatus_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatus_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatusDetails_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getStatusDetails_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounters_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounters_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounter_args: - thrift_spec = ... # type: Any - key = ... # type: Any - def __init__(self, key=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCounter_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class setOption_args: - thrift_spec = ... # type: Any - key = ... # type: Any - value = ... # type: Any - def __init__(self, key=None, value=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class setOption_result: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOption_args: - thrift_spec = ... # type: Any - key = ... # type: Any - def __init__(self, key=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOption_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOptions_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getOptions_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCpuProfile_args: - thrift_spec = ... # type: Any - profileDurationInSec = ... # type: Any - def __init__(self, profileDurationInSec=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class getCpuProfile_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class aliveSince_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class aliveSince_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class reinitialize_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class shutdown_args: - thrift_spec = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/third-party-2.7/fb303/__init__.pyi b/stubs/third-party-2.7/fb303/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/gflags.pyi b/stubs/third-party-2.7/gflags.pyi deleted file mode 100644 index 5b2262bf838b..000000000000 --- a/stubs/third-party-2.7/gflags.pyi +++ /dev/null @@ -1,216 +0,0 @@ -from typing import Any, Callable, Dict, Iterable, IO, List, Union -from types import ModuleType - -class FlagsError(Exception): ... - -class DuplicateFlag(FlagsError): ... - -class CantOpenFlagFileError(FlagsError): ... - -class DuplicateFlagCannotPropagateNoneToSwig(DuplicateFlag): ... - -class DuplicateFlagError(DuplicateFlag): - def __init__(self, flagname: str, flag_values: FlagValues, other_flag_values: FlagValues = None) -> None: ... - -class IllegalFlagValue(FlagsError): ... - -class UnrecognizedFlag(FlagsError): ... - -class UnrecognizedFlagError(UnrecognizedFlag): - def __init__(self, flagname: str, flagvalue: str = '') -> None: ... - -def GetHelpWidth() -> int: ... -def CutCommonSpacePrefix(text) -> str: ... -def TextWrap(text: str, length: int = None, indent: str = '', firstline_indent: str = None, tabs: str = ' ') -> str: ... -def DocToHelp(doc: str) -> str: ... - -class FlagValues: - def __init__(self) -> None: ... - def UseGnuGetOpt(self, use_gnu_getopt: bool = True) -> None: ... - def IsGnuGetOpt(self) -> bool: ... -# TODO dict type - def FlagDict(self) -> dict: ... - def FlagsByModuleDict(self) -> Dict[str, List[Flag]]: ... - def FlagsByModuleIdDict(self) -> Dict[int, List[Flag]]: ... - def KeyFlagsByModuleDict(self) -> Dict[str, List[Flag]]: ... - def FindModuleDefiningFlag(self, flagname: str, default: str = None) -> str: ... - def FindModuleIdDefiningFlag(self, flagname: str, default: int = None) -> int: ... - def AppendFlagValues(self, flag_values: FlagValues) -> None: ... - def RemoveFlagValues(self, flag_values: FlagValues) -> None: ... - def __setitem__(self, name: str, flag: Flag) -> None: ... - def __getitem__(self, name: str) -> Flag: ... - def __getattr__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any): ... - def __delattr__(self, flag_name: str) -> None: ... - def SetDefault(self, name: str, value: Any) -> None: ... - def __contains__(self, name: str) -> bool: ... - has_key = __contains__ - def __iter__(self) -> Iterable[str]: ... - def __call__(self, argv: List[str]) -> List[str]: ... - def Reset(self) -> None: ... - def RegisteredFlags(self) -> List[str]: ... - def FlagValuesDict(self) -> Dict[str, Any]: ... - def __str__(self) -> str: ... - def GetHelp(self, prefix: str = '') -> str: ... - def ModuleHelp(self, module: Union[ModuleType, str]) -> str: ... - def MainModuleHelp(self) -> str: ... - def get(self, name: str, default: Any) -> Any: ... - def ShortestUniquePrefixes(self, fl: Dict[str, Flag]) -> Dict[str, str]: ... - def ExtractFilename(self, flagfile_str: str) -> str: ... - def ReadFlagsFromFiles(self, argv: List[str], force_gnu: bool = True) -> List[str]: ... - def FlagsIntoString(self) -> str: ... - def AppendFlagsIntoFile(self, filename: str) -> None: ... - def WriteHelpInXMLFormat(self, outfile: IO[str] = None) -> None: ... - # TODO validator: gflags_validators.Validator - def AddValidator(self, validator: Any) -> None: ... - -FLAGS = None # type: FlagValues - -class Flag: - name = '' - default = None # type: Any - default_as_str = '' - value = None # type: Any - help = '' - short_name = '' - boolean = False - present = False - parser = None # type: ArgumentParser - serializer = None # type: ArgumentSerializer - allow_override = False - - def __init__(self, parser: ArgumentParser, serializer: ArgumentSerializer, name: str, - default: str, help_string: str, short_name: str = None, boolean: bool = False, - allow_override: bool = False) -> None: ... - def Parse(self, argument: Any) -> Any: ... - def Unparse(self) -> None: ... - def Serialize(self) -> str: ... - def SetDefault(self, value: Any) -> None: ... - def Type(self) -> str: ... - def WriteInfoInXMLFormat(self, outfile: IO[str], module_name: str, is_key: bool = False, indent: str = '') -> None: ... - -class ArgumentParser(object): - syntactic_help = "" -# TODO what is this - def Parse(self, argument: Any) -> Any: ... - def Type(self) -> str: ... - def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str) -> None: ... - -class ArgumentSerializer: - def Serialize(self, value: Any) -> unicode: ... - -class ListSerializer(ArgumentSerializer): - def __init__(self, list_sep: str) -> None: ... - def Serialize(self, value: List[Any]) -> str: ... - -def RegisterValidator(flag_name: str, - checker: Callable[[Any], bool], - message: str = 'Flag validation failed', - flag_values: FlagValues = ...) -> None: ... -def MarkFlagAsRequired(flag_name: str, flag_values: FlagValues = ...) -> None: ... - - - -def DEFINE(parser: ArgumentParser, name: str, default: Any, help: str, - flag_values: FlagValues = ..., serializer: ArgumentSerializer = None, **args: Any) -> None: ... -def DEFINE_flag(flag: Flag, flag_values: FlagValues = ...) -> None: ... -def DECLARE_key_flag(flag_name: str, flag_values: FlagValues = ...) -> None: ... -def ADOPT_module_key_flags(module: ModuleType, flag_values: FlagValues = ...) -> None: ... -def DEFINE_string(name: str, default: str, help: str, flag_values: FlagValues = ..., **args: Any): ... - -class BooleanParser(ArgumentParser): - def Convert(self, argument: Any) -> bool: ... - def Parse(self, argument: Any) -> bool: ... - def Type(self) -> str: ... - -class BooleanFlag(Flag): - def __init__(self, name: str, default: bool, help: str, short_name=None, **args: Any) -> None: ... - -def DEFINE_boolean(name: str, default: bool, help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... - -DEFINE_bool = DEFINE_boolean - -class HelpFlag(BooleanFlag): - def __init__(self) -> None: ... - def Parse(self, arg: Any) -> None: ... - -class HelpXMLFlag(BooleanFlag): - def __init__(self) -> None: ... - def Parse(self, arg: Any) -> None: ... - -class HelpshortFlag(BooleanFlag): - def __init__(self) -> None: ... - def Parse(self, arg: Any) -> None: ... - -class NumericParser(ArgumentParser): - def IsOutsideBounds(self, val: float) -> bool: ... - def Parse(self, argument: Any) -> float: ... - def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str) -> None: ... - def Convert(self, argument: Any) -> Any: ... - -class FloatParser(NumericParser): - number_article = '' - number_name = '' - syntactic_help = '' - def __init__(self, lower_bound: float = None, upper_bound: float = None) -> None: ... - def Convert(self, argument: Any) -> float: ... - def Type(self) -> str: ... - -def DEFINE_float(name: str, default: float, help: str, lower_bound: float = None, - upper_bound: float = None, flag_values: FlagValues = ..., **args: Any) -> None: ... - -class IntegerParser(NumericParser): - number_article = '' - number_name = '' - syntactic_help = '' - def __init__(self, lower_bound: int = None, upper_bound: int = None) -> None: ... - def Convert(self, argument: Any) -> int: ... - def Type(self) -> str: ... - -def DEFINE_integer(name: str, default: int, help: str, lower_bound: int = None, - upper_bound: int = None, flag_values: FlagValues = ..., **args: Any) -> None: ... - -class EnumParser(ArgumentParser): - def __init__(self, enum_values: List[str]) -> None: ... - def Parse(self, argument: Any) -> Any: ... - def Type(self) -> str: ... - -class EnumFlag(Flag): - def __init__(self, name: str, default: str, help: str, enum_values: List[str], - short_name: str, **args: Any) -> None: ... - -def DEFINE_enum(name: str, default: str, enum_values: List[str], help: str, - flag_values: FlagValues = ..., **args: Any) -> None: ... - -class BaseListParser(ArgumentParser): - def __init__(self, token: str = None, name: str = None) -> None: ... - def Parse(self, argument: Any) -> list: ... - def Type(self) -> str: ... - -class ListParser(BaseListParser): - def __init__(self) -> None: ... - def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str): ... - -class WhitespaceSeparatedListParser(BaseListParser): - def __init__(self) -> None: ... - def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str): ... - -def DEFINE_list(name: str, default: List[str], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... -def DEFINE_spaceseplist(name: str, default: List[str], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... - -class MultiFlag(Flag): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def Parse(self, arguments: Any) -> None: ... - def Serialize(self) -> str: ... - def Type(self) -> str: ... - -def DEFINE_multistring(name: str, default: Union[str, List[str]], help: str, - flag_values: FlagValues = ..., **args: Any) -> None: ... - -def DEFINE_multi_int(name: str, default: Union[int, List[int]], help: str, lower_bound: int = None, - upper_bound: int = None, flag_values: FlagValues = FLAGS, **args: Any) -> None: ... - - -def DEFINE_multi_float(name: str, default: Union[float, List[float]], help: str, - lower_bound: float = None, upper_bound: float = None, - flag_values: FlagValues = ..., **args: Any) -> None: ... diff --git a/stubs/third-party-2.7/google/__init__.pyi b/stubs/third-party-2.7/google/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/google/protobuf/__init__.pyi b/stubs/third-party-2.7/google/protobuf/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/google/protobuf/descriptor.pyi b/stubs/third-party-2.7/google/protobuf/descriptor.pyi deleted file mode 100644 index 1ac0e18d7225..000000000000 --- a/stubs/third-party-2.7/google/protobuf/descriptor.pyi +++ /dev/null @@ -1,163 +0,0 @@ -# Stubs for google.protobuf.descriptor (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Error(Exception): ... -class TypeTransformationError(Error): ... - -class DescriptorMetaclass(type): - def __instancecheck__(cls, obj): ... - -class DescriptorBase: - __metaclass__ = ... # type: Any - has_options = ... # type: Any - def __init__(self, options, options_class_name): ... - def GetOptions(self): ... - -class _NestedDescriptorBase(DescriptorBase): - name = ... # type: Any - full_name = ... # type: Any - file = ... # type: Any - containing_type = ... # type: Any - def __init__(self, options, options_class_name, name, full_name, file, containing_type, serialized_start=None, serialized_end=None): ... - def GetTopLevelContainingType(self): ... - def CopyToProto(self, proto): ... - -class Descriptor(_NestedDescriptorBase): - def __new__(cls, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=None, is_extendable=True, extension_ranges=None, oneofs=None, file=None, serialized_start=None, serialized_end=None, syntax=None): ... - fields = ... # type: Any - fields_by_number = ... # type: Any - fields_by_name = ... # type: Any - nested_types = ... # type: Any - nested_types_by_name = ... # type: Any - enum_types = ... # type: Any - enum_types_by_name = ... # type: Any - enum_values_by_name = ... # type: Any - extensions = ... # type: Any - extensions_by_name = ... # type: Any - is_extendable = ... # type: Any - extension_ranges = ... # type: Any - oneofs = ... # type: Any - oneofs_by_name = ... # type: Any - syntax = ... # type: Any - def __init__(self, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=None, is_extendable=True, extension_ranges=None, oneofs=None, file=None, serialized_start=None, serialized_end=None, syntax=None): ... - def EnumValueName(self, enum, value): ... - def CopyToProto(self, proto): ... - -class FieldDescriptor(DescriptorBase): - TYPE_DOUBLE = ... # type: Any - TYPE_FLOAT = ... # type: Any - TYPE_INT64 = ... # type: Any - TYPE_UINT64 = ... # type: Any - TYPE_INT32 = ... # type: Any - TYPE_FIXED64 = ... # type: Any - TYPE_FIXED32 = ... # type: Any - TYPE_BOOL = ... # type: Any - TYPE_STRING = ... # type: Any - TYPE_GROUP = ... # type: Any - TYPE_MESSAGE = ... # type: Any - TYPE_BYTES = ... # type: Any - TYPE_UINT32 = ... # type: Any - TYPE_ENUM = ... # type: Any - TYPE_SFIXED32 = ... # type: Any - TYPE_SFIXED64 = ... # type: Any - TYPE_SINT32 = ... # type: Any - TYPE_SINT64 = ... # type: Any - MAX_TYPE = ... # type: Any - CPPTYPE_INT32 = ... # type: Any - CPPTYPE_INT64 = ... # type: Any - CPPTYPE_UINT32 = ... # type: Any - CPPTYPE_UINT64 = ... # type: Any - CPPTYPE_DOUBLE = ... # type: Any - CPPTYPE_FLOAT = ... # type: Any - CPPTYPE_BOOL = ... # type: Any - CPPTYPE_ENUM = ... # type: Any - CPPTYPE_STRING = ... # type: Any - CPPTYPE_MESSAGE = ... # type: Any - MAX_CPPTYPE = ... # type: Any - LABEL_OPTIONAL = ... # type: Any - LABEL_REQUIRED = ... # type: Any - LABEL_REPEATED = ... # type: Any - MAX_LABEL = ... # type: Any - MAX_FIELD_NUMBER = ... # type: Any - FIRST_RESERVED_FIELD_NUMBER = ... # type: Any - LAST_RESERVED_FIELD_NUMBER = ... # type: Any - def __new__(cls, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=None, has_default_value=True, containing_oneof=None): ... - name = ... # type: Any - full_name = ... # type: Any - index = ... # type: Any - number = ... # type: Any - type = ... # type: Any - cpp_type = ... # type: Any - label = ... # type: Any - has_default_value = ... # type: Any - default_value = ... # type: Any - containing_type = ... # type: Any - message_type = ... # type: Any - enum_type = ... # type: Any - is_extension = ... # type: Any - extension_scope = ... # type: Any - containing_oneof = ... # type: Any - def __init__(self, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=None, has_default_value=True, containing_oneof=None): ... - @staticmethod - def ProtoTypeToCppProtoType(proto_type): ... - -class EnumDescriptor(_NestedDescriptorBase): - def __new__(cls, name, full_name, filename, values, containing_type=None, options=None, file=None, serialized_start=None, serialized_end=None): ... - values = ... # type: Any - values_by_name = ... # type: Any - values_by_number = ... # type: Any - def __init__(self, name, full_name, filename, values, containing_type=None, options=None, file=None, serialized_start=None, serialized_end=None): ... - def CopyToProto(self, proto): ... - -class EnumValueDescriptor(DescriptorBase): - def __new__(cls, name, index, number, type=None, options=None): ... - name = ... # type: Any - index = ... # type: Any - number = ... # type: Any - type = ... # type: Any - def __init__(self, name, index, number, type=None, options=None): ... - -class OneofDescriptor: - def __new__(cls, name, full_name, index, containing_type, fields): ... - name = ... # type: Any - full_name = ... # type: Any - index = ... # type: Any - containing_type = ... # type: Any - fields = ... # type: Any - def __init__(self, name, full_name, index, containing_type, fields): ... - -class ServiceDescriptor(_NestedDescriptorBase): - index = ... # type: Any - methods = ... # type: Any - def __init__(self, name, full_name, index, methods, options=None, file=None, serialized_start=None, serialized_end=None): ... - def FindMethodByName(self, name): ... - def CopyToProto(self, proto): ... - -class MethodDescriptor(DescriptorBase): - name = ... # type: Any - full_name = ... # type: Any - index = ... # type: Any - containing_service = ... # type: Any - input_type = ... # type: Any - output_type = ... # type: Any - def __init__(self, name, full_name, index, containing_service, input_type, output_type, options=None): ... - -class FileDescriptor(DescriptorBase): - def __new__(cls, name, package, options=None, serialized_pb=None, dependencies=None, syntax=None): ... - _options = ... # type: Any - message_types_by_name = ... # type: Any - name = ... # type: Any - package = ... # type: Any - syntax = ... # type: Any - serialized_pb = ... # type: Any - enum_types_by_name = ... # type: Any - extensions_by_name = ... # type: Any - dependencies = ... # type: Any - def __init__(self, name, package, options=None, serialized_pb=None, dependencies=None, syntax=None): ... - def CopyToProto(self, proto): ... - -def MakeDescriptor(desc_proto, package='', build_file_if_cpp=True, syntax=None): ... -def _ParseOptions(message, string): ... diff --git a/stubs/third-party-2.7/google/protobuf/descriptor_pb2.pyi b/stubs/third-party-2.7/google/protobuf/descriptor_pb2.pyi deleted file mode 100644 index 4ac2e4c15063..000000000000 --- a/stubs/third-party-2.7/google/protobuf/descriptor_pb2.pyi +++ /dev/null @@ -1,2 +0,0 @@ -class FileOptions(object): ... -class FieldOptions(object): ... diff --git a/stubs/third-party-2.7/google/protobuf/internal/__init__.pyi b/stubs/third-party-2.7/google/protobuf/internal/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/google/protobuf/internal/decoder.pyi b/stubs/third-party-2.7/google/protobuf/internal/decoder.pyi deleted file mode 100644 index b6b990f31a1c..000000000000 --- a/stubs/third-party-2.7/google/protobuf/internal/decoder.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# Stubs for google.protobuf.internal.decoder (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -def ReadTag(buffer, pos): ... -def EnumDecoder(field_number, is_repeated, is_packed, key, new_default): ... - -Int32Decoder = ... # type: Any -Int64Decoder = ... # type: Any -UInt32Decoder = ... # type: Any -UInt64Decoder = ... # type: Any -SInt32Decoder = ... # type: Any -SInt64Decoder = ... # type: Any -Fixed32Decoder = ... # type: Any -Fixed64Decoder = ... # type: Any -SFixed32Decoder = ... # type: Any -SFixed64Decoder = ... # type: Any -FloatDecoder = ... # type: Any -DoubleDecoder = ... # type: Any -BoolDecoder = ... # type: Any - -def StringDecoder(field_number, is_repeated, is_packed, key, new_default): ... -def BytesDecoder(field_number, is_repeated, is_packed, key, new_default): ... -def GroupDecoder(field_number, is_repeated, is_packed, key, new_default): ... -def MessageDecoder(field_number, is_repeated, is_packed, key, new_default): ... - -MESSAGE_SET_ITEM_TAG = ... # type: Any - -def MessageSetItemDecoder(extensions_by_number): ... -def MapDecoder(field_descriptor, new_default, is_message_map): ... - -SkipField = ... # type: Any diff --git a/stubs/third-party-2.7/google/protobuf/internal/encoder.pyi b/stubs/third-party-2.7/google/protobuf/internal/encoder.pyi deleted file mode 100644 index b04534d0c560..000000000000 --- a/stubs/third-party-2.7/google/protobuf/internal/encoder.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# Stubs for google.protobuf.internal.encoder (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -Int32Sizer = ... # type: Any -UInt32Sizer = ... # type: Any -SInt32Sizer = ... # type: Any -Fixed32Sizer = ... # type: Any -Fixed64Sizer = ... # type: Any -BoolSizer = ... # type: Any - -def StringSizer(field_number, is_repeated, is_packed): ... -def BytesSizer(field_number, is_repeated, is_packed): ... -def GroupSizer(field_number, is_repeated, is_packed): ... -def MessageSizer(field_number, is_repeated, is_packed): ... -def MessageSetItemSizer(field_number): ... -def MapSizer(field_descriptor): ... -def TagBytes(field_number, wire_type): ... - -Int32Encoder = ... # type: Any -UInt32Encoder = ... # type: Any -SInt32Encoder = ... # type: Any -Fixed32Encoder = ... # type: Any -Fixed64Encoder = ... # type: Any -SFixed32Encoder = ... # type: Any -SFixed64Encoder = ... # type: Any -FloatEncoder = ... # type: Any -DoubleEncoder = ... # type: Any - -def BoolEncoder(field_number, is_repeated, is_packed): ... -def StringEncoder(field_number, is_repeated, is_packed): ... -def BytesEncoder(field_number, is_repeated, is_packed): ... -def GroupEncoder(field_number, is_repeated, is_packed): ... -def MessageEncoder(field_number, is_repeated, is_packed): ... -def MessageSetItemEncoder(field_number): ... -def MapEncoder(field_descriptor): ... diff --git a/stubs/third-party-2.7/google/protobuf/internal/enum_type_wrapper.pyi b/stubs/third-party-2.7/google/protobuf/internal/enum_type_wrapper.pyi deleted file mode 100644 index 64d359dfd654..000000000000 --- a/stubs/third-party-2.7/google/protobuf/internal/enum_type_wrapper.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any, Tuple - -class EnumTypeWrapper(object): - def __init__(self, enum_type: Any) -> None: ... - def Name(self, number: int) -> str: ... - def Value(self, name: str) -> int: ... - def keys(self) -> List[str]: ... - def values(self) -> List[int]: ... - - @classmethod - def items(cls) -> List[Tuple[str, int]]: ... diff --git a/stubs/third-party-2.7/google/protobuf/internal/wire_format.pyi b/stubs/third-party-2.7/google/protobuf/internal/wire_format.pyi deleted file mode 100644 index e9fbef321810..000000000000 --- a/stubs/third-party-2.7/google/protobuf/internal/wire_format.pyi +++ /dev/null @@ -1,54 +0,0 @@ -# Stubs for google.protobuf.internal.wire_format (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -TAG_TYPE_BITS = ... # type: Any -TAG_TYPE_MASK = ... # type: Any -WIRETYPE_VARINT = ... # type: Any -WIRETYPE_FIXED64 = ... # type: Any -WIRETYPE_LENGTH_DELIMITED = ... # type: Any -WIRETYPE_START_GROUP = ... # type: Any -WIRETYPE_END_GROUP = ... # type: Any -WIRETYPE_FIXED32 = ... # type: Any -INT32_MAX = ... # type: Any -INT32_MIN = ... # type: Any -UINT32_MAX = ... # type: Any -INT64_MAX = ... # type: Any -INT64_MIN = ... # type: Any -UINT64_MAX = ... # type: Any -FORMAT_UINT32_LITTLE_ENDIAN = ... # type: Any -FORMAT_UINT64_LITTLE_ENDIAN = ... # type: Any -FORMAT_FLOAT_LITTLE_ENDIAN = ... # type: Any -FORMAT_DOUBLE_LITTLE_ENDIAN = ... # type: Any - -def PackTag(field_number, wire_type): ... -def UnpackTag(tag): ... -def ZigZagEncode(value): ... -def ZigZagDecode(value): ... -def Int32ByteSize(field_number, int32): ... -def Int32ByteSizeNoTag(int32): ... -def Int64ByteSize(field_number, int64): ... -def UInt32ByteSize(field_number, uint32): ... -def UInt64ByteSize(field_number, uint64): ... -def SInt32ByteSize(field_number, int32): ... -def SInt64ByteSize(field_number, int64): ... -def Fixed32ByteSize(field_number, fixed32): ... -def Fixed64ByteSize(field_number, fixed64): ... -def SFixed32ByteSize(field_number, sfixed32): ... -def SFixed64ByteSize(field_number, sfixed64): ... -def FloatByteSize(field_number, flt): ... -def DoubleByteSize(field_number, double): ... -def BoolByteSize(field_number, b): ... -def EnumByteSize(field_number, enum): ... -def StringByteSize(field_number, string): ... -def BytesByteSize(field_number, b): ... -def GroupByteSize(field_number, message): ... -def MessageByteSize(field_number, message): ... -def MessageSetItemByteSize(field_number, msg): ... -def TagByteSize(field_number): ... - -NON_PACKABLE_TYPES = ... # type: Any - -def IsTypePackable(field_type): ... diff --git a/stubs/third-party-2.7/google/protobuf/message.pyi b/stubs/third-party-2.7/google/protobuf/message.pyi deleted file mode 100644 index 0ad3325d406e..000000000000 --- a/stubs/third-party-2.7/google/protobuf/message.pyi +++ /dev/null @@ -1,36 +0,0 @@ -# Stubs for google.protobuf.message (Python 2.7) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Sequence, Optional, Tuple - -from .descriptor import FieldDescriptor - -class Error(Exception): ... -class DecodeError(Error): ... -class EncodeError(Error): ... - -class Message: - DESCRIPTOR = ... # type: Any - def __deepcopy__(self, memo=None): ... - def __eq__(self, other_msg): ... - def __ne__(self, other_msg): ... - def MergeFrom(self, other_msg: Message) -> None: ... - def CopyFrom(self, other_msg: Message) -> None: ... - def Clear(self) -> None: ... - def SetInParent(self) -> None: ... - def IsInitialized(self) -> bool: ... - def MergeFromString(self, serialized: Any) -> int: ... # TODO: we need to be able to call buffer() on serialized - def ParseFromString(self, serialized: Any) -> None: ... - def SerializeToString(self) -> str: ... - def SerializePartialToString(self) -> str: ... - def ListFields(self) -> Sequence[Tuple[FieldDescriptor, Any]]: ... - def HasField(self, field_name: str) -> bool: ... - def ClearField(self, field_name: str) -> None: ... - def WhichOneof(self, oneof_group) -> Optional[str]: ... - def HasExtension(self, extension_handle): ... - def ClearExtension(self, extension_handle): ... - def ByteSize(self) -> int: ... - - # TODO: check kwargs - def __init__(self, **kwargs): ... diff --git a/stubs/third-party-2.7/google/protobuf/reflection.pyi b/stubs/third-party-2.7/google/protobuf/reflection.pyi deleted file mode 100644 index ddd7347244df..000000000000 --- a/stubs/third-party-2.7/google/protobuf/reflection.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Stubs for google.protobuf.reflection (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class GeneratedProtocolMessageType(type): - def __new__(cls, name, bases, dictionary): ... - def __init__(cls, name, bases, dictionary): ... - -def ParseMessage(descriptor, byte_str): ... -def MakeClass(descriptor): ... diff --git a/stubs/third-party-2.7/kazoo/__init__.pyi b/stubs/third-party-2.7/kazoo/__init__.pyi deleted file mode 100644 index 70b86487798e..000000000000 --- a/stubs/third-party-2.7/kazoo/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for kazoo (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-2.7/kazoo/client.pyi b/stubs/third-party-2.7/kazoo/client.pyi deleted file mode 100644 index e069ccb9a194..000000000000 --- a/stubs/third-party-2.7/kazoo/client.pyi +++ /dev/null @@ -1,100 +0,0 @@ -# Stubs for kazoo.client (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -string_types = ... # type: Any -bytes_types = ... # type: Any -LOST_STATES = ... # type: Any -ENVI_VERSION = ... # type: Any -ENVI_VERSION_KEY = ... # type: Any -log = ... # type: Any - -class KazooClient: - logger = ... # type: Any - handler = ... # type: Any - auth_data = ... # type: Any - default_acl = ... # type: Any - randomize_hosts = ... # type: Any - hosts = ... # type: Any - chroot = ... # type: Any - state = ... # type: Any - state_listeners = ... # type: Any - read_only = ... # type: Any - retry = ... # type: Any - Barrier = ... # type: Any - Counter = ... # type: Any - DoubleBarrier = ... # type: Any - ChildrenWatch = ... # type: Any - DataWatch = ... # type: Any - Election = ... # type: Any - NonBlockingLease = ... # type: Any - MultiNonBlockingLease = ... # type: Any - Lock = ... # type: Any - Party = ... # type: Any - Queue = ... # type: Any - LockingQueue = ... # type: Any - SetPartitioner = ... # type: Any - Semaphore = ... # type: Any - ShallowParty = ... # type: Any - def __init__(self, hosts='', timeout=0.0, client_id=None, handler=None, default_acl=None, auth_data=None, read_only=None, randomize_hosts=True, connection_retry=None, command_retry=None, logger=None, **kwargs): ... - @property - def client_state(self): ... - @property - def client_id(self): ... - @property - def connected(self): ... - def set_hosts(self, hosts, randomize_hosts=None): ... - def add_listener(self, listener): ... - def remove_listener(self, listener): ... - def start(self, timeout=15): ... - def start_async(self): ... - def stop(self): ... - def restart(self): ... - def close(self): ... - def command(self, cmd=''): ... - def server_version(self, retries=3): ... - def add_auth(self, scheme, credential): ... - def add_auth_async(self, scheme, credential): ... - def unchroot(self, path): ... - def sync_async(self, path): ... - def sync(self, path): ... - def create(self, path, value='', acl=None, ephemeral=False, sequence=False, makepath=False): ... - def create_async(self, path, value='', acl=None, ephemeral=False, sequence=False, makepath=False): ... - def ensure_path(self, path, acl=None): ... - def ensure_path_async(self, path, acl=None): ... - def exists(self, path, watch=None): ... - def exists_async(self, path, watch=None): ... - def get(self, path, watch=None): ... - def get_async(self, path, watch=None): ... - def get_children(self, path, watch=None, include_data=False): ... - def get_children_async(self, path, watch=None, include_data=False): ... - def get_acls(self, path): ... - def get_acls_async(self, path): ... - def set_acls(self, path, acls, version=-1): ... - def set_acls_async(self, path, acls, version=-1): ... - def set(self, path, value, version=-1): ... - def set_async(self, path, value, version=-1): ... - def transaction(self): ... - def delete(self, path, version=-1, recursive=False): ... - def delete_async(self, path, version=-1): ... - def reconfig(self, joining, leaving, new_members, from_config=-1): ... - def reconfig_async(self, joining, leaving, new_members, from_config): ... - -class TransactionRequest: - client = ... # type: Any - operations = ... # type: Any - committed = ... # type: Any - def __init__(self, client): ... - def create(self, path, value='', acl=None, ephemeral=False, sequence=False): ... - def delete(self, path, version=-1): ... - def set_data(self, path, value, version=-1): ... - def check(self, path, version): ... - def commit_async(self): ... - def commit(self): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, exc_tb): ... - -class KazooState: - ... diff --git a/stubs/third-party-2.7/kazoo/exceptions.pyi b/stubs/third-party-2.7/kazoo/exceptions.pyi deleted file mode 100644 index 1450e8181ce6..000000000000 --- a/stubs/third-party-2.7/kazoo/exceptions.pyi +++ /dev/null @@ -1,62 +0,0 @@ -# Stubs for kazoo.exceptions (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class KazooException(Exception): ... -class ZookeeperError(KazooException): ... -class CancelledError(KazooException): ... -class ConfigurationError(KazooException): ... -class ZookeeperStoppedError(KazooException): ... -class ConnectionDropped(KazooException): ... -class LockTimeout(KazooException): ... -class WriterNotClosedException(KazooException): ... - -EXCEPTIONS = ... # type: Any - -class RolledBackError(ZookeeperError): ... -class SystemZookeeperError(ZookeeperError): ... -class RuntimeInconsistency(ZookeeperError): ... -class DataInconsistency(ZookeeperError): ... -class ConnectionLoss(ZookeeperError): ... -class MarshallingError(ZookeeperError): ... -class UnimplementedError(ZookeeperError): ... -class OperationTimeoutError(ZookeeperError): ... -class BadArgumentsError(ZookeeperError): ... -class NewConfigNoQuorumError(ZookeeperError): ... -class ReconfigInProcessError(ZookeeperError): ... -class APIError(ZookeeperError): ... -class NoNodeError(ZookeeperError): ... -class NoAuthError(ZookeeperError): ... -class BadVersionError(ZookeeperError): ... -class NoChildrenForEphemeralsError(ZookeeperError): ... -class NodeExistsError(ZookeeperError): ... -class NotEmptyError(ZookeeperError): ... -class SessionExpiredError(ZookeeperError): ... -class InvalidCallbackError(ZookeeperError): ... -class InvalidACLError(ZookeeperError): ... -class AuthFailedError(ZookeeperError): ... -class SessionMovedError(ZookeeperError): ... -class NotReadOnlyCallError(ZookeeperError): ... -class ConnectionClosedError(SessionExpiredError): ... - -ConnectionLossException = ... # type: Any -MarshallingErrorException = ... # type: Any -SystemErrorException = ... # type: Any -RuntimeInconsistencyException = ... # type: Any -DataInconsistencyException = ... # type: Any -UnimplementedException = ... # type: Any -OperationTimeoutException = ... # type: Any -BadArgumentsException = ... # type: Any -ApiErrorException = ... # type: Any -NoNodeException = ... # type: Any -NoAuthException = ... # type: Any -BadVersionException = ... # type: Any -NoChildrenForEphemeralsException = ... # type: Any -NodeExistsException = ... # type: Any -InvalidACLException = ... # type: Any -AuthFailedException = ... # type: Any -NotEmptyException = ... # type: Any -SessionExpiredException = ... # type: Any -InvalidCallbackException = ... # type: Any diff --git a/stubs/third-party-2.7/kazoo/recipe/__init__.pyi b/stubs/third-party-2.7/kazoo/recipe/__init__.pyi deleted file mode 100644 index 04a7fa2ee1cf..000000000000 --- a/stubs/third-party-2.7/kazoo/recipe/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for kazoo.recipe (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-2.7/kazoo/recipe/watchers.pyi b/stubs/third-party-2.7/kazoo/recipe/watchers.pyi deleted file mode 100644 index 256a022cfa69..000000000000 --- a/stubs/third-party-2.7/kazoo/recipe/watchers.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for kazoo.recipe.watchers (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -log = ... # type: Any - -class DataWatch: - def __init__(self, client, path, func=None, *args, **kwargs): ... - def __call__(self, func): ... - -class ChildrenWatch: - def __init__(self, client, path, func=None, allow_session_lost=True, send_event=False): ... - def __call__(self, func): ... - -class PatientChildrenWatch: - client = ... # type: Any - path = ... # type: Any - children = ... # type: Any - time_boundary = ... # type: Any - children_changed = ... # type: Any - def __init__(self, client, path, time_boundary=30): ... - asy = ... # type: Any - def start(self): ... diff --git a/stubs/third-party-2.7/pycurl.pyi b/stubs/third-party-2.7/pycurl.pyi deleted file mode 100644 index 6b1ca310262f..000000000000 --- a/stubs/third-party-2.7/pycurl.pyi +++ /dev/null @@ -1,81 +0,0 @@ -# TODO(MichalPokorny): more precise types - -from typing import Any, Tuple, Optional - -GLOBAL_SSL = ... # type: int -GLOBAL_WIN32 = ... # type: int -GLOBAL_ALL = ... # type: int -GLOBAL_NOTHING = ... # type: int -GLOBAL_DEFAULT = ... # type: int - -def global_init(option: int) -> None: ... -def global_cleanup() -> None: ... - -version = ... # type: str - -def version_info() -> Tuple[int, str, int, str, int, str, - int, str, tuple, Any, int, Any]: ... - -class error(Exception): - pass - -class Curl(object): - def close(self) -> None: ... - def setopt(self, option: int, value: Any) -> None: ... - def perform(self) -> None: ... - def getinfo(self, info: Any) -> Any: ... - def reset(self) -> None: ... - def unsetopt(self, option: int) -> Any: ... - def pause(self, bitmask: Any) -> Any: ... - def errstr(self) -> str: ... - - # TODO(MichalPokorny): wat? - USERPWD = ... # type: int - -class CurlMulti(object): - def close(self) -> None: ... - def add_handle(self, obj: Curl) -> None: ... - def remove_handle(self, obj: Curl) -> None: ... - def perform(self) -> Tuple[Any, int]: ... - def fdset(self) -> tuple: ... - def select(self, timeout: float = None) -> int: ... - def info_read(self, max_objects: int) -> tuple: ... - -class CurlShare(object): - def close(self) -> None: ... - def setopt(self, option: int, value: Any) -> Any: ... - -CAINFO = ... # type: int -CONNECTTIMEOUT_MS = ... # type: int -CUSTOMREQUEST = ... # type: int -ENCODING = ... # type: int -E_CALL_MULTI_PERFORM = ... # type: int -E_OPERATION_TIMEOUTED = ... # type: int -FOLLOWLOCATION = ... # type: int -HEADERFUNCTION = ... # type: int -HTTPGET = ... # type: int -HTTPHEADER = ... # type: int -HTTP_CODE = ... # type: int -INFILESIE_LARGE = ... # type: int -INFILESIZE_LARGE = ... # type: int -NOBODY = ... # type: int -NOPROGRESS = ... # type: int -NOSIGNAL = ... # type: int -POST = ... # type: int -POSTFIELDS = ... # type: int -POSTFIELDSIZE = ... # type: int -PRIMARY_IP = ... # type: int -PROGRESSFUNCTION = ... # type: int -PROXY = ... # type: int -READFUNCTION = ... # type: int -RESPONSE_CODE = ... # type: int -SSLCERT = ... # type: int -SSLCERTPASSWD = ... # type: int -SSLKEY = ... # type: int -SSLKEYPASSWD = ... # type: int -SSL_VERIFYHOST = ... # type: int -SSL_VERIFYPEER = ... # type: int -TIMEOUT_MS = ... # type: int -UPLOAD = ... # type: int -URL = ... # type: int -WRITEFUNCTION = ... # type: int diff --git a/stubs/third-party-2.7/redis/__init__.pyi b/stubs/third-party-2.7/redis/__init__.pyi deleted file mode 100644 index f1bc24eeb645..000000000000 --- a/stubs/third-party-2.7/redis/__init__.pyi +++ /dev/null @@ -1,28 +0,0 @@ -# Stubs for redis (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -import redis.client -import redis.connection -import redis.utils -import redis.exceptions - -Redis = client.Redis -StrictRedis = client.StrictRedis -BlockingConnectionPool = connection.BlockingConnectionPool -ConnectionPool = connection.ConnectionPool -Connection = connection.Connection -SSLConnection = connection.SSLConnection -UnixDomainSocketConnection = connection.UnixDomainSocketConnection -from_url = utils.from_url -AuthenticationError = exceptions.AuthenticationError -BusyLoadingError = exceptions.BusyLoadingError -ConnectionError = exceptions.ConnectionError -DataError = exceptions.DataError -InvalidResponse = exceptions.InvalidResponse -PubSubError = exceptions.PubSubError -ReadOnlyError = exceptions.ReadOnlyError -RedisError = exceptions.RedisError -ResponseError = exceptions.ResponseError -TimeoutError = exceptions.TimeoutError -WatchError = exceptions.WatchError diff --git a/stubs/third-party-2.7/redis/client.pyi b/stubs/third-party-2.7/redis/client.pyi deleted file mode 100644 index 4c5c293f64bd..000000000000 --- a/stubs/third-party-2.7/redis/client.pyi +++ /dev/null @@ -1,293 +0,0 @@ -# Stubs for redis.client (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -SYM_EMPTY = ... # type: Any - -def list_or_args(keys, args): ... -def timestamp_to_datetime(response): ... -def string_keys_to_dict(key_string, callback): ... -def dict_merge(*dicts): ... -def parse_debug_object(response): ... -def parse_object(response, infotype): ... -def parse_info(response): ... - -SENTINEL_STATE_TYPES = ... # type: Any - -def parse_sentinel_state(item): ... -def parse_sentinel_master(response): ... -def parse_sentinel_masters(response): ... -def parse_sentinel_slaves_and_sentinels(response): ... -def parse_sentinel_get_master(response): ... -def pairs_to_dict(response): ... -def pairs_to_dict_typed(response, type_info): ... -def zset_score_pairs(response, **options): ... -def sort_return_tuples(response, **options): ... -def int_or_none(response): ... -def float_or_none(response): ... -def bool_ok(response): ... -def parse_client_list(response, **options): ... -def parse_config_get(response, **options): ... -def parse_scan(response, **options): ... -def parse_hscan(response, **options): ... -def parse_zscan(response, **options): ... -def parse_slowlog_get(response, **options): ... - -class StrictRedis: - RESPONSE_CALLBACKS = ... # type: Any - @classmethod - def from_url(cls, url, db=None, **kwargs): ... - connection_pool = ... # type: Any - response_callbacks = ... # type: Any - def __init__(self, host='', port=6379, db=0, password=None, socket_timeout=None, socket_connect_timeout=None, socket_keepalive=None, socket_keepalive_options=None, connection_pool=None, unix_socket_path=None, encoding='', encoding_errors='', charset=None, errors=None, decode_responses=False, retry_on_timeout=False, ssl=False, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None): ... - def set_response_callback(self, command, callback): ... - def pipeline(self, transaction=True, shard_hint=None): ... - def transaction(self, func, *watches, **kwargs): ... - def lock(self, name, timeout=None, sleep=0.0, blocking_timeout=None, lock_class=None, thread_local=True): ... - def pubsub(self, **kwargs): ... - def execute_command(self, *args, **options): ... - def parse_response(self, connection, command_name, **options): ... - def bgrewriteaof(self): ... - def bgsave(self): ... - def client_kill(self, address): ... - def client_list(self): ... - def client_getname(self): ... - def client_setname(self, name): ... - def config_get(self, pattern=''): ... - def config_set(self, name, value): ... - def config_resetstat(self): ... - def config_rewrite(self): ... - def dbsize(self): ... - def debug_object(self, key): ... - def echo(self, value): ... - def flushall(self): ... - def flushdb(self): ... - def info(self, section=None): ... - def lastsave(self): ... - def object(self, infotype, key): ... - def ping(self): ... - def save(self): ... - def sentinel(self, *args): ... - def sentinel_get_master_addr_by_name(self, service_name): ... - def sentinel_master(self, service_name): ... - def sentinel_masters(self): ... - def sentinel_monitor(self, name, ip, port, quorum): ... - def sentinel_remove(self, name): ... - def sentinel_sentinels(self, service_name): ... - def sentinel_set(self, name, option, value): ... - def sentinel_slaves(self, service_name): ... - def shutdown(self): ... - def slaveof(self, host=None, port=None): ... - def slowlog_get(self, num=None): ... - def slowlog_len(self): ... - def slowlog_reset(self): ... - def time(self): ... - def append(self, key, value): ... - def bitcount(self, key, start=None, end=None): ... - def bitop(self, operation, dest, *keys): ... - def bitpos(self, key, bit, start=None, end=None): ... - def decr(self, name, amount=1): ... - def delete(self, *names): ... - def __delitem__(self, name): ... - def dump(self, name): ... - def exists(self, name): ... - __contains__ = ... # type: Any - def expire(self, name, time): ... - def expireat(self, name, when): ... - def get(self, name): ... - def __getitem__(self, name): ... - def getbit(self, name, offset): ... - def getrange(self, key, start, end): ... - def getset(self, name, value): ... - def incr(self, name, amount=1): ... - def incrby(self, name, amount=1): ... - def incrbyfloat(self, name, amount=0.0): ... - def keys(self, pattern=''): ... - def mget(self, keys, *args): ... - def mset(self, *args, **kwargs): ... - def msetnx(self, *args, **kwargs): ... - def move(self, name, db): ... - def persist(self, name): ... - def pexpire(self, name, time): ... - def pexpireat(self, name, when): ... - def psetex(self, name, time_ms, value): ... - def pttl(self, name): ... - def randomkey(self): ... - def rename(self, src, dst): ... - def renamenx(self, src, dst): ... - def restore(self, name, ttl, value): ... - def set(self, name, value, ex=None, px=None, nx=False, xx=False): ... - def __setitem__(self, name, value): ... - def setbit(self, name, offset, value): ... - def setex(self, name, time, value): ... - def setnx(self, name, value): ... - def setrange(self, name, offset, value): ... - def strlen(self, name): ... - def substr(self, name, start, end=-1): ... - def ttl(self, name): ... - def type(self, name): ... - def watch(self, *names): ... - def unwatch(self): ... - def blpop(self, keys, timeout=0): ... - def brpop(self, keys, timeout=0): ... - def brpoplpush(self, src, dst, timeout=0): ... - def lindex(self, name, index): ... - def linsert(self, name, where, refvalue, value): ... - def llen(self, name): ... - def lpop(self, name): ... - def lpush(self, name, *values): ... - def lpushx(self, name, value): ... - def lrange(self, name, start, end): ... - def lrem(self, name, count, value): ... - def lset(self, name, index, value): ... - def ltrim(self, name, start, end): ... - def rpop(self, name): ... - def rpoplpush(self, src, dst): ... - def rpush(self, name, *values): ... - def rpushx(self, name, value): ... - def sort(self, name, start=None, num=None, by=None, get=None, desc=False, alpha=False, store=None, groups=False): ... - def scan(self, cursor=0, match=None, count=None): ... - def scan_iter(self, match=None, count=None): ... - def sscan(self, name, cursor=0, match=None, count=None): ... - def sscan_iter(self, name, match=None, count=None): ... - def hscan(self, name, cursor=0, match=None, count=None): ... - def hscan_iter(self, name, match=None, count=None): ... - def zscan(self, name, cursor=0, match=None, count=None, score_cast_func=...): ... - def zscan_iter(self, name, match=None, count=None, score_cast_func=...): ... - def sadd(self, name, *values): ... - def scard(self, name): ... - def sdiff(self, keys, *args): ... - def sdiffstore(self, dest, keys, *args): ... - def sinter(self, keys, *args): ... - def sinterstore(self, dest, keys, *args): ... - def sismember(self, name, value): ... - def smembers(self, name): ... - def smove(self, src, dst, value): ... - def spop(self, name): ... - def srandmember(self, name, number=None): ... - def srem(self, name, *values): ... - def sunion(self, keys, *args): ... - def sunionstore(self, dest, keys, *args): ... - def zadd(self, name, *args, **kwargs): ... - def zcard(self, name): ... - def zcount(self, name, min, max): ... - def zincrby(self, name, value, amount=1): ... - def zinterstore(self, dest, keys, aggregate=None): ... - def zlexcount(self, name, min, max): ... - def zrange(self, name, start, end, desc=False, withscores=False, score_cast_func=...): ... - def zrangebylex(self, name, min, max, start=None, num=None): ... - def zrangebyscore(self, name, min, max, start=None, num=None, withscores=False, score_cast_func=...): ... - def zrank(self, name, value): ... - def zrem(self, name, *values): ... - def zremrangebylex(self, name, min, max): ... - def zremrangebyrank(self, name, min, max): ... - def zremrangebyscore(self, name, min, max): ... - def zrevrange(self, name, start, end, withscores=False, score_cast_func=...): ... - def zrevrangebyscore(self, name, max, min, start=None, num=None, withscores=False, score_cast_func=...): ... - def zrevrank(self, name, value): ... - def zscore(self, name, value): ... - def zunionstore(self, dest, keys, aggregate=None): ... - def pfadd(self, name, *values): ... - def pfcount(self, name): ... - def pfmerge(self, dest, *sources): ... - def hdel(self, name, *keys): ... - def hexists(self, name, key): ... - def hget(self, name, key): ... - def hgetall(self, name): ... - def hincrby(self, name, key, amount=1): ... - def hincrbyfloat(self, name, key, amount=0.0): ... - def hkeys(self, name): ... - def hlen(self, name): ... - def hset(self, name, key, value): ... - def hsetnx(self, name, key, value): ... - def hmset(self, name, mapping): ... - def hmget(self, name, keys, *args): ... - def hvals(self, name): ... - def publish(self, channel, message): ... - def eval(self, script, numkeys, *keys_and_args): ... - def evalsha(self, sha, numkeys, *keys_and_args): ... - def script_exists(self, *args): ... - def script_flush(self): ... - def script_kill(self): ... - def script_load(self, script): ... - def register_script(self, script): ... - -class Redis(StrictRedis): - RESPONSE_CALLBACKS = ... # type: Any - def pipeline(self, transaction=True, shard_hint=None): ... - def setex(self, name, value, time): ... - def lrem(self, name, value, num=0): ... - def zadd(self, name, *args, **kwargs): ... - -class PubSub: - PUBLISH_MESSAGE_TYPES = ... # type: Any - UNSUBSCRIBE_MESSAGE_TYPES = ... # type: Any - connection_pool = ... # type: Any - shard_hint = ... # type: Any - ignore_subscribe_messages = ... # type: Any - connection = ... # type: Any - encoding = ... # type: Any - encoding_errors = ... # type: Any - decode_responses = ... # type: Any - def __init__(self, connection_pool, shard_hint=None, ignore_subscribe_messages=False): ... - def __del__(self): ... - channels = ... # type: Any - patterns = ... # type: Any - def reset(self): ... - def close(self): ... - def on_connect(self, connection): ... - def encode(self, value): ... - @property - def subscribed(self): ... - def execute_command(self, *args, **kwargs): ... - def parse_response(self, block=True): ... - def psubscribe(self, *args, **kwargs): ... - def punsubscribe(self, *args): ... - def subscribe(self, *args, **kwargs): ... - def unsubscribe(self, *args): ... - def listen(self): ... - def get_message(self, ignore_subscribe_messages=False): ... - def handle_message(self, response, ignore_subscribe_messages=False): ... - def run_in_thread(self, sleep_time=0): ... - -class BasePipeline: - UNWATCH_COMMANDS = ... # type: Any - connection_pool = ... # type: Any - connection = ... # type: Any - response_callbacks = ... # type: Any - transaction = ... # type: Any - shard_hint = ... # type: Any - watching = ... # type: Any - def __init__(self, connection_pool, response_callbacks, transaction, shard_hint): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, traceback): ... - def __del__(self): ... - def __len__(self): ... - command_stack = ... # type: Any - scripts = ... # type: Any - explicit_transaction = ... # type: Any - def reset(self): ... - def multi(self): ... - def execute_command(self, *args, **kwargs): ... - def immediate_execute_command(self, *args, **options): ... - def pipeline_execute_command(self, *args, **options): ... - def raise_first_error(self, commands, response): ... - def annotate_exception(self, exception, number, command): ... - def parse_response(self, connection, command_name, **options): ... - def load_scripts(self): ... - def execute(self, raise_on_error=True): ... - def watch(self, *names): ... - def unwatch(self): ... - def script_load_for_pipeline(self, script): ... - -class StrictPipeline(BasePipeline, StrictRedis): ... -class Pipeline(BasePipeline, Redis): ... - -class Script: - registered_client = ... # type: Any - script = ... # type: Any - sha = ... # type: Any - def __init__(self, registered_client, script): ... - def __call__(self, keys=..., args=..., client=None): ... diff --git a/stubs/third-party-2.7/redis/connection.pyi b/stubs/third-party-2.7/redis/connection.pyi deleted file mode 100644 index 160d9153a531..000000000000 --- a/stubs/third-party-2.7/redis/connection.pyi +++ /dev/null @@ -1,135 +0,0 @@ -# Stubs for redis.connection (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -ssl_available = ... # type: Any -hiredis_version = ... # type: Any -HIREDIS_SUPPORTS_CALLABLE_ERRORS = ... # type: Any -HIREDIS_SUPPORTS_BYTE_BUFFER = ... # type: Any -msg = ... # type: Any -HIREDIS_USE_BYTE_BUFFER = ... # type: Any -SYM_STAR = ... # type: Any -SYM_DOLLAR = ... # type: Any -SYM_CRLF = ... # type: Any -SYM_EMPTY = ... # type: Any -SERVER_CLOSED_CONNECTION_ERROR = ... # type: Any - -class Token: - value = ... # type: Any - def __init__(self, value): ... - -class BaseParser: - EXCEPTION_CLASSES = ... # type: Any - def parse_error(self, response): ... - -class SocketBuffer: - socket_read_size = ... # type: Any - bytes_written = ... # type: Any - bytes_read = ... # type: Any - def __init__(self, socket, socket_read_size): ... - @property - def length(self): ... - def read(self, length): ... - def readline(self): ... - def purge(self): ... - def close(self): ... - -class PythonParser(BaseParser): - encoding = ... # type: Any - socket_read_size = ... # type: Any - def __init__(self, socket_read_size): ... - def __del__(self): ... - def on_connect(self, connection): ... - def on_disconnect(self): ... - def can_read(self): ... - def read_response(self): ... - -class HiredisParser(BaseParser): - socket_read_size = ... # type: Any - def __init__(self, socket_read_size): ... - def __del__(self): ... - def on_connect(self, connection): ... - def on_disconnect(self): ... - def can_read(self): ... - def read_response(self): ... - -DefaultParser = ... # type: Any - -class Connection: - description_format = ... # type: Any - pid = ... # type: Any - host = ... # type: Any - port = ... # type: Any - db = ... # type: Any - password = ... # type: Any - socket_timeout = ... # type: Any - socket_connect_timeout = ... # type: Any - socket_keepalive = ... # type: Any - socket_keepalive_options = ... # type: Any - retry_on_timeout = ... # type: Any - encoding = ... # type: Any - encoding_errors = ... # type: Any - decode_responses = ... # type: Any - def __init__(self, host='', port=6379, db=0, password=None, socket_timeout=None, socket_connect_timeout=None, socket_keepalive=False, socket_keepalive_options=None, retry_on_timeout=False, encoding='', encoding_errors='', decode_responses=False, parser_class=..., socket_read_size=65536): ... - def __del__(self): ... - def register_connect_callback(self, callback): ... - def clear_connect_callbacks(self): ... - def connect(self): ... - def on_connect(self): ... - def disconnect(self): ... - def send_packed_command(self, command): ... - def send_command(self, *args): ... - def can_read(self): ... - def read_response(self): ... - def encode(self, value): ... - def pack_command(self, *args): ... - def pack_commands(self, commands): ... - -class SSLConnection(Connection): - description_format = ... # type: Any - keyfile = ... # type: Any - certfile = ... # type: Any - cert_reqs = ... # type: Any - ca_certs = ... # type: Any - def __init__(self, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None, **kwargs): ... - -class UnixDomainSocketConnection(Connection): - description_format = ... # type: Any - pid = ... # type: Any - path = ... # type: Any - db = ... # type: Any - password = ... # type: Any - socket_timeout = ... # type: Any - retry_on_timeout = ... # type: Any - encoding = ... # type: Any - encoding_errors = ... # type: Any - decode_responses = ... # type: Any - def __init__(self, path='', db=0, password=None, socket_timeout=None, encoding='', encoding_errors='', decode_responses=False, retry_on_timeout=False, parser_class=..., socket_read_size=65536): ... - -class ConnectionPool: - @classmethod - def from_url(cls, url, db=None, **kwargs): ... - connection_class = ... # type: Any - connection_kwargs = ... # type: Any - max_connections = ... # type: Any - def __init__(self, connection_class=..., max_connections=None, **connection_kwargs): ... - pid = ... # type: Any - def reset(self): ... - def get_connection(self, command_name, *keys, **options): ... - def make_connection(self): ... - def release(self, connection): ... - def disconnect(self): ... - -class BlockingConnectionPool(ConnectionPool): - queue_class = ... # type: Any - timeout = ... # type: Any - def __init__(self, max_connections=50, timeout=20, connection_class=..., queue_class=..., **connection_kwargs): ... - pid = ... # type: Any - pool = ... # type: Any - def reset(self): ... - def make_connection(self): ... - def get_connection(self, command_name, *keys, **options): ... - def release(self, connection): ... - def disconnect(self): ... diff --git a/stubs/third-party-2.7/redis/exceptions.pyi b/stubs/third-party-2.7/redis/exceptions.pyi deleted file mode 100644 index 97a11f512eaf..000000000000 --- a/stubs/third-party-2.7/redis/exceptions.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for redis.exceptions (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class RedisError(Exception): ... - -def __unicode__(self): ... - -class AuthenticationError(RedisError): ... -class ConnectionError(RedisError): ... -class TimeoutError(RedisError): ... -class BusyLoadingError(ConnectionError): ... -class InvalidResponse(RedisError): ... -class ResponseError(RedisError): ... -class DataError(RedisError): ... -class PubSubError(RedisError): ... -class WatchError(RedisError): ... -class NoScriptError(ResponseError): ... -class ExecAbortError(ResponseError): ... -class ReadOnlyError(ResponseError): ... -class LockError(RedisError, ValueError): ... diff --git a/stubs/third-party-2.7/redis/utils.pyi b/stubs/third-party-2.7/redis/utils.pyi deleted file mode 100644 index 2d68e2d206d8..000000000000 --- a/stubs/third-party-2.7/redis/utils.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for redis.utils (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -HIREDIS_AVAILABLE = ... # type: Any - -def from_url(url, db=None, **kwargs): ... -def pipeline(redis_obj): ... - -class dummy: ... diff --git a/stubs/third-party-2.7/requests/__init__.pyi b/stubs/third-party-2.7/requests/__init__.pyi deleted file mode 100644 index 6ea56efcc475..000000000000 --- a/stubs/third-party-2.7/requests/__init__.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# Stubs for requests (based on version 2.6.0, Python 3) - -from typing import Any -from requests import models -from requests import api -from requests import sessions -from requests import status_codes -from requests import exceptions -import logging - -__title__ = ... # type: Any -__build__ = ... # type: Any -__license__ = ... # type: Any -__copyright__ = ... # type: Any - -Request = models.Request -Response = models.Response -PreparedRequest = models.PreparedRequest -request = api.request -get = api.get -head = api.head -post = api.post -patch = api.patch -put = api.put -delete = api.delete -options = api.options -session = sessions.session -Session = sessions.Session -codes = status_codes.codes -RequestException = exceptions.RequestException -Timeout = exceptions.Timeout -URLRequired = exceptions.URLRequired -TooManyRedirects = exceptions.TooManyRedirects -HTTPError = exceptions.HTTPError -ConnectionError = exceptions.ConnectionError - -class NullHandler(logging.Handler): - def emit(self, record): ... diff --git a/stubs/third-party-2.7/requests/adapters.pyi b/stubs/third-party-2.7/requests/adapters.pyi deleted file mode 100644 index bed0758b4d91..000000000000 --- a/stubs/third-party-2.7/requests/adapters.pyi +++ /dev/null @@ -1,69 +0,0 @@ -# Stubs for requests.adapters (Python 3) - -from typing import Any -from . import models -from .packages.urllib3 import poolmanager -from .packages.urllib3 import response -from .packages.urllib3.util import retry -from . import compat -from . import utils -from . import structures -from .packages.urllib3 import exceptions as urllib3_exceptions -from . import cookies -from . import exceptions -from . import auth - -Response = models.Response -PoolManager = poolmanager.PoolManager -proxy_from_url = poolmanager.proxy_from_url -HTTPResponse = response.HTTPResponse -Retry = retry.Retry -DEFAULT_CA_BUNDLE_PATH = utils.DEFAULT_CA_BUNDLE_PATH -get_encoding_from_headers = utils.get_encoding_from_headers -prepend_scheme_if_needed = utils.prepend_scheme_if_needed -get_auth_from_url = utils.get_auth_from_url -urldefragauth = utils.urldefragauth -CaseInsensitiveDict = structures.CaseInsensitiveDict -ConnectTimeoutError = urllib3_exceptions.ConnectTimeoutError -MaxRetryError = urllib3_exceptions.MaxRetryError -ProtocolError = urllib3_exceptions.ProtocolError -ReadTimeoutError = urllib3_exceptions.ReadTimeoutError -ResponseError = urllib3_exceptions.ResponseError -extract_cookies_to_jar = cookies.extract_cookies_to_jar -ConnectionError = exceptions.ConnectionError -ConnectTimeout = exceptions.ConnectTimeout -ReadTimeout = exceptions.ReadTimeout -SSLError = exceptions.SSLError -ProxyError = exceptions.ProxyError -RetryError = exceptions.RetryError - -DEFAULT_POOLBLOCK = ... # type: Any -DEFAULT_POOLSIZE = ... # type: Any -DEFAULT_RETRIES = ... # type: Any - -class BaseAdapter: - def __init__(self): ... - # TODO: "request" parameter not actually supported, added to please mypy. - def send(self, request=None): ... - def close(self): ... - -class HTTPAdapter(BaseAdapter): - __attrs__ = ... # type: Any - max_retries = ... # type: Any - config = ... # type: Any - proxy_manager = ... # type: Any - def __init__(self, pool_connections=..., pool_maxsize=..., max_retries=..., - pool_block=...): ... - poolmanager = ... # type: Any - def init_poolmanager(self, connections, maxsize, block=..., **pool_kwargs): ... - def proxy_manager_for(self, proxy, **proxy_kwargs): ... - def cert_verify(self, conn, url, verify, cert): ... - def build_response(self, req, resp): ... - def get_connection(self, url, proxies=None): ... - def close(self): ... - def request_url(self, request, proxies): ... - def add_headers(self, request, **kwargs): ... - def proxy_headers(self, proxy): ... - # TODO: "request" is not actually optional, modified to please mypy. - def send(self, request=None, stream=False, timeout=None, verify=True, cert=None, - proxies=None): ... diff --git a/stubs/third-party-2.7/requests/api.pyi b/stubs/third-party-2.7/requests/api.pyi deleted file mode 100644 index 741c80eb474a..000000000000 --- a/stubs/third-party-2.7/requests/api.pyi +++ /dev/null @@ -1,14 +0,0 @@ -# Stubs for requests.api (Python 3) - -import typing - -from .models import Response - -def request(method: str, url: str, **kwargs) -> Response: ... -def get(url: str, **kwargs) -> Response: ... -def options(url: str, **kwargs) -> Response: ... -def head(url: str, **kwargs) -> Response: ... -def post(url: str, data=None, json=None, **kwargs) -> Response: ... -def put(url: str, data=None, **kwargs) -> Response: ... -def patch(url: str, data=None, **kwargs) -> Response: ... -def delete(url: str, **kwargs) -> Response: ... diff --git a/stubs/third-party-2.7/requests/auth.pyi b/stubs/third-party-2.7/requests/auth.pyi deleted file mode 100644 index 43238dcba579..000000000000 --- a/stubs/third-party-2.7/requests/auth.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Stubs for requests.auth (Python 3) - -from typing import Any -from . import compat -from . import cookies -from . import utils -from . import status_codes - -extract_cookies_to_jar = cookies.extract_cookies_to_jar -parse_dict_header = utils.parse_dict_header -to_native_string = utils.to_native_string -codes = status_codes.codes - -CONTENT_TYPE_FORM_URLENCODED = ... # type: Any -CONTENT_TYPE_MULTI_PART = ... # type: Any - -class AuthBase: - def __call__(self, r): ... - -class HTTPBasicAuth(AuthBase): - username = ... # type: Any - password = ... # type: Any - def __init__(self, username, password): ... - def __call__(self, r): ... - -class HTTPProxyAuth(HTTPBasicAuth): - def __call__(self, r): ... - -class HTTPDigestAuth(AuthBase): - username = ... # type: Any - password = ... # type: Any - last_nonce = ... # type: Any - nonce_count = ... # type: Any - chal = ... # type: Any - pos = ... # type: Any - num_401_calls = ... # type: Any - def __init__(self, username, password): ... - def build_digest_header(self, method, url): ... - def handle_redirect(self, r, **kwargs): ... - def handle_401(self, r, **kwargs): ... - def __call__(self, r): ... diff --git a/stubs/third-party-2.7/requests/compat.pyi b/stubs/third-party-2.7/requests/compat.pyi deleted file mode 100644 index 63b92f6fef32..000000000000 --- a/stubs/third-party-2.7/requests/compat.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for requests.compat (Python 3.4) - -from typing import Any -import collections - -OrderedDict = collections.OrderedDict diff --git a/stubs/third-party-2.7/requests/cookies.pyi b/stubs/third-party-2.7/requests/cookies.pyi deleted file mode 100644 index 1cb398414380..000000000000 --- a/stubs/third-party-2.7/requests/cookies.pyi +++ /dev/null @@ -1,61 +0,0 @@ -# Stubs for requests.cookies (Python 3) - -from typing import Any, MutableMapping -import collections -from . import compat - -class MockRequest: - type = ... # type: Any - def __init__(self, request): ... - def get_type(self): ... - def get_host(self): ... - def get_origin_req_host(self): ... - def get_full_url(self): ... - def is_unverifiable(self): ... - def has_header(self, name): ... - def get_header(self, name, default=None): ... - def add_header(self, key, val): ... - def add_unredirected_header(self, name, value): ... - def get_new_headers(self): ... - @property - def unverifiable(self): ... - @property - def origin_req_host(self): ... - @property - def host(self): ... - -class MockResponse: - def __init__(self, headers): ... - def info(self): ... - def getheaders(self, name): ... - -def extract_cookies_to_jar(jar, request, response): ... -def get_cookie_header(jar, request): ... -def remove_cookie_by_name(cookiejar, name, domain=None, path=None): ... - -class CookieConflictError(RuntimeError): ... - -class RequestsCookieJar(MutableMapping): - def get(self, name, default=None, domain=None, path=None): ... - def set(self, name, value, **kwargs): ... - def iterkeys(self): ... - def keys(self): ... - def itervalues(self): ... - def values(self): ... - def iteritems(self): ... - def items(self): ... - def list_domains(self): ... - def list_paths(self): ... - def multiple_domains(self): ... - def get_dict(self, domain=None, path=None): ... - def __getitem__(self, name): ... - def __setitem__(self, name, value): ... - def __delitem__(self, name): ... - def set_cookie(self, cookie, *args, **kwargs): ... - def update(self, other): ... - def copy(self): ... - -def create_cookie(name, value, **kwargs): ... -def morsel_to_cookie(morsel): ... -def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True): ... -def merge_cookies(cookiejar, cookies): ... diff --git a/stubs/third-party-2.7/requests/exceptions.pyi b/stubs/third-party-2.7/requests/exceptions.pyi deleted file mode 100644 index 2957967834fc..000000000000 --- a/stubs/third-party-2.7/requests/exceptions.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for requests.exceptions (Python 3) - -from typing import Any -from .packages.urllib3.exceptions import HTTPError as BaseHTTPError - -class RequestException(IOError): - response = ... # type: Any - request = ... # type: Any - def __init__(self, *args, **kwargs): ... - -class HTTPError(RequestException): ... -class ConnectionError(RequestException): ... -class ProxyError(ConnectionError): ... -class SSLError(ConnectionError): ... -class Timeout(RequestException): ... -class ConnectTimeout(ConnectionError, Timeout): ... -class ReadTimeout(Timeout): ... -class URLRequired(RequestException): ... -class TooManyRedirects(RequestException): ... -class MissingSchema(RequestException, ValueError): ... -class InvalidSchema(RequestException, ValueError): ... -class InvalidURL(RequestException, ValueError): ... -class ChunkedEncodingError(RequestException): ... -class ContentDecodingError(RequestException, BaseHTTPError): ... -class StreamConsumedError(RequestException, TypeError): ... -class RetryError(RequestException): ... diff --git a/stubs/third-party-2.7/requests/hooks.pyi b/stubs/third-party-2.7/requests/hooks.pyi deleted file mode 100644 index 3367d9a48758..000000000000 --- a/stubs/third-party-2.7/requests/hooks.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.hooks (Python 3) - -from typing import Any - -HOOKS = ... # type: Any - -def default_hooks(): ... -def dispatch_hook(key, hooks, hook_data, **kwargs): ... diff --git a/stubs/third-party-2.7/requests/models.pyi b/stubs/third-party-2.7/requests/models.pyi deleted file mode 100644 index b16c2ea2f083..000000000000 --- a/stubs/third-party-2.7/requests/models.pyi +++ /dev/null @@ -1,133 +0,0 @@ -# Stubs for requests.models (Python 3) - -from typing import Any, List, MutableMapping, Iterator, Dict -import datetime - -from . import hooks -from . import structures -from . import auth -from . import cookies -from .cookies import RequestsCookieJar -from .packages.urllib3 import fields -from .packages.urllib3 import filepost -from .packages.urllib3 import util -from .packages.urllib3 import exceptions as urllib3_exceptions -from . import exceptions -from . import utils -from . import compat -from . import status_codes - -default_hooks = hooks.default_hooks -CaseInsensitiveDict = structures.CaseInsensitiveDict -HTTPBasicAuth = auth.HTTPBasicAuth -cookiejar_from_dict = cookies.cookiejar_from_dict -get_cookie_header = cookies.get_cookie_header -RequestField = fields.RequestField -encode_multipart_formdata = filepost.encode_multipart_formdata -DecodeError = urllib3_exceptions.DecodeError -ReadTimeoutError = urllib3_exceptions.ReadTimeoutError -ProtocolError = urllib3_exceptions.ProtocolError -LocationParseError = urllib3_exceptions.LocationParseError -HTTPError = exceptions.HTTPError -MissingSchema = exceptions.MissingSchema -InvalidURL = exceptions.InvalidURL -ChunkedEncodingError = exceptions.ChunkedEncodingError -ContentDecodingError = exceptions.ContentDecodingError -ConnectionError = exceptions.ConnectionError -StreamConsumedError = exceptions.StreamConsumedError -guess_filename = utils.guess_filename -get_auth_from_url = utils.get_auth_from_url -requote_uri = utils.requote_uri -stream_decode_response_unicode = utils.stream_decode_response_unicode -to_key_val_list = utils.to_key_val_list -parse_header_links = utils.parse_header_links -iter_slices = utils.iter_slices -guess_json_utf = utils.guess_json_utf -super_len = utils.super_len -to_native_string = utils.to_native_string -codes = status_codes.codes - -REDIRECT_STATI = ... # type: Any -DEFAULT_REDIRECT_LIMIT = ... # type: Any -CONTENT_CHUNK_SIZE = ... # type: Any -ITER_CHUNK_SIZE = ... # type: Any -json_dumps = ... # type: Any - -class RequestEncodingMixin: - @property - def path_url(self): ... - -class RequestHooksMixin: - def register_hook(self, event, hook): ... - def deregister_hook(self, event, hook): ... - -class Request(RequestHooksMixin): - hooks = ... # type: Any - method = ... # type: Any - url = ... # type: Any - headers = ... # type: Any - files = ... # type: Any - data = ... # type: Any - json = ... # type: Any - params = ... # type: Any - auth = ... # type: Any - cookies = ... # type: Any - def __init__(self, method=None, url=None, headers=None, files=None, data=None, params=None, - auth=None, cookies=None, hooks=None, json=None): ... - def prepare(self): ... - -class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): - method = ... # type: Any - url = ... # type: Any - headers = ... # type: Any - body = ... # type: Any - hooks = ... # type: Any - def __init__(self): ... - def prepare(self, method=None, url=None, headers=None, files=None, data=None, params=None, - auth=None, cookies=None, hooks=None, json=None): ... - def copy(self): ... - def prepare_method(self, method): ... - def prepare_url(self, url, params): ... - def prepare_headers(self, headers): ... - def prepare_body(self, data, files, json=None): ... - def prepare_content_length(self, body): ... - def prepare_auth(self, auth, url=''): ... - def prepare_cookies(self, cookies): ... - def prepare_hooks(self, hooks): ... - -class Response: - __attrs__ = ... # type: Any - status_code = ... # type: int - headers = ... # type: MutableMapping[str, str] - raw = ... # type: Any - url = ... # type: str - encoding = ... # type: str - history = ... # type: List[Response] - reason = ... # type: str - cookies = ... # type: RequestsCookieJar - elapsed = ... # type: datetime.timedelta - request = ... # type: PreparedRequest - def __init__(self) -> None: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def __iter__(self) -> Iterator[str]: ... - @property - def ok(self) -> bool: ... - @property - def is_redirect(self) -> bool: ... - @property - def is_permanent_redirect(self) -> bool: ... - @property - def apparent_encoding(self) -> str: ... - def iter_content(self, chunk_size: int = 1, - decode_unicode: bool = False) -> Iterator[Any]: ... - def iter_lines(self, chunk_size=..., decode_unicode=None, delimiter=None): ... - @property - def content(self) -> str: ... - @property - def text(self) -> str: ... - def json(self, **kwargs) -> Any: ... - @property - def links(self) -> Dict[Any, Any]: ... - def raise_for_status(self) -> None: ... - def close(self) -> None: ... diff --git a/stubs/third-party-2.7/requests/packages/__init__.pyi b/stubs/third-party-2.7/requests/packages/__init__.pyi deleted file mode 100644 index 835913f46091..000000000000 --- a/stubs/third-party-2.7/requests/packages/__init__.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.packages (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class VendorAlias: - def __init__(self, package_names): ... - def find_module(self, fullname, path=None): ... - def load_module(self, name): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/__init__.pyi b/stubs/third-party-2.7/requests/packages/urllib3/__init__.pyi deleted file mode 100644 index 38cf6729c850..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/__init__.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for requests.packages.urllib3 (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import logging - -class NullHandler(logging.Handler): - def emit(self, record): ... - -def add_stderr_logger(level=...): ... -def disable_warnings(category=...): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/_collections.pyi b/stubs/third-party-2.7/requests/packages/urllib3/_collections.pyi deleted file mode 100644 index 452b7729243c..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/_collections.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for requests.packages.urllib3._collections (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from collections import MutableMapping - -class RLock: - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, traceback): ... - -class RecentlyUsedContainer(MutableMapping): - ContainerCls = ... # type: Any - dispose_func = ... # type: Any - lock = ... # type: Any - def __init__(self, maxsize=10, dispose_func=None): ... - def __getitem__(self, key): ... - def __setitem__(self, key, value): ... - def __delitem__(self, key): ... - def __len__(self): ... - def __iter__(self): ... - def clear(self): ... - def keys(self): ... - -class HTTPHeaderDict(dict): - def __init__(self, headers=None, **kwargs): ... - def __setitem__(self, key, val): ... - def __getitem__(self, key): ... - def __delitem__(self, key): ... - def __contains__(self, key): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - values = ... # type: Any - get = ... # type: Any - update = ... # type: Any - iterkeys = ... # type: Any - itervalues = ... # type: Any - def pop(self, key, default=...): ... - def discard(self, key): ... - def add(self, key, val): ... - def extend(*args, **kwargs): ... - def getlist(self, key): ... - getheaders = ... # type: Any - getallmatchingheaders = ... # type: Any - iget = ... # type: Any - def copy(self): ... - def iteritems(self): ... - def itermerged(self): ... - def items(self): ... - @classmethod - def from_httplib(cls, message, duplicates=...): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/connection.pyi b/stubs/third-party-2.7/requests/packages/urllib3/connection.pyi deleted file mode 100644 index d8bd4159f0a3..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/connection.pyi +++ /dev/null @@ -1,48 +0,0 @@ -# Stubs for requests.packages.urllib3.connection (Python 3.4) - -from typing import Any -from . import packages -from . import exceptions -from . import util - -class DummyConnection: ... - -ConnectTimeoutError = exceptions.ConnectTimeoutError -SystemTimeWarning = exceptions.SystemTimeWarning -SecurityWarning = exceptions.SecurityWarning - -port_by_scheme = ... # type: Any -RECENT_DATE = ... # type: Any - -class HTTPConnection(object): - default_port = ... # type: Any - default_socket_options = ... # type: Any - is_verified = ... # type: Any - source_address = ... # type: Any - socket_options = ... # type: Any - def __init__(self, *args, **kw): ... - def connect(self): ... - -class HTTPSConnection(HTTPConnection): - default_port = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None, timeout=..., **kw): ... - sock = ... # type: Any - def connect(self): ... - -class VerifiedHTTPSConnection(HTTPSConnection): - cert_reqs = ... # type: Any - ca_certs = ... # type: Any - ssl_version = ... # type: Any - assert_fingerprint = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - assert_hostname = ... # type: Any - def set_cert(self, key_file=None, cert_file=None, cert_reqs=None, ca_certs=None, assert_hostname=None, assert_fingerprint=None): ... - sock = ... # type: Any - auto_open = ... # type: Any - is_verified = ... # type: Any - def connect(self): ... - -UnverifiedHTTPSConnection = ... # type: Any diff --git a/stubs/third-party-2.7/requests/packages/urllib3/connectionpool.pyi b/stubs/third-party-2.7/requests/packages/urllib3/connectionpool.pyi deleted file mode 100644 index 1bbeb05471b0..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/connectionpool.pyi +++ /dev/null @@ -1,87 +0,0 @@ -# Stubs for requests.packages.urllib3.connectionpool (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import exceptions -from .packages import ssl_match_hostname -from . import packages -from . import connection -from . import request -from . import response -from .util import connection as _connection -from .util import retry -from .util import timeout -from .util import url - -ClosedPoolError = exceptions.ClosedPoolError -ProtocolError = exceptions.ProtocolError -EmptyPoolError = exceptions.EmptyPoolError -HostChangedError = exceptions.HostChangedError -LocationValueError = exceptions.LocationValueError -MaxRetryError = exceptions.MaxRetryError -ProxyError = exceptions.ProxyError -ReadTimeoutError = exceptions.ReadTimeoutError -SSLError = exceptions.SSLError -TimeoutError = exceptions.TimeoutError -InsecureRequestWarning = exceptions.InsecureRequestWarning -CertificateError = ssl_match_hostname.CertificateError -port_by_scheme = connection.port_by_scheme -DummyConnection = connection.DummyConnection -HTTPConnection = connection.HTTPConnection -HTTPSConnection = connection.HTTPSConnection -VerifiedHTTPSConnection = connection.VerifiedHTTPSConnection -HTTPException = connection.HTTPException -BaseSSLError = connection.BaseSSLError -ConnectionError = connection.ConnectionError -RequestMethods = request.RequestMethods -HTTPResponse = response.HTTPResponse -is_connection_dropped = _connection.is_connection_dropped -Retry = retry.Retry -Timeout = timeout.Timeout -get_host = url.get_host - -xrange = ... # type: Any -log = ... # type: Any - -class ConnectionPool: - scheme = ... # type: Any - QueueCls = ... # type: Any - host = ... # type: Any - port = ... # type: Any - def __init__(self, host, port=None): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_val, exc_tb): ... - def close(self): ... - -class HTTPConnectionPool(ConnectionPool, RequestMethods): - scheme = ... # type: Any - ConnectionCls = ... # type: Any - strict = ... # type: Any - timeout = ... # type: Any - retries = ... # type: Any - pool = ... # type: Any - block = ... # type: Any - proxy = ... # type: Any - proxy_headers = ... # type: Any - num_connections = ... # type: Any - num_requests = ... # type: Any - conn_kw = ... # type: Any - def __init__(self, host, port=None, strict=False, timeout=..., maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, **conn_kw): ... - def close(self): ... - def is_same_host(self, url): ... - def urlopen(self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=..., pool_timeout=None, release_conn=None, **response_kw): ... - -class HTTPSConnectionPool(HTTPConnectionPool): - scheme = ... # type: Any - ConnectionCls = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - cert_reqs = ... # type: Any - ca_certs = ... # type: Any - ssl_version = ... # type: Any - assert_hostname = ... # type: Any - assert_fingerprint = ... # type: Any - def __init__(self, host, port=None, strict=False, timeout=..., maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, key_file=None, cert_file=None, cert_reqs=None, ca_certs=None, ssl_version=None, assert_hostname=None, assert_fingerprint=None, **conn_kw): ... - -def connection_from_url(url, **kw): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/contrib/__init__.pyi b/stubs/third-party-2.7/requests/packages/urllib3/contrib/__init__.pyi deleted file mode 100644 index 17d26bb130dd..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/contrib/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for requests.packages.urllib3.contrib (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-2.7/requests/packages/urllib3/exceptions.pyi b/stubs/third-party-2.7/requests/packages/urllib3/exceptions.pyi deleted file mode 100644 index 39bba47467c5..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/exceptions.pyi +++ /dev/null @@ -1,54 +0,0 @@ -# Stubs for requests.packages.urllib3.exceptions (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class HTTPError(Exception): ... -class HTTPWarning(Warning): ... - -class PoolError(HTTPError): - pool = ... # type: Any - def __init__(self, pool, message): ... - def __reduce__(self): ... - -class RequestError(PoolError): - url = ... # type: Any - def __init__(self, pool, url, message): ... - def __reduce__(self): ... - -class SSLError(HTTPError): ... -class ProxyError(HTTPError): ... -class DecodeError(HTTPError): ... -class ProtocolError(HTTPError): ... - -ConnectionError = ... # type: Any - -class MaxRetryError(RequestError): - reason = ... # type: Any - def __init__(self, pool, url, reason=None): ... - -class HostChangedError(RequestError): - retries = ... # type: Any - def __init__(self, pool, url, retries=3): ... - -class TimeoutStateError(HTTPError): ... -class TimeoutError(HTTPError): ... -class ReadTimeoutError(TimeoutError, RequestError): ... -class ConnectTimeoutError(TimeoutError): ... -class EmptyPoolError(PoolError): ... -class ClosedPoolError(PoolError): ... -class LocationValueError(ValueError, HTTPError): ... - -class LocationParseError(LocationValueError): - location = ... # type: Any - def __init__(self, location): ... - -class ResponseError(HTTPError): - GENERIC_ERROR = ... # type: Any - SPECIFIC_ERROR = ... # type: Any - -class SecurityWarning(HTTPWarning): ... -class InsecureRequestWarning(SecurityWarning): ... -class SystemTimeWarning(SecurityWarning): ... -class InsecurePlatformWarning(SecurityWarning): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/fields.pyi b/stubs/third-party-2.7/requests/packages/urllib3/fields.pyi deleted file mode 100644 index ea43fb955bde..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/fields.pyi +++ /dev/null @@ -1,16 +0,0 @@ -# Stubs for requests.packages.urllib3.fields (Python 3.4) - -from typing import Any -from . import packages - -def guess_content_type(filename, default=''): ... -def format_header_param(name, value): ... - -class RequestField: - data = ... # type: Any - headers = ... # type: Any - def __init__(self, name, data, filename=None, headers=None): ... - @classmethod - def from_tuples(cls, fieldname, value): ... - def render_headers(self): ... - def make_multipart(self, content_disposition=None, content_type=None, content_location=None): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/filepost.pyi b/stubs/third-party-2.7/requests/packages/urllib3/filepost.pyi deleted file mode 100644 index 42a23f0b4042..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/filepost.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for requests.packages.urllib3.filepost (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import packages -#from .packages import six -from . import fields - -#six = packages.six -#b = six.b -RequestField = fields.RequestField - -writer = ... # type: Any - -def choose_boundary(): ... -def iter_field_objects(fields): ... -def iter_fields(fields): ... -def encode_multipart_formdata(fields, boundary=None): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/packages/__init__.pyi b/stubs/third-party-2.7/requests/packages/urllib3/packages/__init__.pyi deleted file mode 100644 index 231463649504..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/packages/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for requests.packages.urllib3.packages (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-2.7/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi b/stubs/third-party-2.7/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi deleted file mode 100644 index 5abbc9dd5c52..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for requests.packages.urllib3.packages.ssl_match_hostname._implementation (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class CertificateError(ValueError): ... - -def match_hostname(cert, hostname): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/poolmanager.pyi b/stubs/third-party-2.7/requests/packages/urllib3/poolmanager.pyi deleted file mode 100644 index 2c9fdb0cd669..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/poolmanager.pyi +++ /dev/null @@ -1,31 +0,0 @@ -# Stubs for requests.packages.urllib3.poolmanager (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .request import RequestMethods - -class PoolManager(RequestMethods): - proxy = ... # type: Any - connection_pool_kw = ... # type: Any - pools = ... # type: Any - def __init__(self, num_pools=10, headers=None, **connection_pool_kw): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_val, exc_tb): ... - def clear(self): ... - def connection_from_host(self, host, port=None, scheme=''): ... - def connection_from_url(self, url): ... - # TODO: This was the original signature -- copied another one from base class to fix complaint. - # def urlopen(self, method, url, redirect=True, **kw): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - -class ProxyManager(PoolManager): - proxy = ... # type: Any - proxy_headers = ... # type: Any - def __init__(self, proxy_url, num_pools=10, headers=None, proxy_headers=None, **connection_pool_kw): ... - def connection_from_host(self, host, port=None, scheme=''): ... - # TODO: This was the original signature -- copied another one from base class to fix complaint. - # def urlopen(self, method, url, redirect=True, **kw): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - -def proxy_from_url(url, **kw): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/request.pyi b/stubs/third-party-2.7/requests/packages/urllib3/request.pyi deleted file mode 100644 index ec03d6d12257..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/request.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for requests.packages.urllib3.request (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class RequestMethods: - headers = ... # type: Any - def __init__(self, headers=None): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - def request(self, method, url, fields=None, headers=None, **urlopen_kw): ... - def request_encode_url(self, method, url, fields=None, **urlopen_kw): ... - def request_encode_body(self, method, url, fields=None, headers=None, encode_multipart=True, multipart_boundary=None, **urlopen_kw): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/response.pyi b/stubs/third-party-2.7/requests/packages/urllib3/response.pyi deleted file mode 100644 index c7e89177f714..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/response.pyi +++ /dev/null @@ -1,58 +0,0 @@ -# Stubs for requests.packages.urllib3.response (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, IO -import io -from . import _collections -from . import exceptions -#from .packages import six -from . import connection -from .util import response - -HTTPHeaderDict = _collections.HTTPHeaderDict -ProtocolError = exceptions.ProtocolError -DecodeError = exceptions.DecodeError -ReadTimeoutError = exceptions.ReadTimeoutError -binary_type = str # six.binary_type -PY3 = True # six.PY3 -is_fp_closed = response.is_fp_closed - -class DeflateDecoder: - def __init__(self): ... - def __getattr__(self, name): ... - def decompress(self, data): ... - -class GzipDecoder: - def __init__(self): ... - def __getattr__(self, name): ... - def decompress(self, data): ... - -class HTTPResponse(IO[Any]): - CONTENT_DECODERS = ... # type: Any - REDIRECT_STATUSES = ... # type: Any - headers = ... # type: Any - status = ... # type: Any - version = ... # type: Any - reason = ... # type: Any - strict = ... # type: Any - decode_content = ... # type: Any - def __init__(self, body='', headers=None, status=0, version=0, reason=None, strict=0, preload_content=True, decode_content=True, original_response=None, pool=None, connection=None): ... - def get_redirect_location(self): ... - def release_conn(self): ... - @property - def data(self): ... - def tell(self): ... - def read(self, amt=None, decode_content=None, cache_content=False): ... - def stream(self, amt=..., decode_content=None): ... - @classmethod - def from_httplib(ResponseCls, r, **response_kw): ... - def getheaders(self): ... - def getheader(self, name, default=None): ... - def close(self): ... - @property - def closed(self): ... - def fileno(self): ... - def flush(self): ... - def readable(self): ... - def readinto(self, b): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/__init__.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/__init__.pyi deleted file mode 100644 index eca2ea93d1eb..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for requests.packages.urllib3.util (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import connection -from . import request - diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/connection.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/connection.pyi deleted file mode 100644 index cfd53aca9738..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/connection.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for requests.packages.urllib3.util.connection (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -poll = ... # type: Any -select = ... # type: Any - -def is_connection_dropped(conn): ... -def create_connection(address, timeout=..., source_address=None, socket_options=None): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/request.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/request.pyi deleted file mode 100644 index 8eb9f3a7e04d..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/request.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for requests.packages.urllib3.util.request (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -#from ..packages import six - -#b = six.b - -ACCEPT_ENCODING = ... # type: Any - -def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/response.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/response.pyi deleted file mode 100644 index 761a00679554..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/response.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for requests.packages.urllib3.util.response (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def is_fp_closed(obj): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/retry.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/retry.pyi deleted file mode 100644 index a4ff661a6585..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/retry.pyi +++ /dev/null @@ -1,36 +0,0 @@ -# Stubs for requests.packages.urllib3.util.retry (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions -from .. import packages - -ConnectTimeoutError = exceptions.ConnectTimeoutError -MaxRetryError = exceptions.MaxRetryError -ProtocolError = exceptions.ProtocolError -ReadTimeoutError = exceptions.ReadTimeoutError -ResponseError = exceptions.ResponseError - -log = ... # type: Any - -class Retry: - DEFAULT_METHOD_WHITELIST = ... # type: Any - BACKOFF_MAX = ... # type: Any - total = ... # type: Any - connect = ... # type: Any - read = ... # type: Any - redirect = ... # type: Any - status_forcelist = ... # type: Any - method_whitelist = ... # type: Any - backoff_factor = ... # type: Any - raise_on_redirect = ... # type: Any - def __init__(self, total=10, connect=None, read=None, redirect=None, method_whitelist=..., status_forcelist=None, backoff_factor=0, raise_on_redirect=True, _observed_errors=0): ... - def new(self, **kw): ... - @classmethod - def from_int(cls, retries, redirect=True, default=None): ... - def get_backoff_time(self): ... - def sleep(self): ... - def is_forced_retry(self, method, status_code): ... - def is_exhausted(self): ... - def increment(self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/timeout.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/timeout.pyi deleted file mode 100644 index 8bad19567e74..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/timeout.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# Stubs for requests.packages.urllib3.util.timeout (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions - -TimeoutStateError = exceptions.TimeoutStateError - -def current_time(): ... - -class Timeout: - DEFAULT_TIMEOUT = ... # type: Any - total = ... # type: Any - def __init__(self, total=None, connect=..., read=...): ... - @classmethod - def from_float(cls, timeout): ... - def clone(self): ... - def start_connect(self): ... - def get_connect_duration(self): ... - @property - def connect_timeout(self): ... - @property - def read_timeout(self): ... diff --git a/stubs/third-party-2.7/requests/packages/urllib3/util/url.pyi b/stubs/third-party-2.7/requests/packages/urllib3/util/url.pyi deleted file mode 100644 index ca6b03144208..000000000000 --- a/stubs/third-party-2.7/requests/packages/urllib3/util/url.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for requests.packages.urllib3.util.url (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions - -LocationParseError = exceptions.LocationParseError - -url_attrs = ... # type: Any - -class Url: - slots = ... # type: Any - def __new__(cls, scheme=None, auth=None, host=None, port=None, path=None, query=None, fragment=None): ... - @property - def hostname(self): ... - @property - def request_uri(self): ... - @property - def netloc(self): ... - @property - def url(self): ... - -def split_first(s, delims): ... -def parse_url(url): ... -def get_host(url): ... diff --git a/stubs/third-party-2.7/requests/sessions.pyi b/stubs/third-party-2.7/requests/sessions.pyi deleted file mode 100644 index 7c92a1520145..000000000000 --- a/stubs/third-party-2.7/requests/sessions.pyi +++ /dev/null @@ -1,92 +0,0 @@ -# Stubs for requests.sessions (Python 3) - -from typing import Any, Union, MutableMapping -from . import auth -from . import compat -from . import cookies -from . import models -from .models import Response -from . import hooks -from . import utils -from . import exceptions -from .packages.urllib3 import _collections -from . import structures -from . import adapters -from . import status_codes - -OrderedDict = compat.OrderedDict -cookiejar_from_dict = cookies.cookiejar_from_dict -extract_cookies_to_jar = cookies.extract_cookies_to_jar -RequestsCookieJar = cookies.RequestsCookieJar -merge_cookies = cookies.merge_cookies -Request = models.Request -PreparedRequest = models.PreparedRequest -DEFAULT_REDIRECT_LIMIT = models.DEFAULT_REDIRECT_LIMIT -default_hooks = hooks.default_hooks -dispatch_hook = hooks.dispatch_hook -to_key_val_list = utils.to_key_val_list -default_headers = utils.default_headers -to_native_string = utils.to_native_string -TooManyRedirects = exceptions.TooManyRedirects -InvalidSchema = exceptions.InvalidSchema -ChunkedEncodingError = exceptions.ChunkedEncodingError -ContentDecodingError = exceptions.ContentDecodingError -RecentlyUsedContainer = _collections.RecentlyUsedContainer -CaseInsensitiveDict = structures.CaseInsensitiveDict -HTTPAdapter = adapters.HTTPAdapter -requote_uri = utils.requote_uri -get_environ_proxies = utils.get_environ_proxies -get_netrc_auth = utils.get_netrc_auth -should_bypass_proxies = utils.should_bypass_proxies -get_auth_from_url = utils.get_auth_from_url -codes = status_codes.codes -REDIRECT_STATI = models.REDIRECT_STATI - -REDIRECT_CACHE_SIZE = ... # type: Any - -def merge_setting(request_setting, session_setting, dict_class=...): ... -def merge_hooks(request_hooks, session_hooks, dict_class=...): ... - -class SessionRedirectMixin: - def resolve_redirects(self, resp, req, stream=False, timeout=None, verify=True, cert=None, - proxies=None): ... - def rebuild_auth(self, prepared_request, response): ... - def rebuild_proxies(self, prepared_request, proxies): ... - -class Session(SessionRedirectMixin): - __attrs__ = ... # type: Any - headers = ... # type: MutableMapping[str, str] - auth = ... # type: Any - proxies = ... # type: Any - hooks = ... # type: Any - params = ... # type: Any - stream = ... # type: Any - verify = ... # type: Any - cert = ... # type: Any - max_redirects = ... # type: Any - trust_env = ... # type: Any - cookies = ... # type: Any - adapters = ... # type: Any - redirect_cache = ... # type: Any - def __init__(self) -> None: ... - def __enter__(self) -> 'Session': ... - def __exit__(self, *args) -> None: ... - def prepare_request(self, request): ... - def request(self, method: str, url: str, params=None, data=None, headers=None, - cookies=None, files=None, auth=None, timeout=None, allow_redirects=True, - proxies=None, hooks=None, stream=None, verify=None, cert=None, - json=None) -> Response: ... - def get(self, url: str, **kwargs) -> Response: ... - def options(self, url: str, **kwargs) -> Response: ... - def head(self, url: str, **kwargs) -> Response: ... - def post(self, url: str, data=None, json=None, **kwargs) -> Response: ... - def put(self, url: str, data=None, **kwargs) -> Response: ... - def patch(self, url: str, data=None, **kwargs) -> Response: ... - def delete(self, url: str, **kwargs) -> Response: ... - def send(self, request, **kwargs): ... - def merge_environment_settings(self, url, proxies, stream, verify, cert): ... - def get_adapter(self, url): ... - def close(self) -> None: ... - def mount(self, prefix, adapter): ... - -def session() -> Session: ... diff --git a/stubs/third-party-2.7/requests/status_codes.pyi b/stubs/third-party-2.7/requests/status_codes.pyi deleted file mode 100644 index e3035eb9163a..000000000000 --- a/stubs/third-party-2.7/requests/status_codes.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.status_codes (Python 3) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .structures import LookupDict - -codes = ... # type: Any diff --git a/stubs/third-party-2.7/requests/structures.pyi b/stubs/third-party-2.7/requests/structures.pyi deleted file mode 100644 index 6d9e0da59f46..000000000000 --- a/stubs/third-party-2.7/requests/structures.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for requests.structures (Python 3) - -from typing import Any -import collections - -class CaseInsensitiveDict(collections.MutableMapping): - def __init__(self, data=None, **kwargs): ... - def __setitem__(self, key, value): ... - def __getitem__(self, key): ... - def __delitem__(self, key): ... - def __iter__(self): ... - def __len__(self): ... - def lower_items(self): ... - def __eq__(self, other): ... - def copy(self): ... - -class LookupDict(dict): - name = ... # type: Any - def __init__(self, name=None): ... - def __getitem__(self, key): ... - def get(self, key, default=None): ... diff --git a/stubs/third-party-2.7/requests/utils.pyi b/stubs/third-party-2.7/requests/utils.pyi deleted file mode 100644 index 99a89f4962c5..000000000000 --- a/stubs/third-party-2.7/requests/utils.pyi +++ /dev/null @@ -1,52 +0,0 @@ -# Stubs for requests.utils (Python 3) - -from typing import Any -from . import compat -from . import cookies -from . import structures -from . import exceptions - -OrderedDict = compat.OrderedDict -RequestsCookieJar = cookies.RequestsCookieJar -cookiejar_from_dict = cookies.cookiejar_from_dict -CaseInsensitiveDict = structures.CaseInsensitiveDict -InvalidURL = exceptions.InvalidURL - -NETRC_FILES = ... # type: Any -DEFAULT_CA_BUNDLE_PATH = ... # type: Any - -def dict_to_sequence(d): ... -def super_len(o): ... -def get_netrc_auth(url): ... -def guess_filename(obj): ... -def from_key_val_list(value): ... -def to_key_val_list(value): ... -def parse_list_header(value): ... -def parse_dict_header(value): ... -def unquote_header_value(value, is_filename=False): ... -def dict_from_cookiejar(cj): ... -def add_dict_to_cookiejar(cj, cookie_dict): ... -def get_encodings_from_content(content): ... -def get_encoding_from_headers(headers): ... -def stream_decode_response_unicode(iterator, r): ... -def iter_slices(string, slice_length): ... -def get_unicode_from_response(r): ... - -UNRESERVED_SET = ... # type: Any - -def unquote_unreserved(uri): ... -def requote_uri(uri): ... -def address_in_network(ip, net): ... -def dotted_netmask(mask): ... -def is_ipv4_address(string_ip): ... -def is_valid_cidr(string_network): ... -def should_bypass_proxies(url): ... -def get_environ_proxies(url): ... -def default_user_agent(name=''): ... -def default_headers(): ... -def parse_header_links(value): ... -def guess_json_utf(data): ... -def prepend_scheme_if_needed(url, new_scheme): ... -def get_auth_from_url(url): ... -def to_native_string(string, encoding=''): ... -def urldefragauth(url): ... diff --git a/stubs/third-party-2.7/routes/__init__.pyi b/stubs/third-party-2.7/routes/__init__.pyi deleted file mode 100644 index 506ccaf5259b..000000000000 --- a/stubs/third-party-2.7/routes/__init__.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for routes (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -import routes.mapper -import routes.util - -class _RequestConfig: - def __getattr__(self, name): ... - def __setattr__(self, name, value): ... - def __delattr__(self, name): ... - def load_wsgi_environ(self, environ): ... - -def request_config(original=False): ... - -Mapper = mapper.Mapper -redirect_to = util.redirect_to -url_for = util.url_for -URLGenerator = util.URLGenerator diff --git a/stubs/third-party-2.7/routes/mapper.pyi b/stubs/third-party-2.7/routes/mapper.pyi deleted file mode 100644 index e4657fda4943..000000000000 --- a/stubs/third-party-2.7/routes/mapper.pyi +++ /dev/null @@ -1,70 +0,0 @@ -# Stubs for routes.mapper (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -COLLECTION_ACTIONS = ... # type: Any -MEMBER_ACTIONS = ... # type: Any - -def strip_slashes(name): ... - -class SubMapperParent: - def submapper(self, **kargs): ... - def collection(self, collection_name, resource_name, path_prefix=None, member_prefix='', controller=None, collection_actions=..., member_actions=..., member_options=None, **kwargs): ... - -class SubMapper(SubMapperParent): - kwargs = ... # type: Any - obj = ... # type: Any - collection_name = ... # type: Any - member = ... # type: Any - resource_name = ... # type: Any - formatted = ... # type: Any - def __init__(self, obj, resource_name=None, collection_name=None, actions=None, formatted=None, **kwargs): ... - def connect(self, *args, **kwargs): ... - def link(self, rel=None, name=None, action=None, method='', formatted=None, **kwargs): ... - def new(self, **kwargs): ... - def edit(self, **kwargs): ... - def action(self, name=None, action=None, method='', formatted=None, **kwargs): ... - def index(self, name=None, **kwargs): ... - def show(self, name=None, **kwargs): ... - def create(self, **kwargs): ... - def update(self, **kwargs): ... - def delete(self, **kwargs): ... - def add_actions(self, actions): ... - def __enter__(self): ... - def __exit__(self, type, value, tb): ... - -class Mapper(SubMapperParent): - matchlist = ... # type: Any - maxkeys = ... # type: Any - minkeys = ... # type: Any - urlcache = ... # type: Any - prefix = ... # type: Any - req_data = ... # type: Any - directory = ... # type: Any - always_scan = ... # type: Any - controller_scan = ... # type: Any - debug = ... # type: Any - append_slash = ... # type: Any - sub_domains = ... # type: Any - sub_domains_ignore = ... # type: Any - domain_match = ... # type: Any - explicit = ... # type: Any - encoding = ... # type: Any - decode_errors = ... # type: Any - hardcode_names = ... # type: Any - minimization = ... # type: Any - create_regs_lock = ... # type: Any - def __init__(self, controller_scan=..., directory=None, always_scan=False, register=True, explicit=True): ... - environ = ... # type: Any - def extend(self, routes, path_prefix=''): ... - def make_route(self, *args, **kargs): ... - def connect(self, *args, **kargs): ... - def create_regs(self, *args, **kwargs): ... - def match(self, url=None, environ=None): ... - def routematch(self, url=None, environ=None): ... - obj = ... # type: Any - def generate(self, *args, **kargs): ... - def resource(self, member_name, collection_name, **kwargs): ... - def redirect(self, match_path, destination_path, *args, **kwargs): ... diff --git a/stubs/third-party-2.7/routes/util.pyi b/stubs/third-party-2.7/routes/util.pyi deleted file mode 100644 index f7ac1815faab..000000000000 --- a/stubs/third-party-2.7/routes/util.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# Stubs for routes.util (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class RoutesException(Exception): ... -class MatchException(RoutesException): ... -class GenerationException(RoutesException): ... - -def url_for(*args, **kargs): ... - -class URLGenerator: - mapper = ... # type: Any - environ = ... # type: Any - def __init__(self, mapper, environ): ... - def __call__(self, *args, **kargs): ... - def current(self, *args, **kwargs): ... - -def redirect_to(*args, **kargs): ... -def cache_hostinfo(environ): ... -def controller_scan(directory=None): ... -def as_unicode(value, encoding, errors=''): ... -def ascii_characters(string): ... diff --git a/stubs/third-party-2.7/scribe/__init__.pyi b/stubs/third-party-2.7/scribe/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/scribe/scribe.pyi b/stubs/third-party-2.7/scribe/scribe.pyi deleted file mode 100644 index 9447a0d64366..000000000000 --- a/stubs/third-party-2.7/scribe/scribe.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Stubs for scribe.scribe (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -import fb303.FacebookService -from .ttypes import * -from thrift.Thrift import TProcessor - -class Iface(fb303.FacebookService.Iface): - def Log(self, messages): ... - -class Client(fb303.FacebookService.Client, Iface): - def __init__(self, iprot, oprot=None): ... - def Log(self, messages): ... - def send_Log(self, messages): ... - def recv_Log(self): ... - -class Processor(fb303.FacebookService.Processor, Iface, TProcessor): - def __init__(self, handler): ... - def process(self, iprot, oprot): ... - def process_Log(self, seqid, iprot, oprot): ... - -class Log_args: - thrift_spec = ... # type: Any - messages = ... # type: Any - def __init__(self, messages=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class Log_result: - thrift_spec = ... # type: Any - success = ... # type: Any - def __init__(self, success=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/third-party-2.7/scribe/ttypes.pyi b/stubs/third-party-2.7/scribe/ttypes.pyi deleted file mode 100644 index c4f85966b84a..000000000000 --- a/stubs/third-party-2.7/scribe/ttypes.pyi +++ /dev/null @@ -1,22 +0,0 @@ -# Stubs for scribe.ttypes (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -fastbinary = ... # type: Any - -class ResultCode: - OK = ... # type: Any - TRY_LATER = ... # type: Any - -class LogEntry: - thrift_spec = ... # type: Any - category = ... # type: Any - message = ... # type: Any - def __init__(self, category=None, message=None): ... - def read(self, iprot): ... - def write(self, oprot): ... - def validate(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/stubs/third-party-2.7/sqlalchemy/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/__init__.pyi deleted file mode 100644 index 1999044076b9..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/__init__.pyi +++ /dev/null @@ -1,113 +0,0 @@ -# Stubs for sqlalchemy (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from sqlalchemy import sql -from sqlalchemy import types -from sqlalchemy import schema -from sqlalchemy import inspection -from sqlalchemy import engine - -alias = sql.alias -and_ = sql.and_ -asc = sql.asc -between = sql.between -bindparam = sql.bindparam -case = sql.case -cast = sql.cast -collate = sql.collate -column = sql.column -delete = sql.delete -desc = sql.desc -distinct = sql.distinct -except_ = sql.except_ -except_all = sql.except_all -exists = sql.exists -extract = sql.extract -false = sql.false -func = sql.func -funcfilter = sql.funcfilter -insert = sql.insert -intersect = sql.intersect -intersect_all = sql.intersect_all -join = sql.join -literal = sql.literal -literal_column = sql.literal_column -modifier = sql.modifier -not_ = sql.not_ -null = sql.null -or_ = sql.or_ -outerjoin = sql.outerjoin -outparam = sql.outparam -over = sql.over -select = sql.select -subquery = sql.subquery -table = sql.table -text = sql.text -true = sql.true -tuple_ = sql.tuple_ -type_coerce = sql.type_coerce -union = sql.union -union_all = sql.union_all -update = sql.update -BIGINT = types.BIGINT -BINARY = types.BINARY -BLOB = types.BLOB -BOOLEAN = types.BOOLEAN -BigInteger = types.BigInteger -Binary = types.Binary -Boolean = types.Boolean -CHAR = types.CHAR -CLOB = types.CLOB -DATE = types.DATE -DATETIME = types.DATETIME -DECIMAL = types.DECIMAL -Date = types.Date -DateTime = types.DateTime -Enum = types.Enum -FLOAT = types.FLOAT -Float = types.Float -INT = types.INT -INTEGER = types.INTEGER -Integer = types.Integer -Interval = types.Interval -LargeBinary = types.LargeBinary -NCHAR = types.NCHAR -NVARCHAR = types.NVARCHAR -NUMERIC = types.NUMERIC -Numeric = types.Numeric -PickleType = types.PickleType -REAL = types.REAL -SMALLINT = types.SMALLINT -SmallInteger = types.SmallInteger -String = types.String -TEXT = types.TEXT -TIME = types.TIME -TIMESTAMP = types.TIMESTAMP -Text = types.Text -Time = types.Time -TypeDecorator = types.TypeDecorator -Unicode = types.Unicode -UnicodeText = types.UnicodeText -VARBINARY = types.VARBINARY -VARCHAR = types.VARCHAR -CheckConstraint = schema.CheckConstraint -Column = schema.Column -ColumnDefault = schema.ColumnDefault -Constraint = schema.Constraint -DefaultClause = schema.DefaultClause -FetchedValue = schema.FetchedValue -ForeignKey = schema.ForeignKey -ForeignKeyConstraint = schema.ForeignKeyConstraint -Index = schema.Index -MetaData = schema.MetaData -PassiveDefault = schema.PassiveDefault -PrimaryKeyConstraint = schema.PrimaryKeyConstraint -Sequence = schema.Sequence -Table = schema.Table -ThreadLocalMetaData = schema.ThreadLocalMetaData -UniqueConstraint = schema.UniqueConstraint -DDL = schema.DDL -inspect = inspection.inspect -create_engine = engine.create_engine -engine_from_config = engine.engine_from_config diff --git a/stubs/third-party-2.7/sqlalchemy/databases/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/databases/__init__.pyi deleted file mode 100644 index b1ac4a4d18a3..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/databases/__init__.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for sqlalchemy.databases (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# Names in __all__ with no definition: -# firebird -# mssql -# mysql -# oracle -# postgresql -# sqlite -# sybase diff --git a/stubs/third-party-2.7/sqlalchemy/databases/mysql.pyi b/stubs/third-party-2.7/sqlalchemy/databases/mysql.pyi deleted file mode 100644 index c218c50b754f..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/databases/mysql.pyi +++ /dev/null @@ -1 +0,0 @@ -from sqlalchemy.dialects.mysql.base import * diff --git a/stubs/third-party-2.7/sqlalchemy/dialects/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/dialects/__init__.pyi deleted file mode 100644 index 2d261de1b9ff..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/dialects/__init__.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for sqlalchemy.dialects (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# Names in __all__ with no definition: -# firebird -# mssql -# mysql -# oracle -# postgresql -# sqlite -# sybase diff --git a/stubs/third-party-2.7/sqlalchemy/dialects/mysql/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/dialects/mysql/__init__.pyi deleted file mode 100644 index 2faf87dd3125..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/dialects/mysql/__init__.pyi +++ /dev/null @@ -1,42 +0,0 @@ -# Stubs for sqlalchemy.dialects.mysql (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import base - -BIGINT = base.BIGINT -BINARY = base.BINARY -BIT = base.BIT -BLOB = base.BLOB -BOOLEAN = base.BOOLEAN -CHAR = base.CHAR -DATE = base.DATE -DATETIME = base.DATETIME -DECIMAL = base.DECIMAL -DOUBLE = base.DOUBLE -ENUM = base.ENUM -DECIMAL = base.DECIMAL -FLOAT = base.FLOAT -INTEGER = base.INTEGER -INTEGER = base.INTEGER -LONGBLOB = base.LONGBLOB -LONGTEXT = base.LONGTEXT -MEDIUMBLOB = base.MEDIUMBLOB -MEDIUMINT = base.MEDIUMINT -MEDIUMTEXT = base.MEDIUMTEXT -NCHAR = base.NCHAR -NVARCHAR = base.NVARCHAR -NUMERIC = base.NUMERIC -SET = base.SET -SMALLINT = base.SMALLINT -REAL = base.REAL -TEXT = base.TEXT -TIME = base.TIME -TIMESTAMP = base.TIMESTAMP -TINYBLOB = base.TINYBLOB -TINYINT = base.TINYINT -TINYTEXT = base.TINYTEXT -VARBINARY = base.VARBINARY -VARCHAR = base.VARCHAR -YEAR = base.YEAR -dialect = base.dialect diff --git a/stubs/third-party-2.7/sqlalchemy/dialects/mysql/base.pyi b/stubs/third-party-2.7/sqlalchemy/dialects/mysql/base.pyi deleted file mode 100644 index 4bbb774518a8..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/dialects/mysql/base.pyi +++ /dev/null @@ -1,350 +0,0 @@ -# Stubs for sqlalchemy.dialects.mysql.base (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from ... import sql -from ... import engine -from ... import util -from ... import types - -sqltypes = sql.sqltypes -compiler = sql.compiler -reflection = engine.reflection -default = engine.default -topological = util.topological -DATE = types.DATE -BOOLEAN = types.BOOLEAN -BLOB = types.BLOB -BINARY = types.BINARY -VARBINARY = types.VARBINARY - -RESERVED_WORDS = ... # type: Any -AUTOCOMMIT_RE = ... # type: Any -SET_RE = ... # type: Any - -class _NumericType: - unsigned = ... # type: Any - zerofill = ... # type: Any - def __init__(self, unsigned=False, zerofill=False, **kw): ... - -class _FloatType(_NumericType, sqltypes.Float): - scale = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=True, **kw): ... - -class _IntegerType(_NumericType, sqltypes.Integer): - display_width = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class _StringType(sqltypes.String): - charset = ... # type: Any - ascii = ... # type: Any - unicode = ... # type: Any - binary = ... # type: Any - national = ... # type: Any - def __init__(self, charset=None, collation=None, ascii=False, binary=False, unicode=False, national=False, **kw): ... - -class _MatchType(sqltypes.Float, sqltypes.MatchType): - def __init__(self, **kw): ... - -class NUMERIC(_NumericType, sqltypes.NUMERIC): - __visit_name__ = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=True, **kw): ... - -class DECIMAL(_NumericType, sqltypes.DECIMAL): - __visit_name__ = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=True, **kw): ... - -class DOUBLE(_FloatType): - __visit_name__ = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=True, **kw): ... - -class REAL(_FloatType, sqltypes.REAL): - __visit_name__ = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=True, **kw): ... - -class FLOAT(_FloatType, sqltypes.FLOAT): - __visit_name__ = ... # type: Any - def __init__(self, precision=None, scale=None, asdecimal=False, **kw): ... - def bind_processor(self, dialect): ... - -class INTEGER(_IntegerType, sqltypes.INTEGER): - __visit_name__ = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class BIGINT(_IntegerType, sqltypes.BIGINT): - __visit_name__ = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class MEDIUMINT(_IntegerType): - __visit_name__ = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class TINYINT(_IntegerType): - __visit_name__ = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class SMALLINT(_IntegerType, sqltypes.SMALLINT): - __visit_name__ = ... # type: Any - def __init__(self, display_width=None, **kw): ... - -class BIT(sqltypes.TypeEngine): - __visit_name__ = ... # type: Any - length = ... # type: Any - def __init__(self, length=None): ... - def result_processor(self, dialect, coltype): ... - -class TIME(sqltypes.TIME): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=False, fsp=None): ... - def result_processor(self, dialect, coltype): ... - -class TIMESTAMP(sqltypes.TIMESTAMP): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=False, fsp=None): ... - -class DATETIME(sqltypes.DATETIME): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=False, fsp=None): ... - -class YEAR(sqltypes.TypeEngine): - __visit_name__ = ... # type: Any - display_width = ... # type: Any - def __init__(self, display_width=None): ... - -class TEXT(_StringType, sqltypes.TEXT): - __visit_name__ = ... # type: Any - def __init__(self, length=None, **kw): ... - -class TINYTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs): ... - -class MEDIUMTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs): ... - -class LONGTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs): ... - -class VARCHAR(_StringType, sqltypes.VARCHAR): - __visit_name__ = ... # type: Any - def __init__(self, length=None, **kwargs): ... - -class CHAR(_StringType, sqltypes.CHAR): - __visit_name__ = ... # type: Any - def __init__(self, length=None, **kwargs): ... - -class NVARCHAR(_StringType, sqltypes.NVARCHAR): - __visit_name__ = ... # type: Any - def __init__(self, length=None, **kwargs): ... - -class NCHAR(_StringType, sqltypes.NCHAR): - __visit_name__ = ... # type: Any - def __init__(self, length=None, **kwargs): ... - -class TINYBLOB(sqltypes._Binary): - __visit_name__ = ... # type: Any - -class MEDIUMBLOB(sqltypes._Binary): - __visit_name__ = ... # type: Any - -class LONGBLOB(sqltypes._Binary): - __visit_name__ = ... # type: Any - -class _EnumeratedValues(_StringType): ... - -class ENUM(sqltypes.Enum, _EnumeratedValues): - __visit_name__ = ... # type: Any - strict = ... # type: Any - def __init__(self, *enums, **kw): ... - def bind_processor(self, dialect): ... - def adapt(self, cls, **kw): ... - -class SET(_EnumeratedValues): - __visit_name__ = ... # type: Any - retrieve_as_bitwise = ... # type: Any - values = ... # type: Any - def __init__(self, *values, **kw): ... - def column_expression(self, colexpr): ... - def result_processor(self, dialect, coltype): ... - def bind_processor(self, dialect): ... - def adapt(self, impltype, **kw): ... - -MSTime = ... # type: Any -MSSet = ... # type: Any -MSEnum = ... # type: Any -MSLongBlob = ... # type: Any -MSMediumBlob = ... # type: Any -MSTinyBlob = ... # type: Any -MSBlob = ... # type: Any -MSBinary = ... # type: Any -MSVarBinary = ... # type: Any -MSNChar = ... # type: Any -MSNVarChar = ... # type: Any -MSChar = ... # type: Any -MSString = ... # type: Any -MSLongText = ... # type: Any -MSMediumText = ... # type: Any -MSTinyText = ... # type: Any -MSText = ... # type: Any -MSYear = ... # type: Any -MSTimeStamp = ... # type: Any -MSBit = ... # type: Any -MSSmallInteger = ... # type: Any -MSTinyInteger = ... # type: Any -MSMediumInteger = ... # type: Any -MSBigInteger = ... # type: Any -MSNumeric = ... # type: Any -MSDecimal = ... # type: Any -MSDouble = ... # type: Any -MSReal = ... # type: Any -MSFloat = ... # type: Any -MSInteger = ... # type: Any -colspecs = ... # type: Any -ischema_names = ... # type: Any - -class MySQLExecutionContext(default.DefaultExecutionContext): - def should_autocommit_text(self, statement): ... - -class MySQLCompiler(compiler.SQLCompiler): - render_table_with_column_in_update_from = ... # type: Any - extract_map = ... # type: Any - def visit_random_func(self, fn, **kw): ... - def visit_utc_timestamp_func(self, fn, **kw): ... - def visit_sysdate_func(self, fn, **kw): ... - def visit_concat_op_binary(self, binary, operator, **kw): ... - def visit_match_op_binary(self, binary, operator, **kw): ... - def get_from_hint_text(self, table, text): ... - def visit_typeclause(self, typeclause, type_=None): ... - def visit_cast(self, cast, **kwargs): ... - def render_literal_value(self, value, type_): ... - def visit_true(self, element, **kw): ... - def visit_false(self, element, **kw): ... - def get_select_precolumns(self, select, **kw): ... - def visit_join(self, join, asfrom=False, **kwargs): ... - def for_update_clause(self, select, **kw): ... - def limit_clause(self, select, **kw): ... - def update_limit_clause(self, update_stmt): ... - def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ... - def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... - -class MySQLDDLCompiler(compiler.DDLCompiler): - def create_table_constraints(self, table, **kw): ... - def get_column_specification(self, column, **kw): ... - def post_create_table(self, table): ... - def visit_create_index(self, create): ... - def visit_primary_key_constraint(self, constraint): ... - def visit_drop_index(self, drop): ... - def visit_drop_constraint(self, drop): ... - def define_constraint_match(self, constraint): ... - -class MySQLTypeCompiler(compiler.GenericTypeCompiler): - def visit_NUMERIC(self, type_, **kw): ... - def visit_DECIMAL(self, type_, **kw): ... - def visit_DOUBLE(self, type_, **kw): ... - def visit_REAL(self, type_, **kw): ... - def visit_FLOAT(self, type_, **kw): ... - def visit_INTEGER(self, type_, **kw): ... - def visit_BIGINT(self, type_, **kw): ... - def visit_MEDIUMINT(self, type_, **kw): ... - def visit_TINYINT(self, type_, **kw): ... - def visit_SMALLINT(self, type_, **kw): ... - def visit_BIT(self, type_, **kw): ... - def visit_DATETIME(self, type_, **kw): ... - def visit_DATE(self, type_, **kw): ... - def visit_TIME(self, type_, **kw): ... - def visit_TIMESTAMP(self, type_, **kw): ... - def visit_YEAR(self, type_, **kw): ... - def visit_TEXT(self, type_, **kw): ... - def visit_TINYTEXT(self, type_, **kw): ... - def visit_MEDIUMTEXT(self, type_, **kw): ... - def visit_LONGTEXT(self, type_, **kw): ... - def visit_VARCHAR(self, type_, **kw): ... - def visit_CHAR(self, type_, **kw): ... - def visit_NVARCHAR(self, type_, **kw): ... - def visit_NCHAR(self, type_, **kw): ... - def visit_VARBINARY(self, type_, **kw): ... - def visit_large_binary(self, type_, **kw): ... - def visit_enum(self, type_, **kw): ... - def visit_BLOB(self, type_, **kw): ... - def visit_TINYBLOB(self, type_, **kw): ... - def visit_MEDIUMBLOB(self, type_, **kw): ... - def visit_LONGBLOB(self, type_, **kw): ... - def visit_ENUM(self, type_, **kw): ... - def visit_SET(self, type_, **kw): ... - def visit_BOOLEAN(self, type, **kw): ... - -class MySQLIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words = ... # type: Any - def __init__(self, dialect, server_ansiquotes=False, **kw): ... - -class MySQLDialect(default.DefaultDialect): - name = ... # type: Any - supports_alter = ... # type: Any - supports_native_boolean = ... # type: Any - max_identifier_length = ... # type: Any - max_index_name_length = ... # type: Any - supports_native_enum = ... # type: Any - supports_sane_rowcount = ... # type: Any - supports_sane_multi_rowcount = ... # type: Any - supports_multivalues_insert = ... # type: Any - default_paramstyle = ... # type: Any - colspecs = ... # type: Any - statement_compiler = ... # type: Any - ddl_compiler = ... # type: Any - type_compiler = ... # type: Any - ischema_names = ... # type: Any - preparer = ... # type: Any - construct_arguments = ... # type: Any - isolation_level = ... # type: Any - def __init__(self, isolation_level=None, **kwargs): ... - def on_connect(self): ... - def set_isolation_level(self, connection, level): ... - def get_isolation_level(self, connection): ... - def do_commit(self, dbapi_connection): ... - def do_rollback(self, dbapi_connection): ... - def do_begin_twophase(self, connection, xid): ... - def do_prepare_twophase(self, connection, xid): ... - def do_rollback_twophase(self, connection, xid, is_prepared=True, recover=False): ... - def do_commit_twophase(self, connection, xid, is_prepared=True, recover=False): ... - def do_recover_twophase(self, connection): ... - def is_disconnect(self, e, connection, cursor): ... - def has_table(self, connection, table_name, schema=None): ... - identifier_preparer = ... # type: Any - def initialize(self, connection): ... - def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema=None, **kw): ... - def get_view_names(self, connection, schema=None, **kw): ... - def get_table_options(self, connection, table_name, schema=None, **kw): ... - def get_columns(self, connection, table_name, schema=None, **kw): ... - def get_pk_constraint(self, connection, table_name, schema=None, **kw): ... - def get_foreign_keys(self, connection, table_name, schema=None, **kw): ... - def get_indexes(self, connection, table_name, schema=None, **kw): ... - def get_unique_constraints(self, connection, table_name, schema=None, **kw): ... - def get_view_definition(self, connection, view_name, schema=None, **kw): ... - -class ReflectedState: - columns = ... # type: Any - table_options = ... # type: Any - table_name = ... # type: Any - keys = ... # type: Any - constraints = ... # type: Any - def __init__(self): ... - -class MySQLTableDefinitionParser: - dialect = ... # type: Any - preparer = ... # type: Any - def __init__(self, dialect, preparer): ... - def parse(self, show_create, charset): ... - -class _DecodingRowProxy: - rowproxy = ... # type: Any - charset = ... # type: Any - def __init__(self, rowproxy, charset): ... - def __getitem__(self, index): ... - def __getattr__(self, attr): ... diff --git a/stubs/third-party-2.7/sqlalchemy/engine/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/engine/__init__.pyi deleted file mode 100644 index c25d57fa2176..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/engine/__init__.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for sqlalchemy.engine (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def create_engine(*args, **kwargs): ... -def engine_from_config(configuration, prefix='', **kwargs): ... diff --git a/stubs/third-party-2.7/sqlalchemy/engine/strategies.pyi b/stubs/third-party-2.7/sqlalchemy/engine/strategies.pyi deleted file mode 100644 index afec44673cec..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/engine/strategies.pyi +++ /dev/null @@ -1,39 +0,0 @@ -# Stubs for sqlalchemy.engine.strategies (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import base - -strategies = ... # type: Any - -class EngineStrategy: - def __init__(self): ... - def create(self, *args, **kwargs): ... - -class DefaultEngineStrategy(EngineStrategy): - def create(self, name_or_url, **kwargs): ... - -class PlainEngineStrategy(DefaultEngineStrategy): - name = ... # type: Any - engine_cls = ... # type: Any - -class ThreadLocalEngineStrategy(DefaultEngineStrategy): - name = ... # type: Any - engine_cls = ... # type: Any - -class MockEngineStrategy(EngineStrategy): - name = ... # type: Any - def create(self, name_or_url, executor, **kwargs): ... - class MockConnection(base.Connectable): - execute = ... # type: Any - def __init__(self, dialect, execute): ... - engine = ... # type: Any - dialect = ... # type: Any - name = ... # type: Any - def contextual_connect(self, **kwargs): ... - def execution_options(self, **kw): ... - def compiler(self, statement, parameters, **kwargs): ... - def create(self, entity, **kwargs): ... - def drop(self, entity, **kwargs): ... - def execute(self, object, *multiparams, **params): ... diff --git a/stubs/third-party-2.7/sqlalchemy/engine/url.pyi b/stubs/third-party-2.7/sqlalchemy/engine/url.pyi deleted file mode 100644 index 21c979766967..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/engine/url.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for sqlalchemy.engine.url (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import dialects - -registry = dialects.registry - -class URL: - drivername = ... # type: Any - username = ... # type: Any - password = ... # type: Any - host = ... # type: Any - port = ... # type: Any - database = ... # type: Any - query = ... # type: Any - def __init__(self, drivername, username=None, password=None, host=None, port=None, database=None, query=None): ... - def __to_string__(self, hide_password=True): ... - def __hash__(self): ... - def __eq__(self, other): ... - def get_backend_name(self): ... - def get_driver_name(self): ... - def get_dialect(self): ... - def translate_connect_args(self, names=..., **kw): ... - -def make_url(name_or_url): ... diff --git a/stubs/third-party-2.7/sqlalchemy/exc.pyi b/stubs/third-party-2.7/sqlalchemy/exc.pyi deleted file mode 100644 index b7b45077c59b..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/exc.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# Stubs for sqlalchemy.exc (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class SQLAlchemyError(Exception): ... -class ArgumentError(SQLAlchemyError): ... -class NoSuchModuleError(ArgumentError): ... -class NoForeignKeysError(ArgumentError): ... -class AmbiguousForeignKeysError(ArgumentError): ... - -class CircularDependencyError(SQLAlchemyError): - cycles = ... # type: Any - edges = ... # type: Any - def __init__(self, message, cycles, edges, msg=None): ... - def __reduce__(self): ... - -class CompileError(SQLAlchemyError): ... - -class UnsupportedCompilationError(CompileError): - def __init__(self, compiler, element_type): ... - -class IdentifierError(SQLAlchemyError): ... -class DisconnectionError(SQLAlchemyError): ... -class TimeoutError(SQLAlchemyError): ... -class InvalidRequestError(SQLAlchemyError): ... -class NoInspectionAvailable(InvalidRequestError): ... -class ResourceClosedError(InvalidRequestError): ... -class NoSuchColumnError(KeyError, InvalidRequestError): ... -class NoReferenceError(InvalidRequestError): ... - -class NoReferencedTableError(NoReferenceError): - table_name = ... # type: Any - def __init__(self, message, tname): ... - def __reduce__(self): ... - -class NoReferencedColumnError(NoReferenceError): - table_name = ... # type: Any - column_name = ... # type: Any - def __init__(self, message, tname, cname): ... - def __reduce__(self): ... - -class NoSuchTableError(InvalidRequestError): ... -class UnboundExecutionError(InvalidRequestError): ... -class DontWrapMixin: ... - -UnmappedColumnError = ... # type: Any - -class StatementError(SQLAlchemyError): - statement = ... # type: Any - params = ... # type: Any - orig = ... # type: Any - detail = ... # type: Any - def __init__(self, message, statement, params, orig): ... - def add_detail(self, msg): ... - def __reduce__(self): ... - def __unicode__(self): ... - -class DBAPIError(StatementError): - @classmethod - def instance(cls, statement, params, orig, dbapi_base_err, connection_invalidated=False, dialect=None): ... - def __reduce__(self): ... - connection_invalidated = ... # type: Any - def __init__(self, statement, params, orig, connection_invalidated=False): ... - -class InterfaceError(DBAPIError): ... -class DatabaseError(DBAPIError): ... -class DataError(DatabaseError): ... -class OperationalError(DatabaseError): ... -class IntegrityError(DatabaseError): ... -class InternalError(DatabaseError): ... -class ProgrammingError(DatabaseError): ... -class NotSupportedError(DatabaseError): ... -class SADeprecationWarning(DeprecationWarning): ... -class SAPendingDeprecationWarning(PendingDeprecationWarning): ... -class SAWarning(RuntimeWarning): ... diff --git a/stubs/third-party-2.7/sqlalchemy/inspection.pyi b/stubs/third-party-2.7/sqlalchemy/inspection.pyi deleted file mode 100644 index 786f8b0e3631..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/inspection.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for sqlalchemy.inspection (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def inspect(subject, raiseerr=True): ... diff --git a/stubs/third-party-2.7/sqlalchemy/orm/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/orm/__init__.pyi deleted file mode 100644 index b1a3e76d4157..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/orm/__init__.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# Stubs for sqlalchemy.orm (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import mapper -from . import interfaces -from . import deprecated_interfaces -from . import util -from . import properties -from . import relationships -from . import descriptor_props -from . import session -from . import scoping -from . import query -from ..util import langhelpers -from . import strategy_options - -Mapper = mapper.Mapper -class_mapper = mapper.class_mapper -configure_mappers = mapper.configure_mappers -reconstructor = mapper.reconstructor -validates = mapper.validates -EXT_CONTINUE = interfaces.EXT_CONTINUE -EXT_STOP = interfaces.EXT_STOP -PropComparator = interfaces.PropComparator -MapperExtension = deprecated_interfaces.MapperExtension -SessionExtension = deprecated_interfaces.SessionExtension -AttributeExtension = deprecated_interfaces.AttributeExtension -aliased = util.aliased -join = util.join -object_mapper = util.object_mapper -outerjoin = util.outerjoin -polymorphic_union = util.polymorphic_union -was_deleted = util.was_deleted -with_parent = util.with_parent -with_polymorphic = util.with_polymorphic -ColumnProperty = properties.ColumnProperty -RelationshipProperty = relationships.RelationshipProperty -ComparableProperty = descriptor_props.ComparableProperty -CompositeProperty = descriptor_props.CompositeProperty -SynonymProperty = descriptor_props.SynonymProperty -foreign = relationships.foreign -remote = relationships.remote -Session = session.Session -object_session = session.object_session -sessionmaker = session.sessionmaker -make_transient = session.make_transient -make_transient_to_detached = session.make_transient_to_detached -scoped_session = scoping.scoped_session -AliasOption = query.AliasOption -Query = query.Query -Bundle = query.Bundle -public_factory = langhelpers.public_factory - -def create_session(bind=None, **kwargs): ... - -relationship = ... # type: Any - -def relation(*arg, **kw): ... -def dynamic_loader(argument, **kw): ... - -column_property = ... # type: Any -composite = ... # type: Any - -def backref(name, **kwargs): ... -def deferred(*columns, **kw): ... - -mapper = ... # type: Any -synonym = ... # type: Any -comparable_property = ... # type: Any - -def compile_mappers(): ... -def clear_mappers(): ... - -joinedload = ... # type: Any -joinedload_all = ... # type: Any -contains_eager = ... # type: Any -defer = ... # type: Any -undefer = ... # type: Any -undefer_group = ... # type: Any -load_only = ... # type: Any -lazyload = ... # type: Any -lazyload_all = ... # type: Any -subqueryload = ... # type: Any -subqueryload_all = ... # type: Any -immediateload = ... # type: Any -noload = ... # type: Any -defaultload = ... # type: Any - -Load = strategy_options.Load - -def eagerload(*args, **kwargs): ... -def eagerload_all(*args, **kwargs): ... - -contains_alias = ... # type: Any diff --git a/stubs/third-party-2.7/sqlalchemy/orm/session.pyi b/stubs/third-party-2.7/sqlalchemy/orm/session.pyi deleted file mode 100644 index b2385e9865a2..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/orm/session.pyi +++ /dev/null @@ -1,93 +0,0 @@ -# Stubs for sqlalchemy.orm.session (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class _SessionClassMethods: - @classmethod - def close_all(cls): ... - @classmethod - def identity_key(cls, orm_util, *args, **kwargs): ... - @classmethod - def object_session(cls, instance): ... - -class SessionTransaction: - session = ... # type: Any - nested = ... # type: Any - def __init__(self, session, parent=None, nested=False): ... - @property - def is_active(self): ... - def connection(self, bindkey, execution_options=None, **kwargs): ... - def prepare(self): ... - def commit(self): ... - def rollback(self, _capture_exception=False): ... - def close(self, invalidate=False): ... - def __enter__(self): ... - def __exit__(self, type, value, traceback): ... - -class Session(_SessionClassMethods): - public_methods = ... # type: Any - identity_map = ... # type: Any - bind = ... # type: Any - transaction = ... # type: Any - hash_key = ... # type: Any - autoflush = ... # type: Any - autocommit = ... # type: Any - expire_on_commit = ... # type: Any - twophase = ... # type: Any - def __init__(self, bind=None, autoflush=True, expire_on_commit=True, _enable_transaction_accounting=True, autocommit=False, twophase=False, weak_identity_map=True, binds=None, extension=None, info=None, query_cls=...): ... - connection_callable = ... # type: Any - def info(self): ... - def begin(self, subtransactions=False, nested=False): ... - def begin_nested(self): ... - def rollback(self): ... - def commit(self): ... - def prepare(self): ... - def connection(self, mapper=None, clause=None, bind=None, close_with_result=False, execution_options=None, **kw): ... - def execute(self, clause, params=None, mapper=None, bind=None, **kw): ... - def scalar(self, clause, params=None, mapper=None, bind=None, **kw): ... - def close(self): ... - def invalidate(self): ... - def expunge_all(self): ... - def bind_mapper(self, mapper, bind): ... - def bind_table(self, table, bind): ... - def get_bind(self, mapper=None, clause=None): ... - def query(self, *entities, **kwargs): ... - @property - def no_autoflush(self): ... - def refresh(self, instance, attribute_names=None, lockmode=None): ... - def expire_all(self): ... - def expire(self, instance, attribute_names=None): ... - def prune(self): ... - def expunge(self, instance): ... - def add(self, instance, _warn=True): ... - def add_all(self, instances): ... - def delete(self, instance): ... - def merge(self, instance, load=True): ... - def enable_relationship_loading(self, obj): ... - def __contains__(self, instance): ... - def __iter__(self): ... - def flush(self, objects=None): ... - def bulk_save_objects(self, objects, return_defaults=False, update_changed_only=True): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults=False): ... - def bulk_update_mappings(self, mapper, mappings): ... - def is_modified(self, instance, include_collections=True, passive=True): ... - @property - def is_active(self): ... - @property - def dirty(self): ... - @property - def deleted(self): ... - @property - def new(self): ... - -class sessionmaker(_SessionClassMethods): - kw = ... # type: Any - class_ = ... # type: Any - def __init__(self, bind=None, class_=..., autoflush=True, autocommit=False, expire_on_commit=True, info=None, **kw): ... - def __call__(self, **local_kw): ... - def configure(self, **new_kw): ... - -# Names in __all__ with no definition: -# SessionExtension diff --git a/stubs/third-party-2.7/sqlalchemy/pool.pyi b/stubs/third-party-2.7/sqlalchemy/pool.pyi deleted file mode 100644 index e6c57dda4420..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/pool.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# Stubs for sqlalchemy.pool (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import log -from . import util - -threading = util.threading -memoized_property = util.memoized_property -chop_traceback = util.chop_traceback - -proxies = ... # type: Any - -def manage(module, **params): ... -def clear_managers(): ... - -reset_rollback = ... # type: Any -reset_commit = ... # type: Any -reset_none = ... # type: Any - -class _ConnDialect: - def do_rollback(self, dbapi_connection): ... - def do_commit(self, dbapi_connection): ... - def do_close(self, dbapi_connection): ... - -class Pool(log.Identified): - logging_name = ... # type: Any - echo = ... # type: Any - def __init__(self, creator, recycle=-1, echo=None, use_threadlocal=False, logging_name=None, reset_on_return=True, listeners=None, events=None, _dispatch=None, _dialect=None): ... - def add_listener(self, listener): ... - def unique_connection(self): ... - def recreate(self): ... - def dispose(self): ... - def connect(self): ... - def status(self): ... - -class _ConnectionRecord: - connection = ... # type: Any - finalize_callback = ... # type: Any - def __init__(self, pool): ... - def info(self): ... - @classmethod - def checkout(cls, pool): ... - fairy_ref = ... # type: Any - def checkin(self): ... - def close(self): ... - def invalidate(self, e=None, soft=False): ... - def get_connection(self): ... - -class _ConnectionFairy: - connection = ... # type: Any - def __init__(self, dbapi_connection, connection_record, echo): ... - @property - def is_valid(self): ... - def info(self): ... - def invalidate(self, e=None, soft=False): ... - def cursor(self, *args, **kwargs): ... - def __getattr__(self, key): ... - info = ... # type: Any - def detach(self): ... - def close(self): ... - -class SingletonThreadPool(Pool): - size = ... # type: Any - def __init__(self, creator, pool_size=5, **kw): ... - def recreate(self): ... - def dispose(self): ... - def status(self): ... - -class QueuePool(Pool): - def __init__(self, creator, pool_size=5, max_overflow=10, timeout=30, **kw): ... - def recreate(self): ... - def dispose(self): ... - def status(self): ... - def size(self): ... - def checkedin(self): ... - def overflow(self): ... - def checkedout(self): ... - -class NullPool(Pool): - def status(self): ... - def recreate(self): ... - def dispose(self): ... - -class StaticPool(Pool): - def connection(self): ... - def status(self): ... - def dispose(self): ... - def recreate(self): ... - -class AssertionPool(Pool): - def __init__(self, *args, **kw): ... - def status(self): ... - def dispose(self): ... - def recreate(self): ... - -class _DBProxy: - module = ... # type: Any - kw = ... # type: Any - poolclass = ... # type: Any - pools = ... # type: Any - def __init__(self, module, poolclass=..., **kw): ... - def close(self): ... - def __del__(self): ... - def __getattr__(self, key): ... - def get_pool(self, *args, **kw): ... - def connect(self, *args, **kw): ... - def dispose(self, *args, **kw): ... diff --git a/stubs/third-party-2.7/sqlalchemy/schema.pyi b/stubs/third-party-2.7/sqlalchemy/schema.pyi deleted file mode 100644 index c70a221f2a24..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/schema.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for sqlalchemy.schema (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .sql import base -from .sql import schema -from .sql import naming -from .sql import ddl - -SchemaVisitor = base.SchemaVisitor -CheckConstraint = schema.CheckConstraint -Column = schema.Column -ColumnDefault = schema.ColumnDefault -Constraint = schema.Constraint -DefaultClause = schema.DefaultClause -DefaultGenerator = schema.DefaultGenerator -FetchedValue = schema.FetchedValue -ForeignKey = schema.ForeignKey -ForeignKeyConstraint = schema.ForeignKeyConstraint -Index = schema.Index -MetaData = schema.MetaData -PassiveDefault = schema.PassiveDefault -PrimaryKeyConstraint = schema.PrimaryKeyConstraint -SchemaItem = schema.SchemaItem -Sequence = schema.Sequence -Table = schema.Table -ThreadLocalMetaData = schema.ThreadLocalMetaData -UniqueConstraint = schema.UniqueConstraint -_get_table_key = schema._get_table_key -ColumnCollectionConstraint = schema.ColumnCollectionConstraint -ColumnCollectionMixin = schema.ColumnCollectionMixin -conv = naming.conv -DDL = ddl.DDL -CreateTable = ddl.CreateTable -DropTable = ddl.DropTable -CreateSequence = ddl.CreateSequence -DropSequence = ddl.DropSequence -CreateIndex = ddl.CreateIndex -DropIndex = ddl.DropIndex -CreateSchema = ddl.CreateSchema -DropSchema = ddl.DropSchema -_DropView = ddl._DropView -CreateColumn = ddl.CreateColumn -AddConstraint = ddl.AddConstraint -DropConstraint = ddl.DropConstraint -DDLBase = ddl.DDLBase -DDLElement = ddl.DDLElement -_CreateDropBase = ddl._CreateDropBase -_DDLCompiles = ddl._DDLCompiles -sort_tables = ddl.sort_tables -sort_tables_and_constraints = ddl.sort_tables_and_constraints diff --git a/stubs/third-party-2.7/sqlalchemy/sql/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/sql/__init__.pyi deleted file mode 100644 index 91d06d82e238..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/sql/__init__.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# Stubs for sqlalchemy.sql (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import expression -from . import visitors - -Alias = expression.Alias -ClauseElement = expression.ClauseElement -ColumnCollection = expression.ColumnCollection -ColumnElement = expression.ColumnElement -CompoundSelect = expression.CompoundSelect -Delete = expression.Delete -FromClause = expression.FromClause -Insert = expression.Insert -Join = expression.Join -Select = expression.Select -Selectable = expression.Selectable -TableClause = expression.TableClause -Update = expression.Update -alias = expression.alias -and_ = expression.and_ -asc = expression.asc -between = expression.between -bindparam = expression.bindparam -case = expression.case -cast = expression.cast -collate = expression.collate -column = expression.column -delete = expression.delete -desc = expression.desc -distinct = expression.distinct -except_ = expression.except_ -except_all = expression.except_all -exists = expression.exists -extract = expression.extract -false = expression.false -False_ = expression.False_ -func = expression.func -funcfilter = expression.funcfilter -insert = expression.insert -intersect = expression.intersect -intersect_all = expression.intersect_all -join = expression.join -label = expression.label -literal = expression.literal -literal_column = expression.literal_column -modifier = expression.modifier -not_ = expression.not_ -null = expression.null -or_ = expression.or_ -outerjoin = expression.outerjoin -outparam = expression.outparam -over = expression.over -select = expression.select -subquery = expression.subquery -table = expression.table -text = expression.text -true = expression.true -True_ = expression.True_ -tuple_ = expression.tuple_ -type_coerce = expression.type_coerce -union = expression.union -union_all = expression.union_all -update = expression.update -ClauseVisitor = visitors.ClauseVisitor diff --git a/stubs/third-party-2.7/sqlalchemy/sql/expression.pyi b/stubs/third-party-2.7/sqlalchemy/sql/expression.pyi deleted file mode 100644 index a415d077122f..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/sql/expression.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# Stubs for sqlalchemy.sql.expression (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import functions -from . import elements -from . import base -from . import selectable -from . import dml - -func = functions.func -modifier = functions.modifier -ClauseElement = elements.ClauseElement -ColumnElement = elements.ColumnElement -not_ = elements.not_ -collate = elements.collate -literal_column = elements.literal_column -between = elements.between -literal = elements.literal -outparam = elements.outparam -type_coerce = elements.type_coerce -ColumnCollection = base.ColumnCollection -Alias = selectable.Alias -Join = selectable.Join -Select = selectable.Select -Selectable = selectable.Selectable -TableClause = selectable.TableClause -CompoundSelect = selectable.CompoundSelect -FromClause = selectable.FromClause -alias = selectable.alias -subquery = selectable.subquery -Insert = dml.Insert -Update = dml.Update -Delete = dml.Delete - -and_ = ... # type: Any -or_ = ... # type: Any -bindparam = ... # type: Any -select = ... # type: Any -text = ... # type: Any -table = ... # type: Any -column = ... # type: Any -over = ... # type: Any -label = ... # type: Any -case = ... # type: Any -cast = ... # type: Any -extract = ... # type: Any -tuple_ = ... # type: Any -except_ = ... # type: Any -except_all = ... # type: Any -intersect = ... # type: Any -intersect_all = ... # type: Any -union = ... # type: Any -union_all = ... # type: Any -exists = ... # type: Any -nullsfirst = ... # type: Any -nullslast = ... # type: Any -asc = ... # type: Any -desc = ... # type: Any -distinct = ... # type: Any -null = ... # type: Any -join = ... # type: Any -outerjoin = ... # type: Any -insert = ... # type: Any -update = ... # type: Any -delete = ... # type: Any diff --git a/stubs/third-party-2.7/sqlalchemy/sql/visitors.pyi b/stubs/third-party-2.7/sqlalchemy/sql/visitors.pyi deleted file mode 100644 index 0a7fb4cad9b1..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/sql/visitors.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# Stubs for sqlalchemy.sql.visitors (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class VisitableType(type): - def __init__(cls, clsname, bases, clsdict): ... - -class Visitable: ... - -class ClauseVisitor: - __traverse_options__ = ... # type: Any - def traverse_single(self, obj, **kw): ... - def iterate(self, obj): ... - def traverse(self, obj): ... - def chain(self, visitor): ... - -class CloningVisitor(ClauseVisitor): - def copy_and_process(self, list_): ... - def traverse(self, obj): ... - -class ReplacingCloningVisitor(CloningVisitor): - def replace(self, elem): ... - def traverse(self, obj): ... - -def iterate(obj, opts): ... -def iterate_depthfirst(obj, opts): ... -def traverse_using(iterator, obj, visitors): ... -def traverse(obj, opts, visitors): ... -def traverse_depthfirst(obj, opts, visitors): ... -def cloned_traverse(obj, opts, visitors): ... -def replacement_traverse(obj, opts, replace): ... diff --git a/stubs/third-party-2.7/sqlalchemy/types.pyi b/stubs/third-party-2.7/sqlalchemy/types.pyi deleted file mode 100644 index 7aa160cab678..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/types.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for sqlalchemy.types (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .sql import type_api -from .sql import sqltypes - -TypeEngine = type_api.TypeEngine -TypeDecorator = type_api.TypeDecorator -UserDefinedType = type_api.UserDefinedType -BIGINT = sqltypes.BIGINT -BINARY = sqltypes.BINARY -BLOB = sqltypes.BLOB -BOOLEAN = sqltypes.BOOLEAN -BigInteger = sqltypes.BigInteger -Binary = sqltypes.Binary -Boolean = sqltypes.Boolean -CHAR = sqltypes.CHAR -CLOB = sqltypes.CLOB -Concatenable = sqltypes.Concatenable -DATE = sqltypes.DATE -DATETIME = sqltypes.DATETIME -DECIMAL = sqltypes.DECIMAL -Date = sqltypes.Date -DateTime = sqltypes.DateTime -Enum = sqltypes.Enum -FLOAT = sqltypes.FLOAT -Float = sqltypes.Float -INT = sqltypes.INT -INTEGER = sqltypes.INTEGER -Integer = sqltypes.Integer -Interval = sqltypes.Interval -LargeBinary = sqltypes.LargeBinary -NCHAR = sqltypes.NCHAR -NVARCHAR = sqltypes.NVARCHAR -NUMERIC = sqltypes.NUMERIC -Numeric = sqltypes.Numeric -PickleType = sqltypes.PickleType -REAL = sqltypes.REAL -SMALLINT = sqltypes.SMALLINT -SmallInteger = sqltypes.SmallInteger -String = sqltypes.String -TEXT = sqltypes.TEXT -TIME = sqltypes.TIME -TIMESTAMP = sqltypes.TIMESTAMP -Text = sqltypes.Text -Time = sqltypes.Time -Unicode = sqltypes.Unicode -UnicodeText = sqltypes.UnicodeText -VARBINARY = sqltypes.VARBINARY -VARCHAR = sqltypes.VARCHAR diff --git a/stubs/third-party-2.7/sqlalchemy/util/__init__.pyi b/stubs/third-party-2.7/sqlalchemy/util/__init__.pyi deleted file mode 100644 index a42c2ce0d533..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/util/__init__.pyi +++ /dev/null @@ -1,133 +0,0 @@ -# Stubs for sqlalchemy.util (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import compat -from . import _collections -from . import langhelpers -from . import deprecations - -callable = compat.callable -cmp = compat.cmp -reduce = compat.reduce -threading = compat.threading -py3k = compat.py3k -py33 = compat.py33 -py2k = compat.py2k -jython = compat.jython -pypy = compat.pypy -cpython = compat.cpython -win32 = compat.win32 -pickle = compat.pickle -dottedgetter = compat.dottedgetter -parse_qsl = compat.parse_qsl -namedtuple = compat.namedtuple -next = compat.next -reraise = compat.reraise -raise_from_cause = compat.raise_from_cause -text_type = compat.text_type -safe_kwarg = compat.safe_kwarg -string_types = compat.string_types -int_types = compat.int_types -binary_type = compat.binary_type -nested = compat.nested -quote_plus = compat.quote_plus -with_metaclass = compat.with_metaclass -print_ = compat.print_ -itertools_filterfalse = compat.itertools_filterfalse -u = compat.u -ue = compat.ue -b = compat.b -unquote_plus = compat.unquote_plus -unquote = compat.unquote -b64decode = compat.b64decode -b64encode = compat.b64encode -byte_buffer = compat.byte_buffer -itertools_filter = compat.itertools_filter -iterbytes = compat.iterbytes -StringIO = compat.StringIO -inspect_getargspec = compat.inspect_getargspec -zip_longest = compat.zip_longest -KeyedTuple = _collections.KeyedTuple -ImmutableContainer = _collections.ImmutableContainer -immutabledict = _collections.immutabledict -Properties = _collections.Properties -OrderedProperties = _collections.OrderedProperties -ImmutableProperties = _collections.ImmutableProperties -OrderedDict = _collections.OrderedDict -OrderedSet = _collections.OrderedSet -IdentitySet = _collections.IdentitySet -OrderedIdentitySet = _collections.OrderedIdentitySet -column_set = _collections.column_set -column_dict = _collections.column_dict -ordered_column_set = _collections.ordered_column_set -populate_column_dict = _collections.populate_column_dict -unique_list = _collections.unique_list -UniqueAppender = _collections.UniqueAppender -PopulateDict = _collections.PopulateDict -EMPTY_SET = _collections.EMPTY_SET -to_list = _collections.to_list -to_set = _collections.to_set -to_column_set = _collections.to_column_set -update_copy = _collections.update_copy -flatten_iterator = _collections.flatten_iterator -has_intersection = _collections.has_intersection -LRUCache = _collections.LRUCache -ScopedRegistry = _collections.ScopedRegistry -ThreadLocalRegistry = _collections.ThreadLocalRegistry -WeakSequence = _collections.WeakSequence -coerce_generator_arg = _collections.coerce_generator_arg -lightweight_named_tuple = _collections.lightweight_named_tuple -iterate_attributes = langhelpers.iterate_attributes -class_hierarchy = langhelpers.class_hierarchy -portable_instancemethod = langhelpers.portable_instancemethod -unbound_method_to_callable = langhelpers.unbound_method_to_callable -getargspec_init = langhelpers.getargspec_init -format_argspec_init = langhelpers.format_argspec_init -format_argspec_plus = langhelpers.format_argspec_plus -get_func_kwargs = langhelpers.get_func_kwargs -get_cls_kwargs = langhelpers.get_cls_kwargs -decorator = langhelpers.decorator -as_interface = langhelpers.as_interface -memoized_property = langhelpers.memoized_property -memoized_instancemethod = langhelpers.memoized_instancemethod -md5_hex = langhelpers.md5_hex -group_expirable_memoized_property = langhelpers.group_expirable_memoized_property -dependencies = langhelpers.dependencies -decode_slice = langhelpers.decode_slice -monkeypatch_proxied_specials = langhelpers.monkeypatch_proxied_specials -asbool = langhelpers.asbool -bool_or_str = langhelpers.bool_or_str -coerce_kw_type = langhelpers.coerce_kw_type -duck_type_collection = langhelpers.duck_type_collection -assert_arg_type = langhelpers.assert_arg_type -symbol = langhelpers.symbol -dictlike_iteritems = langhelpers.dictlike_iteritems -classproperty = langhelpers.classproperty -set_creation_order = langhelpers.set_creation_order -warn_exception = langhelpers.warn_exception -warn = langhelpers.warn -NoneType = langhelpers.NoneType -constructor_copy = langhelpers.constructor_copy -methods_equivalent = langhelpers.methods_equivalent -chop_traceback = langhelpers.chop_traceback -asint = langhelpers.asint -generic_repr = langhelpers.generic_repr -counter = langhelpers.counter -PluginLoader = langhelpers.PluginLoader -hybridproperty = langhelpers.hybridproperty -hybridmethod = langhelpers.hybridmethod -safe_reraise = langhelpers.safe_reraise -get_callable_argspec = langhelpers.get_callable_argspec -only_once = langhelpers.only_once -attrsetter = langhelpers.attrsetter -ellipses_string = langhelpers.ellipses_string -warn_limited = langhelpers.warn_limited -map_bits = langhelpers.map_bits -MemoizedSlots = langhelpers.MemoizedSlots -EnsureKWArgType = langhelpers.EnsureKWArgType -warn_deprecated = deprecations.warn_deprecated -warn_pending_deprecation = deprecations.warn_pending_deprecation -deprecated = deprecations.deprecated -pending_deprecation = deprecations.pending_deprecation -inject_docstring_text = deprecations.inject_docstring_text diff --git a/stubs/third-party-2.7/sqlalchemy/util/_collections.pyi b/stubs/third-party-2.7/sqlalchemy/util/_collections.pyi deleted file mode 100644 index 593e26647e44..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/util/_collections.pyi +++ /dev/null @@ -1,214 +0,0 @@ -# Stubs for sqlalchemy.util._collections (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import compat - -threading = compat.threading -itertools_filterfalse = compat.itertools_filterfalse -string_types = compat.string_types - -EMPTY_SET = ... # type: Any - -class AbstractKeyedTuple(tuple): - def keys(self): ... - -class KeyedTuple(AbstractKeyedTuple): - def __new__(cls, vals, labels=None): ... - def __setattr__(self, key, value): ... - -class _LW(AbstractKeyedTuple): - def __new__(cls, vals): ... - def __reduce__(self): ... - -class ImmutableContainer: - __delitem__ = ... # type: Any - -class immutabledict(ImmutableContainer, dict): - clear = ... # type: Any - def __new__(cls, *args): ... - def __init__(self, *args): ... - def __reduce__(self): ... - def union(self, d): ... - -class Properties: - def __init__(self, data): ... - def __len__(self): ... - def __iter__(self): ... - def __add__(self, other): ... - def __setitem__(self, key, object): ... - def __getitem__(self, key): ... - def __delitem__(self, key): ... - def __setattr__(self, key, obj): ... - def __getattr__(self, key): ... - def __contains__(self, key): ... - def as_immutable(self): ... - def update(self, value): ... - def get(self, key, default=None): ... - def keys(self): ... - def values(self): ... - def items(self): ... - def has_key(self, key): ... - def clear(self): ... - -class OrderedProperties(Properties): - def __init__(self): ... - -class ImmutableProperties(ImmutableContainer, Properties): ... - -class OrderedDict(dict): - def __reduce__(self): ... - def __init__(self, ____sequence=None, **kwargs): ... - def clear(self): ... - def copy(self): ... - def __copy__(self): ... - def sort(self, *arg, **kw): ... - def update(self, ____sequence=None, **kwargs): ... - def setdefault(self, key, value): ... - def __iter__(self): ... - def keys(self): ... - def values(self): ... - def items(self): ... - def itervalues(self): ... - def iterkeys(self): ... - def iteritems(self): ... - def __setitem__(self, key, object): ... - def __delitem__(self, key): ... - def pop(self, key, *default): ... - def popitem(self): ... - -class OrderedSet(set): - def __init__(self, d=None): ... - def add(self, element): ... - def remove(self, element): ... - def insert(self, pos, element): ... - def discard(self, element): ... - def clear(self): ... - def __getitem__(self, key): ... - def __iter__(self): ... - def __add__(self, other): ... - def update(self, iterable): ... - __ior__ = ... # type: Any - def union(self, other): ... - __or__ = ... # type: Any - def intersection(self, other): ... - __and__ = ... # type: Any - def symmetric_difference(self, other): ... - __xor__ = ... # type: Any - def difference(self, other): ... - __sub__ = ... # type: Any - def intersection_update(self, other): ... - __iand__ = ... # type: Any - def symmetric_difference_update(self, other): ... - __ixor__ = ... # type: Any - def difference_update(self, other): ... - __isub__ = ... # type: Any - -class IdentitySet: - def __init__(self, iterable=None): ... - def add(self, value): ... - def __contains__(self, value): ... - def remove(self, value): ... - def discard(self, value): ... - def pop(self): ... - def clear(self): ... - def __cmp__(self, other): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def issubset(self, iterable): ... - def __le__(self, other): ... - def __lt__(self, other): ... - def issuperset(self, iterable): ... - def __ge__(self, other): ... - def __gt__(self, other): ... - def union(self, iterable): ... - def __or__(self, other): ... - def update(self, iterable): ... - def __ior__(self, other): ... - def difference(self, iterable): ... - def __sub__(self, other): ... - def difference_update(self, iterable): ... - def __isub__(self, other): ... - def intersection(self, iterable): ... - def __and__(self, other): ... - def intersection_update(self, iterable): ... - def __iand__(self, other): ... - def symmetric_difference(self, iterable): ... - def __xor__(self, other): ... - def symmetric_difference_update(self, iterable): ... - def __ixor__(self, other): ... - def copy(self): ... - __copy__ = ... # type: Any - def __len__(self): ... - def __iter__(self): ... - def __hash__(self): ... - -class WeakSequence: - def __init__(self, __elements=...): ... - def append(self, item): ... - def __len__(self): ... - def __iter__(self): ... - def __getitem__(self, index): ... - -class OrderedIdentitySet(IdentitySet): - class _working_set(OrderedSet): - __sa_hash_exempt__ = ... # type: Any - def __init__(self, iterable=None): ... - -class PopulateDict(dict): - creator = ... # type: Any - def __init__(self, creator): ... - def __missing__(self, key): ... - -column_set = ... # type: Any -column_dict = ... # type: Any -ordered_column_set = ... # type: Any -populate_column_dict = ... # type: Any - -def unique_list(seq, hashfunc=None): ... - -class UniqueAppender: - data = ... # type: Any - def __init__(self, data, via=None): ... - def append(self, item): ... - def __iter__(self): ... - -def coerce_generator_arg(arg): ... -def to_list(x, default=None): ... -def has_intersection(set_, iterable): ... -def to_set(x): ... -def to_column_set(x): ... -def update_copy(d, _new=None, **kw): ... -def flatten_iterator(x): ... - -class LRUCache(dict): - capacity = ... # type: Any - threshold = ... # type: Any - def __init__(self, capacity=100, threshold=0.0): ... - def get(self, key, default=None): ... - def __getitem__(self, key): ... - def values(self): ... - def setdefault(self, key, value): ... - def __setitem__(self, key, value): ... - -def lightweight_named_tuple(name, fields): ... - -class ScopedRegistry: - createfunc = ... # type: Any - scopefunc = ... # type: Any - registry = ... # type: Any - def __init__(self, createfunc, scopefunc): ... - def __call__(self): ... - def has(self): ... - def set(self, obj): ... - def clear(self): ... - -class ThreadLocalRegistry(ScopedRegistry): - createfunc = ... # type: Any - registry = ... # type: Any - def __init__(self, createfunc): ... - def __call__(self): ... - def has(self): ... - def set(self, obj): ... - def clear(self): ... diff --git a/stubs/third-party-2.7/sqlalchemy/util/compat.pyi b/stubs/third-party-2.7/sqlalchemy/util/compat.pyi deleted file mode 100644 index 297f0baa8d58..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/util/compat.pyi +++ /dev/null @@ -1,73 +0,0 @@ -# Stubs for sqlalchemy.util.compat (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from collections import namedtuple - -py33 = ... # type: Any -py32 = ... # type: Any -py3k = ... # type: Any -py2k = ... # type: Any -py265 = ... # type: Any -jython = ... # type: Any -pypy = ... # type: Any -win32 = ... # type: Any -cpython = ... # type: Any -next = ... # type: Any -safe_kwarg = ... # type: Any - -ArgSpec = namedtuple('ArgSpec', ['args', 'varargs', 'keywords', 'defaults']) - -def inspect_getargspec(func): ... - -string_types = ... # type: Any -binary_type = ... # type: Any -text_type = ... # type: Any -int_types = ... # type: Any -iterbytes = ... # type: Any - -def u(s): ... -def ue(s): ... -def b(s): ... - -callable = ... # type: Any - -def callable(fn): ... -def cmp(a, b): ... - -print_ = ... # type: Any -import_ = ... # type: Any -itertools_filterfalse = ... # type: Any -itertools_filter = ... # type: Any -itertools_imap = ... # type: Any - -def b64encode(x): ... -def b64decode(x): ... - -inspect_getargspec = ... # type: Any - -def iterbytes(buf): ... -def u(s): ... -def ue(s): ... -def b(s): ... -def import_(*args): ... - -cmp = ... # type: Any -reduce = ... # type: Any -b64encode = ... # type: Any -b64decode = ... # type: Any - -def print_(*args, **kwargs): ... - -time_func = ... # type: Any - -def reraise(tp, value, tb=None, cause=None): ... -def raise_from_cause(exception, exc_info=None): ... -def raise_from_cause(exception, exc_info=None): ... - -exec_ = ... # type: Any - -def exec_(func_text, globals_, lcl=None): ... -def with_metaclass(meta, *bases): ... -def nested(*managers): ... diff --git a/stubs/third-party-2.7/sqlalchemy/util/deprecations.pyi b/stubs/third-party-2.7/sqlalchemy/util/deprecations.pyi deleted file mode 100644 index 5fec7fee3942..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/util/deprecations.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for sqlalchemy.util.deprecations (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import langhelpers - -decorator = langhelpers.decorator - -def warn_deprecated(msg, stacklevel=3): ... -def warn_pending_deprecation(msg, stacklevel=3): ... -def deprecated(version, message=None, add_deprecation_to_docstring=True): ... -def pending_deprecation(version, message=None, add_deprecation_to_docstring=True): ... -def inject_docstring_text(doctext, injecttext, pos): ... diff --git a/stubs/third-party-2.7/sqlalchemy/util/langhelpers.pyi b/stubs/third-party-2.7/sqlalchemy/util/langhelpers.pyi deleted file mode 100644 index bf039879491f..000000000000 --- a/stubs/third-party-2.7/sqlalchemy/util/langhelpers.pyi +++ /dev/null @@ -1,137 +0,0 @@ -# Stubs for sqlalchemy.util.langhelpers (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import compat - -def md5_hex(x): ... - -class safe_reraise: - def __enter__(self): ... - def __exit__(self, type_, value, traceback): ... - -def decode_slice(slc): ... -def map_bits(fn, n): ... -def decorator(target): ... -def public_factory(target, location): ... - -class PluginLoader: - group = ... # type: Any - impls = ... # type: Any - auto_fn = ... # type: Any - def __init__(self, group, auto_fn=None): ... - def load(self, name): ... - def register(self, name, modulepath, objname): ... - -def get_cls_kwargs(cls, _set=None): ... -def inspect_func_args(fn): ... -def inspect_func_args(fn): ... -def get_func_kwargs(func): ... -def get_callable_argspec(fn, no_self=False, _is_init=False): ... -def format_argspec_plus(fn, grouped=True): ... -def format_argspec_init(method, grouped=True): ... -def getargspec_init(method): ... -def unbound_method_to_callable(func_or_cls): ... -def generic_repr(obj, additional_kw=..., to_inspect=None, omit_kwarg=...): ... - -class portable_instancemethod: - target = ... # type: Any - name = ... # type: Any - def __init__(self, meth): ... - def __call__(self, *arg, **kw): ... - -def class_hierarchy(cls): ... -def iterate_attributes(cls): ... -def monkeypatch_proxied_specials(into_cls, from_cls, skip=None, only=None, name='', from_instance=None): ... -def methods_equivalent(meth1, meth2): ... -def as_interface(obj, cls=None, methods=None, required=None): ... - -class memoized_property: - fget = ... # type: Any - __doc__ = ... # type: Any - __name__ = ... # type: Any - def __init__(self, fget, doc=None): ... - def __get__(self, obj, cls): ... - @classmethod - def reset(cls, obj, name): ... - -def memoized_instancemethod(fn): ... - -class group_expirable_memoized_property: - attributes = ... # type: Any - def __init__(self, attributes=...): ... - def expire_instance(self, instance): ... - def __call__(self, fn): ... - def method(self, fn): ... - -class MemoizedSlots: - def __getattr__(self, key): ... - -def dependency_for(modulename): ... - -class dependencies: - import_deps = ... # type: Any - def __init__(self, *deps): ... - def __call__(self, fn): ... - @classmethod - def resolve_all(cls, path): ... - class _importlater: - def __new__(cls, path, addtl): ... - def __init__(self, path, addtl): ... - def module(self): ... - def __getattr__(self, key): ... - -def asbool(obj): ... -def bool_or_str(*text): ... -def asint(value): ... -def coerce_kw_type(kw, key, type_, flexi_bool=True): ... -def constructor_copy(obj, cls, *args, **kw): ... -def counter(): ... -def duck_type_collection(specimen, default=None): ... -def assert_arg_type(arg, argtype, name): ... -def dictlike_iteritems(dictlike): ... - -class classproperty(property): - __doc__ = ... # type: Any - def __init__(self, fget, *arg, **kw): ... - def __get__(desc, self, cls): ... - -class hybridproperty: - func = ... # type: Any - def __init__(self, func): ... - def __get__(self, instance, owner): ... - -class hybridmethod: - func = ... # type: Any - def __init__(self, func): ... - def __get__(self, instance, owner): ... - -class _symbol(int): - def __new__(self, name, doc=None, canonical=None): ... - def __reduce__(self): ... - -class symbol: - symbols = ... # type: Any - def __new__(cls, name, doc=None, canonical=None): ... - -def set_creation_order(instance): ... -def warn_exception(func, *args, **kwargs): ... -def ellipses_string(value, len_=25): ... - -class _hash_limit_string(compat.text_type): - def __new__(cls, value, num, args): ... - def __hash__(self): ... - def __eq__(self, other): ... - -def warn(msg): ... -def warn_limited(msg, args): ... -def only_once(fn): ... -def chop_traceback(tb, exclude_prefix=..., exclude_suffix=...): ... - -NoneType = ... # type: Any - -def attrsetter(attrname): ... - -class EnsureKWArgType(type): - def __init__(cls, clsname, bases, clsdict): ... diff --git a/stubs/third-party-2.7/thrift/Thrift.pyi b/stubs/third-party-2.7/thrift/Thrift.pyi deleted file mode 100644 index 409b3fe19b14..000000000000 --- a/stubs/third-party-2.7/thrift/Thrift.pyi +++ /dev/null @@ -1,55 +0,0 @@ -# Stubs for thrift.Thrift (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class TType: - STOP = ... # type: Any - VOID = ... # type: Any - BOOL = ... # type: Any - BYTE = ... # type: Any - I08 = ... # type: Any - DOUBLE = ... # type: Any - I16 = ... # type: Any - I32 = ... # type: Any - I64 = ... # type: Any - STRING = ... # type: Any - UTF7 = ... # type: Any - STRUCT = ... # type: Any - MAP = ... # type: Any - SET = ... # type: Any - LIST = ... # type: Any - UTF8 = ... # type: Any - UTF16 = ... # type: Any - -class TMessageType: - CALL = ... # type: Any - REPLY = ... # type: Any - EXCEPTION = ... # type: Any - ONEWAY = ... # type: Any - -class TProcessor: - def process(iprot, oprot): ... - -class TException(Exception): - message = ... # type: Any - def __init__(self, message=None): ... - -class TApplicationException(TException): - UNKNOWN = ... # type: Any - UNKNOWN_METHOD = ... # type: Any - INVALID_MESSAGE_TYPE = ... # type: Any - WRONG_METHOD_NAME = ... # type: Any - BAD_SEQUENCE_ID = ... # type: Any - MISSING_RESULT = ... # type: Any - INTERNAL_ERROR = ... # type: Any - PROTOCOL_ERROR = ... # type: Any - INVALID_TRANSFORM = ... # type: Any - INVALID_PROTOCOL = ... # type: Any - UNSUPPORTED_CLIENT_TYPE = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=None): ... - message = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... diff --git a/stubs/third-party-2.7/thrift/__init__.pyi b/stubs/third-party-2.7/thrift/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/thrift/protocol/TBinaryProtocol.pyi b/stubs/third-party-2.7/thrift/protocol/TBinaryProtocol.pyi deleted file mode 100644 index 09a98f602464..000000000000 --- a/stubs/third-party-2.7/thrift/protocol/TBinaryProtocol.pyi +++ /dev/null @@ -1,63 +0,0 @@ -# Stubs for thrift.protocol.TBinaryProtocol (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .TProtocol import * - -class TBinaryProtocol(TProtocolBase): - VERSION_MASK = ... # type: Any - VERSION_1 = ... # type: Any - TYPE_MASK = ... # type: Any - strictRead = ... # type: Any - strictWrite = ... # type: Any - def __init__(self, trans, strictRead=False, strictWrite=True): ... - def writeMessageBegin(self, name, type, seqid): ... - def writeMessageEnd(self): ... - def writeStructBegin(self, name): ... - def writeStructEnd(self): ... - def writeFieldBegin(self, name, type, id): ... - def writeFieldEnd(self): ... - def writeFieldStop(self): ... - def writeMapBegin(self, ktype, vtype, size): ... - def writeMapEnd(self): ... - def writeListBegin(self, etype, size): ... - def writeListEnd(self): ... - def writeSetBegin(self, etype, size): ... - def writeSetEnd(self): ... - def writeBool(self, bool): ... - def writeByte(self, byte): ... - def writeI16(self, i16): ... - def writeI32(self, i32): ... - def writeI64(self, i64): ... - def writeDouble(self, dub): ... - def writeString(self, str): ... - def readMessageBegin(self): ... - def readMessageEnd(self): ... - def readStructBegin(self): ... - def readStructEnd(self): ... - def readFieldBegin(self): ... - def readFieldEnd(self): ... - def readMapBegin(self): ... - def readMapEnd(self): ... - def readListBegin(self): ... - def readListEnd(self): ... - def readSetBegin(self): ... - def readSetEnd(self): ... - def readBool(self): ... - def readByte(self): ... - def readI16(self): ... - def readI32(self): ... - def readI64(self): ... - def readDouble(self): ... - def readString(self): ... - -class TBinaryProtocolFactory: - strictRead = ... # type: Any - strictWrite = ... # type: Any - def __init__(self, strictRead=False, strictWrite=True): ... - def getProtocol(self, trans): ... - -class TBinaryProtocolAccelerated(TBinaryProtocol): ... - -class TBinaryProtocolAcceleratedFactory: - def getProtocol(self, trans): ... diff --git a/stubs/third-party-2.7/thrift/protocol/TProtocol.pyi b/stubs/third-party-2.7/thrift/protocol/TProtocol.pyi deleted file mode 100644 index 0a52f565627f..000000000000 --- a/stubs/third-party-2.7/thrift/protocol/TProtocol.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# Stubs for thrift.protocol.TProtocol (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from thrift.Thrift import * - -class TProtocolException(TException): - UNKNOWN = ... # type: Any - INVALID_DATA = ... # type: Any - NEGATIVE_SIZE = ... # type: Any - SIZE_LIMIT = ... # type: Any - BAD_VERSION = ... # type: Any - NOT_IMPLEMENTED = ... # type: Any - DEPTH_LIMIT = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=None): ... - -class TProtocolBase: - trans = ... # type: Any - def __init__(self, trans): ... - def writeMessageBegin(self, name, ttype, seqid): ... - def writeMessageEnd(self): ... - def writeStructBegin(self, name): ... - def writeStructEnd(self): ... - def writeFieldBegin(self, name, ttype, fid): ... - def writeFieldEnd(self): ... - def writeFieldStop(self): ... - def writeMapBegin(self, ktype, vtype, size): ... - def writeMapEnd(self): ... - def writeListBegin(self, etype, size): ... - def writeListEnd(self): ... - def writeSetBegin(self, etype, size): ... - def writeSetEnd(self): ... - def writeBool(self, bool_val): ... - def writeByte(self, byte): ... - def writeI16(self, i16): ... - def writeI32(self, i32): ... - def writeI64(self, i64): ... - def writeDouble(self, dub): ... - def writeString(self, str_val): ... - def readMessageBegin(self): ... - def readMessageEnd(self): ... - def readStructBegin(self): ... - def readStructEnd(self): ... - def readFieldBegin(self): ... - def readFieldEnd(self): ... - def readMapBegin(self): ... - def readMapEnd(self): ... - def readListBegin(self): ... - def readListEnd(self): ... - def readSetBegin(self): ... - def readSetEnd(self): ... - def readBool(self): ... - def readByte(self): ... - def readI16(self): ... - def readI32(self): ... - def readI64(self): ... - def readDouble(self): ... - def readString(self): ... - def skip(self, ttype): ... - def readFieldByTType(self, ttype, spec): ... - def readContainerList(self, spec): ... - def readContainerSet(self, spec): ... - def readContainerStruct(self, spec): ... - def readContainerMap(self, spec): ... - def readStruct(self, obj, thrift_spec): ... - def writeContainerStruct(self, val, spec): ... - def writeContainerList(self, val, spec): ... - def writeContainerSet(self, val, spec): ... - def writeContainerMap(self, val, spec): ... - def writeStruct(self, obj, thrift_spec): ... - def writeFieldByTType(self, ttype, val, spec): ... - -def checkIntegerLimits(i, bits): ... - -class TProtocolFactory: - def getProtocol(self, trans): ... diff --git a/stubs/third-party-2.7/thrift/protocol/__init__.pyi b/stubs/third-party-2.7/thrift/protocol/__init__.pyi deleted file mode 100644 index f98118b70cab..000000000000 --- a/stubs/third-party-2.7/thrift/protocol/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for thrift.protocol (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# Names in __all__ with no definition: -# TBase -# TBinaryProtocol -# TCompactProtocol -# TJSONProtocol -# TProtocol -# fastbinary diff --git a/stubs/third-party-2.7/thrift/transport/TSocket.pyi b/stubs/third-party-2.7/thrift/transport/TSocket.pyi deleted file mode 100644 index 3e2b793dc302..000000000000 --- a/stubs/third-party-2.7/thrift/transport/TSocket.pyi +++ /dev/null @@ -1,30 +0,0 @@ -# Stubs for thrift.transport.TSocket (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .TTransport import * - -class TSocketBase(TTransportBase): - handle = ... # type: Any - def close(self): ... - -class TSocket(TSocketBase): - host = ... # type: Any - port = ... # type: Any - handle = ... # type: Any - def __init__(self, host='', port=9090, unix_socket=None, socket_family=...): ... - def setHandle(self, h): ... - def isOpen(self): ... - def setTimeout(self, ms): ... - def open(self): ... - def read(self, sz): ... - def write(self, buff): ... - def flush(self): ... - -class TServerSocket(TSocketBase, TServerTransportBase): - host = ... # type: Any - port = ... # type: Any - handle = ... # type: Any - def __init__(self, host=None, port=9090, unix_socket=None, socket_family=...): ... - def listen(self): ... - def accept(self): ... diff --git a/stubs/third-party-2.7/thrift/transport/TTransport.pyi b/stubs/third-party-2.7/thrift/transport/TTransport.pyi deleted file mode 100644 index 721a1c0fba60..000000000000 --- a/stubs/third-party-2.7/thrift/transport/TTransport.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# Stubs for thrift.transport.TTransport (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from thrift.Thrift import TException - -class TTransportException(TException): - UNKNOWN = ... # type: Any - NOT_OPEN = ... # type: Any - ALREADY_OPEN = ... # type: Any - TIMED_OUT = ... # type: Any - END_OF_FILE = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=None): ... - -class TTransportBase: - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def readAll(self, sz): ... - def write(self, buf): ... - def flush(self): ... - -class CReadableTransport: - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TServerTransportBase: - def listen(self): ... - def accept(self): ... - def close(self): ... - -class TTransportFactoryBase: - def getTransport(self, trans): ... - -class TBufferedTransportFactory: - def getTransport(self, trans): ... - -class TBufferedTransport(TTransportBase, CReadableTransport): - DEFAULT_BUFFER = ... # type: Any - def __init__(self, trans, rbuf_size=...): ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TMemoryBuffer(TTransportBase, CReadableTransport): - def __init__(self, value=None): ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - def getvalue(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TFramedTransportFactory: - def getTransport(self, trans): ... - -class TFramedTransport(TTransportBase, CReadableTransport): - def __init__(self, trans): ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def readFrame(self): ... - def write(self, buf): ... - def flush(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, prefix, reqlen): ... - -class TFileObjectTransport(TTransportBase): - fileobj = ... # type: Any - def __init__(self, fileobj): ... - def isOpen(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - -class TSaslClientTransport(TTransportBase, CReadableTransport): - START = ... # type: Any - OK = ... # type: Any - BAD = ... # type: Any - ERROR = ... # type: Any - COMPLETE = ... # type: Any - transport = ... # type: Any - sasl = ... # type: Any - def __init__(self, transport, host, service, mechanism='', **sasl_kwargs): ... - def open(self): ... - def send_sasl_msg(self, status, body): ... - def recv_sasl_msg(self): ... - def write(self, data): ... - def flush(self): ... - def read(self, sz): ... - def close(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, prefix, reqlen): ... diff --git a/stubs/third-party-2.7/thrift/transport/__init__.pyi b/stubs/third-party-2.7/thrift/transport/__init__.pyi deleted file mode 100644 index ce02c619474f..000000000000 --- a/stubs/third-party-2.7/thrift/transport/__init__.pyi +++ /dev/null @@ -1,9 +0,0 @@ -# Stubs for thrift.transport (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -# Names in __all__ with no definition: -# THttpClient -# TSocket -# TTransport -# TZlibTransport diff --git a/stubs/third-party-2.7/tornado/__init__.pyi b/stubs/third-party-2.7/tornado/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/stubs/third-party-2.7/tornado/concurrent.pyi b/stubs/third-party-2.7/tornado/concurrent.pyi deleted file mode 100644 index def15a987308..000000000000 --- a/stubs/third-party-2.7/tornado/concurrent.pyi +++ /dev/null @@ -1,47 +0,0 @@ -# Stubs for tornado.concurrent (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -futures = ... # type: Any - -class ReturnValueIgnoredError(Exception): ... - -class _TracebackLogger: - exc_info = ... # type: Any - formatted_tb = ... # type: Any - def __init__(self, exc_info): ... - def activate(self): ... - def clear(self): ... - def __del__(self): ... - -class Future: - def __init__(self): ... - def cancel(self): ... - def cancelled(self): ... - def running(self): ... - def done(self): ... - def result(self, timeout=None): ... - def exception(self, timeout=None): ... - def add_done_callback(self, fn): ... - def set_result(self, result): ... - def set_exception(self, exception): ... - def exc_info(self): ... - def set_exc_info(self, exc_info): ... - def __del__(self): ... - -TracebackFuture = ... # type: Any -FUTURES = ... # type: Any - -def is_future(x): ... - -class DummyExecutor: - def submit(self, fn, *args, **kwargs): ... - def shutdown(self, wait=True): ... - -dummy_executor = ... # type: Any - -def run_on_executor(*args, **kwargs): ... -def return_future(f): ... -def chain_future(a, b): ... diff --git a/stubs/third-party-2.7/tornado/gen.pyi b/stubs/third-party-2.7/tornado/gen.pyi deleted file mode 100644 index 4d812397c86d..000000000000 --- a/stubs/third-party-2.7/tornado/gen.pyi +++ /dev/null @@ -1,113 +0,0 @@ -# Stubs for tornado.gen (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from collections import namedtuple - -singledispatch = ... # type: Any - -class KeyReuseError(Exception): ... -class UnknownKeyError(Exception): ... -class LeakedCallbackError(Exception): ... -class BadYieldError(Exception): ... -class ReturnValueIgnoredError(Exception): ... -class TimeoutError(Exception): ... - -def engine(func): ... -def coroutine(func, replace_callback=True): ... - -class Return(Exception): - value = ... # type: Any - def __init__(self, value=None): ... - -class WaitIterator: - current_index = ... # type: Any - def __init__(self, *args, **kwargs): ... - def done(self): ... - def next(self): ... - -class YieldPoint: - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -class Callback(YieldPoint): - key = ... # type: Any - def __init__(self, key): ... - runner = ... # type: Any - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -class Wait(YieldPoint): - key = ... # type: Any - def __init__(self, key): ... - runner = ... # type: Any - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -class WaitAll(YieldPoint): - keys = ... # type: Any - def __init__(self, keys): ... - runner = ... # type: Any - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -def Task(func, *args, **kwargs): ... - -class YieldFuture(YieldPoint): - future = ... # type: Any - io_loop = ... # type: Any - def __init__(self, future, io_loop=None): ... - runner = ... # type: Any - key = ... # type: Any - result_fn = ... # type: Any - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -class Multi(YieldPoint): - keys = ... # type: Any - children = ... # type: Any - unfinished_children = ... # type: Any - quiet_exceptions = ... # type: Any - def __init__(self, children, quiet_exceptions=...): ... - def start(self, runner): ... - def is_ready(self): ... - def get_result(self): ... - -def multi_future(children, quiet_exceptions=...): ... -def maybe_future(x): ... -def with_timeout(timeout, future, io_loop=None, quiet_exceptions=...): ... -def sleep(duration): ... - -moment = ... # type: Any - -class Runner: - gen = ... # type: Any - result_future = ... # type: Any - future = ... # type: Any - yield_point = ... # type: Any - pending_callbacks = ... # type: Any - results = ... # type: Any - running = ... # type: Any - finished = ... # type: Any - had_exception = ... # type: Any - io_loop = ... # type: Any - stack_context_deactivate = ... # type: Any - def __init__(self, gen, result_future, first_yielded): ... - def register_callback(self, key): ... - def is_ready(self, key): ... - def set_result(self, key, result): ... - def pop_result(self, key): ... - def run(self): ... - def handle_yield(self, yielded): ... - def result_callback(self, key): ... - def handle_exception(self, typ, value, tb): ... - -Arguments = namedtuple('Arguments', ['args', 'kwargs']) - -def convert_yielded(yielded): ... diff --git a/stubs/third-party-2.7/tornado/httpclient.pyi b/stubs/third-party-2.7/tornado/httpclient.pyi deleted file mode 100644 index 7c29ac69ef09..000000000000 --- a/stubs/third-party-2.7/tornado/httpclient.pyi +++ /dev/null @@ -1,112 +0,0 @@ -# Stubs for tornado.httpclient (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado.util import Configurable - -class HTTPClient: - def __init__(self, async_client_class=None, **kwargs): ... - def __del__(self): ... - def close(self): ... - def fetch(self, request, **kwargs): ... - -class AsyncHTTPClient(Configurable): - @classmethod - def configurable_base(cls): ... - @classmethod - def configurable_default(cls): ... - def __new__(cls, io_loop=None, force_instance=False, **kwargs): ... - io_loop = ... # type: Any - defaults = ... # type: Any - def initialize(self, io_loop, defaults=None): ... - def close(self): ... - def fetch(self, request, callback=None, raise_error=True, **kwargs): ... - def fetch_impl(self, request, callback): ... - @classmethod - def configure(cls, impl, **kwargs): ... - -class HTTPRequest: - headers = ... # type: Any - proxy_host = ... # type: Any - proxy_port = ... # type: Any - proxy_username = ... # type: Any - proxy_password = ... # type: Any - url = ... # type: Any - method = ... # type: Any - body = ... # type: Any - body_producer = ... # type: Any - auth_username = ... # type: Any - auth_password = ... # type: Any - auth_mode = ... # type: Any - connect_timeout = ... # type: Any - request_timeout = ... # type: Any - follow_redirects = ... # type: Any - max_redirects = ... # type: Any - user_agent = ... # type: Any - decompress_response = ... # type: Any - network_interface = ... # type: Any - streaming_callback = ... # type: Any - header_callback = ... # type: Any - prepare_curl_callback = ... # type: Any - allow_nonstandard_methods = ... # type: Any - validate_cert = ... # type: Any - ca_certs = ... # type: Any - allow_ipv6 = ... # type: Any - client_key = ... # type: Any - client_cert = ... # type: Any - ssl_options = ... # type: Any - expect_100_continue = ... # type: Any - start_time = ... # type: Any - def __init__(self, url, method='', headers=None, body=None, auth_username=None, auth_password=None, auth_mode=None, connect_timeout=None, request_timeout=None, if_modified_since=None, follow_redirects=None, max_redirects=None, user_agent=None, use_gzip=None, network_interface=None, streaming_callback=None, header_callback=None, prepare_curl_callback=None, proxy_host=None, proxy_port=None, proxy_username=None, proxy_password=None, allow_nonstandard_methods=None, validate_cert=None, ca_certs=None, allow_ipv6=None, client_key=None, client_cert=None, body_producer=None, expect_100_continue=False, decompress_response=None, ssl_options=None): ... - @property - def headers(self): ... - @headers.setter - def headers(self, value): ... - @property - def body(self): ... - @body.setter - def body(self, value): ... - @property - def body_producer(self): ... - @body_producer.setter - def body_producer(self, value): ... - @property - def streaming_callback(self): ... - @streaming_callback.setter - def streaming_callback(self, value): ... - @property - def header_callback(self): ... - @header_callback.setter - def header_callback(self, value): ... - @property - def prepare_curl_callback(self): ... - @prepare_curl_callback.setter - def prepare_curl_callback(self, value): ... - -class HTTPResponse: - request = ... # type: Any - code = ... # type: Any - reason = ... # type: Any - headers = ... # type: Any - buffer = ... # type: Any - effective_url = ... # type: Any - error = ... # type: Any - request_time = ... # type: Any - time_info = ... # type: Any - def __init__(self, request, code, headers=None, buffer=None, effective_url=None, error=None, request_time=None, time_info=None, reason=None): ... - body = ... # type: Any - def rethrow(self): ... - -class HTTPError(Exception): - code = ... # type: Any - response = ... # type: Any - def __init__(self, code, message=None, response=None): ... - -class _RequestProxy: - request = ... # type: Any - defaults = ... # type: Any - def __init__(self, request, defaults): ... - def __getattr__(self, name): ... - -def main(): ... diff --git a/stubs/third-party-2.7/tornado/httpserver.pyi b/stubs/third-party-2.7/tornado/httpserver.pyi deleted file mode 100644 index 10eec073f1dc..000000000000 --- a/stubs/third-party-2.7/tornado/httpserver.pyi +++ /dev/null @@ -1,45 +0,0 @@ -# Stubs for tornado.httpserver (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado import httputil -from tornado.tcpserver import TCPServer -from tornado.util import Configurable - -class HTTPServer(TCPServer, Configurable, httputil.HTTPServerConnectionDelegate): - def __init__(self, *args, **kwargs): ... - request_callback = ... # type: Any - no_keep_alive = ... # type: Any - xheaders = ... # type: Any - protocol = ... # type: Any - conn_params = ... # type: Any - def initialize(self, request_callback, no_keep_alive=False, io_loop=None, xheaders=False, ssl_options=None, protocol=None, decompress_request=False, chunk_size=None, max_header_size=None, idle_connection_timeout=None, body_timeout=None, max_body_size=None, max_buffer_size=None): ... - @classmethod - def configurable_base(cls): ... - @classmethod - def configurable_default(cls): ... - def close_all_connections(self): ... - def handle_stream(self, stream, address): ... - def start_request(self, server_conn, request_conn): ... - def on_close(self, server_conn): ... - -class _HTTPRequestContext: - address = ... # type: Any - protocol = ... # type: Any - address_family = ... # type: Any - remote_ip = ... # type: Any - def __init__(self, stream, address, protocol): ... - -class _ServerRequestAdapter(httputil.HTTPMessageDelegate): - server = ... # type: Any - connection = ... # type: Any - request = ... # type: Any - delegate = ... # type: Any - def __init__(self, server, server_conn, request_conn): ... - def headers_received(self, start_line, headers): ... - def data_received(self, chunk): ... - def finish(self): ... - def on_connection_close(self): ... - -HTTPRequest = ... # type: Any diff --git a/stubs/third-party-2.7/tornado/httputil.pyi b/stubs/third-party-2.7/tornado/httputil.pyi deleted file mode 100644 index f513edfa41a0..000000000000 --- a/stubs/third-party-2.7/tornado/httputil.pyi +++ /dev/null @@ -1,93 +0,0 @@ -# Stubs for tornado.httputil (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado.util import ObjectDict -from collections import namedtuple - -class SSLError(Exception): ... - -class _NormalizedHeaderCache(dict): - size = ... # type: Any - queue = ... # type: Any - def __init__(self, size): ... - def __missing__(self, key): ... - -class HTTPHeaders(dict): - def __init__(self, *args, **kwargs): ... - def add(self, name, value): ... - def get_list(self, name): ... - def get_all(self): ... - def parse_line(self, line): ... - @classmethod - def parse(cls, headers): ... - def __setitem__(self, name, value): ... - def __getitem__(self, name): ... - def __delitem__(self, name): ... - def __contains__(self, name): ... - def get(self, name, default=None): ... - def update(self, *args, **kwargs): ... - def copy(self): ... - __copy__ = ... # type: Any - def __deepcopy__(self, memo_dict): ... - -class HTTPServerRequest: - method = ... # type: Any - uri = ... # type: Any - version = ... # type: Any - headers = ... # type: Any - body = ... # type: Any - remote_ip = ... # type: Any - protocol = ... # type: Any - host = ... # type: Any - files = ... # type: Any - connection = ... # type: Any - arguments = ... # type: Any - query_arguments = ... # type: Any - body_arguments = ... # type: Any - def __init__(self, method=None, uri=None, version='', headers=None, body=None, host=None, files=None, connection=None, start_line=None): ... - def supports_http_1_1(self): ... - @property - def cookies(self): ... - def write(self, chunk, callback=None): ... - def finish(self): ... - def full_url(self): ... - def request_time(self): ... - def get_ssl_certificate(self, binary_form=False): ... - -class HTTPInputError(Exception): ... -class HTTPOutputError(Exception): ... - -class HTTPServerConnectionDelegate: - def start_request(self, server_conn, request_conn): ... - def on_close(self, server_conn): ... - -class HTTPMessageDelegate: - def headers_received(self, start_line, headers): ... - def data_received(self, chunk): ... - def finish(self): ... - def on_connection_close(self): ... - -class HTTPConnection: - def write_headers(self, start_line, headers, chunk=None, callback=None): ... - def write(self, chunk, callback=None): ... - def finish(self): ... - -def url_concat(url, args): ... - -class HTTPFile(ObjectDict): ... - -def parse_body_arguments(content_type, body, arguments, files, headers=None): ... -def parse_multipart_form_data(boundary, data, arguments, files): ... -def format_timestamp(ts): ... - -RequestStartLine = namedtuple('RequestStartLine', ['method', 'path', 'version']) - -def parse_request_start_line(line): ... - -ResponseStartLine = namedtuple('ResponseStartLine', ['version', 'code', 'reason']) - -def parse_response_start_line(line): ... -def doctests(): ... -def split_host_and_port(netloc): ... diff --git a/stubs/third-party-2.7/tornado/ioloop.pyi b/stubs/third-party-2.7/tornado/ioloop.pyi deleted file mode 100644 index c02f97dbfcda..000000000000 --- a/stubs/third-party-2.7/tornado/ioloop.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# Stubs for tornado.ioloop (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado.util import Configurable - -signal = ... # type: Any - -class TimeoutError(Exception): ... - -class IOLoop(Configurable): - NONE = ... # type: Any - READ = ... # type: Any - WRITE = ... # type: Any - ERROR = ... # type: Any - @staticmethod - def instance(): ... - @staticmethod - def initialized(): ... - def install(self): ... - @staticmethod - def clear_instance(): ... - @staticmethod - def current(instance=True): ... - def make_current(self): ... - @staticmethod - def clear_current(): ... - @classmethod - def configurable_base(cls): ... - @classmethod - def configurable_default(cls): ... - def initialize(self, make_current=None): ... - def close(self, all_fds=False): ... - def add_handler(self, fd, handler, events): ... - def update_handler(self, fd, events): ... - def remove_handler(self, fd): ... - def set_blocking_signal_threshold(self, seconds, action): ... - def set_blocking_log_threshold(self, seconds): ... - def log_stack(self, signal, frame): ... - def start(self): ... - def stop(self): ... - def run_sync(self, func, timeout=None): ... - def time(self): ... - def add_timeout(self, deadline, callback, *args, **kwargs): ... - def call_later(self, delay, callback, *args, **kwargs): ... - def call_at(self, when, callback, *args, **kwargs): ... - def remove_timeout(self, timeout): ... - def add_callback(self, callback, *args, **kwargs): ... - def add_callback_from_signal(self, callback, *args, **kwargs): ... - def spawn_callback(self, callback, *args, **kwargs): ... - def add_future(self, future, callback): ... - def handle_callback_exception(self, callback): ... - def split_fd(self, fd): ... - def close_fd(self, fd): ... - -class PollIOLoop(IOLoop): - time_func = ... # type: Any - def initialize(self, impl, time_func=None, **kwargs): ... - def close(self, all_fds=False): ... - def add_handler(self, fd, handler, events): ... - def update_handler(self, fd, events): ... - def remove_handler(self, fd): ... - def set_blocking_signal_threshold(self, seconds, action): ... - def start(self): ... - def stop(self): ... - def time(self): ... - def call_at(self, deadline, callback, *args, **kwargs): ... - def remove_timeout(self, timeout): ... - def add_callback(self, callback, *args, **kwargs): ... - def add_callback_from_signal(self, callback, *args, **kwargs): ... - -class _Timeout: - deadline = ... # type: Any - callback = ... # type: Any - tiebreaker = ... # type: Any - def __init__(self, deadline, callback, io_loop): ... - def __lt__(self, other): ... - def __le__(self, other): ... - -class PeriodicCallback: - callback = ... # type: Any - callback_time = ... # type: Any - io_loop = ... # type: Any - def __init__(self, callback, callback_time, io_loop=None): ... - def start(self): ... - def stop(self): ... - def is_running(self): ... diff --git a/stubs/third-party-2.7/tornado/netutil.pyi b/stubs/third-party-2.7/tornado/netutil.pyi deleted file mode 100644 index ecea9227160b..000000000000 --- a/stubs/third-party-2.7/tornado/netutil.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# Stubs for tornado.netutil (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado.util import Configurable - -ssl = ... # type: Any -certifi = ... # type: Any -xrange = ... # type: Any -ssl_match_hostname = ... # type: Any -SSLCertificateError = ... # type: Any - -def bind_sockets(port, address=None, family=..., backlog=..., flags=None): ... -def bind_unix_socket(file, mode=384, backlog=...): ... -def add_accept_handler(sock, callback, io_loop=None): ... -def is_valid_ip(ip): ... - -class Resolver(Configurable): - @classmethod - def configurable_base(cls): ... - @classmethod - def configurable_default(cls): ... - def resolve(self, host, port, family=..., callback=None): ... - def close(self): ... - -class ExecutorResolver(Resolver): - io_loop = ... # type: Any - executor = ... # type: Any - close_executor = ... # type: Any - def initialize(self, io_loop=None, executor=None, close_executor=True): ... - def close(self): ... - def resolve(self, host, port, family=...): ... - -class BlockingResolver(ExecutorResolver): - def initialize(self, io_loop=None): ... - -class ThreadedResolver(ExecutorResolver): - def initialize(self, io_loop=None, num_threads=10): ... - -class OverrideResolver(Resolver): - resolver = ... # type: Any - mapping = ... # type: Any - def initialize(self, resolver, mapping): ... - def close(self): ... - def resolve(self, host, port, *args, **kwargs): ... - -def ssl_options_to_context(ssl_options): ... -def ssl_wrap_socket(socket, ssl_options, server_hostname=None, **kwargs): ... diff --git a/stubs/third-party-2.7/tornado/tcpserver.pyi b/stubs/third-party-2.7/tornado/tcpserver.pyi deleted file mode 100644 index 14f8be4b5e25..000000000000 --- a/stubs/third-party-2.7/tornado/tcpserver.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for tornado.tcpserver (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -ssl = ... # type: Any - -class TCPServer: - io_loop = ... # type: Any - ssl_options = ... # type: Any - max_buffer_size = ... # type: Any - read_chunk_size = ... # type: Any - def __init__(self, io_loop=None, ssl_options=None, max_buffer_size=None, read_chunk_size=None): ... - def listen(self, port, address=''): ... - def add_sockets(self, sockets): ... - def add_socket(self, socket): ... - def bind(self, port, address=None, family=..., backlog=128): ... - def start(self, num_processes=1): ... - def stop(self): ... - def handle_stream(self, stream, address): ... diff --git a/stubs/third-party-2.7/tornado/util.pyi b/stubs/third-party-2.7/tornado/util.pyi deleted file mode 100644 index e20b44ea529f..000000000000 --- a/stubs/third-party-2.7/tornado/util.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# Stubs for tornado.util (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -xrange = ... # type: Any - -class ObjectDict(dict): - def __getattr__(self, name): ... - def __setattr__(self, name, value): ... - -class GzipDecompressor: - decompressobj = ... # type: Any - def __init__(self): ... - def decompress(self, value, max_length=None): ... - @property - def unconsumed_tail(self): ... - def flush(self): ... - -unicode_type = ... # type: Any -basestring_type = ... # type: Any - -def import_object(name): ... - -bytes_type = ... # type: Any - -def errno_from_exception(e): ... - -class Configurable: - def __new__(cls, *args, **kwargs): ... - @classmethod - def configurable_base(cls): ... - @classmethod - def configurable_default(cls): ... - def initialize(self): ... - @classmethod - def configure(cls, impl, **kwargs): ... - @classmethod - def configured_class(cls): ... - -class ArgReplacer: - name = ... # type: Any - arg_pos = ... # type: Any - def __init__(self, func, name): ... - def get_old_value(self, args, kwargs, default=None): ... - def replace(self, new_value, args, kwargs): ... - -def timedelta_to_seconds(td): ... -def doctests(): ... diff --git a/stubs/third-party-2.7/tornado/web.pyi b/stubs/third-party-2.7/tornado/web.pyi deleted file mode 100644 index 0ddbefa9be3e..000000000000 --- a/stubs/third-party-2.7/tornado/web.pyi +++ /dev/null @@ -1,261 +0,0 @@ -# Stubs for tornado.web (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from tornado import httputil - -MIN_SUPPORTED_SIGNED_VALUE_VERSION = ... # type: Any -MAX_SUPPORTED_SIGNED_VALUE_VERSION = ... # type: Any -DEFAULT_SIGNED_VALUE_VERSION = ... # type: Any -DEFAULT_SIGNED_VALUE_MIN_VERSION = ... # type: Any - -class RequestHandler: - SUPPORTED_METHODS = ... # type: Any - application = ... # type: Any - request = ... # type: Any - path_args = ... # type: Any - path_kwargs = ... # type: Any - ui = ... # type: Any - def __init__(self, application, request, **kwargs): ... - def initialize(self): ... - @property - def settings(self): ... - def head(self, *args, **kwargs): ... - def get(self, *args, **kwargs): ... - def post(self, *args, **kwargs): ... - def delete(self, *args, **kwargs): ... - def patch(self, *args, **kwargs): ... - def put(self, *args, **kwargs): ... - def options(self, *args, **kwargs): ... - def prepare(self): ... - def on_finish(self): ... - def on_connection_close(self): ... - def clear(self): ... - def set_default_headers(self): ... - def set_status(self, status_code, reason=None): ... - def get_status(self): ... - def set_header(self, name, value): ... - def add_header(self, name, value): ... - def clear_header(self, name): ... - def get_argument(self, name, default=..., strip=True): ... - def get_arguments(self, name, strip=True): ... - def get_body_argument(self, name, default=..., strip=True): ... - def get_body_arguments(self, name, strip=True): ... - def get_query_argument(self, name, default=..., strip=True): ... - def get_query_arguments(self, name, strip=True): ... - def decode_argument(self, value, name=None): ... - @property - def cookies(self): ... - def get_cookie(self, name, default=None): ... - def set_cookie(self, name, value, domain=None, expires=None, path='', expires_days=None, **kwargs): ... - def clear_cookie(self, name, path='', domain=None): ... - def clear_all_cookies(self, path='', domain=None): ... - def set_secure_cookie(self, name, value, expires_days=30, version=None, **kwargs): ... - def create_signed_value(self, name, value, version=None): ... - def get_secure_cookie(self, name, value=None, max_age_days=31, min_version=None): ... - def get_secure_cookie_key_version(self, name, value=None): ... - def redirect(self, url, permanent=False, status=None): ... - def write(self, chunk): ... - def render(self, template_name, **kwargs): ... - def render_string(self, template_name, **kwargs): ... - def get_template_namespace(self): ... - def create_template_loader(self, template_path): ... - def flush(self, include_footers=False, callback=None): ... - def finish(self, chunk=None): ... - def send_error(self, status_code=500, **kwargs): ... - def write_error(self, status_code, **kwargs): ... - @property - def locale(self): ... - @locale.setter - def locale(self, value): ... - def get_user_locale(self): ... - def get_browser_locale(self, default=''): ... - @property - def current_user(self): ... - @current_user.setter - def current_user(self, value): ... - def get_current_user(self): ... - def get_login_url(self): ... - def get_template_path(self): ... - @property - def xsrf_token(self): ... - def check_xsrf_cookie(self): ... - def xsrf_form_html(self): ... - def static_url(self, path, include_host=None, **kwargs): ... - def require_setting(self, name, feature=''): ... - def reverse_url(self, name, *args): ... - def compute_etag(self): ... - def set_etag_header(self): ... - def check_etag_header(self): ... - def data_received(self, chunk): ... - def log_exception(self, typ, value, tb): ... - -def asynchronous(method): ... -def stream_request_body(cls): ... -def removeslash(method): ... -def addslash(method): ... - -class Application(httputil.HTTPServerConnectionDelegate): - transforms = ... # type: Any - handlers = ... # type: Any - named_handlers = ... # type: Any - default_host = ... # type: Any - settings = ... # type: Any - ui_modules = ... # type: Any - ui_methods = ... # type: Any - def __init__(self, handlers=None, default_host='', transforms=None, **settings): ... - def listen(self, port, address='', **kwargs): ... - def add_handlers(self, host_pattern, host_handlers): ... - def add_transform(self, transform_class): ... - def start_request(self, server_conn, request_conn): ... - def __call__(self, request): ... - def reverse_url(self, name, *args): ... - def log_request(self, handler): ... - -class _RequestDispatcher(httputil.HTTPMessageDelegate): - application = ... # type: Any - connection = ... # type: Any - request = ... # type: Any - chunks = ... # type: Any - handler_class = ... # type: Any - handler_kwargs = ... # type: Any - path_args = ... # type: Any - path_kwargs = ... # type: Any - def __init__(self, application, connection): ... - def headers_received(self, start_line, headers): ... - stream_request_body = ... # type: Any - def set_request(self, request): ... - def data_received(self, data): ... - def finish(self): ... - def on_connection_close(self): ... - handler = ... # type: Any - def execute(self): ... - -class HTTPError(Exception): - status_code = ... # type: Any - log_message = ... # type: Any - args = ... # type: Any - reason = ... # type: Any - def __init__(self, status_code, log_message=None, *args, **kwargs): ... - -class Finish(Exception): ... - -class MissingArgumentError(HTTPError): - arg_name = ... # type: Any - def __init__(self, arg_name): ... - -class ErrorHandler(RequestHandler): - def initialize(self, status_code): ... - def prepare(self): ... - def check_xsrf_cookie(self): ... - -class RedirectHandler(RequestHandler): - def initialize(self, url, permanent=True): ... - def get(self): ... - -class StaticFileHandler(RequestHandler): - CACHE_MAX_AGE = ... # type: Any - root = ... # type: Any - default_filename = ... # type: Any - def initialize(self, path, default_filename=None): ... - @classmethod - def reset(cls): ... - def head(self, path): ... - path = ... # type: Any - absolute_path = ... # type: Any - modified = ... # type: Any - def get(self, path, include_body=True): ... - def compute_etag(self): ... - def set_headers(self): ... - def should_return_304(self): ... - @classmethod - def get_absolute_path(cls, root, path): ... - def validate_absolute_path(self, root, absolute_path): ... - @classmethod - def get_content(cls, abspath, start=None, end=None): ... - @classmethod - def get_content_version(cls, abspath): ... - def get_content_size(self): ... - def get_modified_time(self): ... - def get_content_type(self): ... - def set_extra_headers(self, path): ... - def get_cache_time(self, path, modified, mime_type): ... - @classmethod - def make_static_url(cls, settings, path, include_version=True): ... - def parse_url_path(self, url_path): ... - @classmethod - def get_version(cls, settings, path): ... - -class FallbackHandler(RequestHandler): - fallback = ... # type: Any - def initialize(self, fallback): ... - def prepare(self): ... - -class OutputTransform: - def __init__(self, request): ... - def transform_first_chunk(self, status_code, headers, chunk, finishing): ... - def transform_chunk(self, chunk, finishing): ... - -class GZipContentEncoding(OutputTransform): - CONTENT_TYPES = ... # type: Any - MIN_LENGTH = ... # type: Any - def __init__(self, request): ... - def transform_first_chunk(self, status_code, headers, chunk, finishing): ... - def transform_chunk(self, chunk, finishing): ... - -def authenticated(method): ... - -class UIModule: - handler = ... # type: Any - request = ... # type: Any - ui = ... # type: Any - locale = ... # type: Any - def __init__(self, handler): ... - @property - def current_user(self): ... - def render(self, *args, **kwargs): ... - def embedded_javascript(self): ... - def javascript_files(self): ... - def embedded_css(self): ... - def css_files(self): ... - def html_head(self): ... - def html_body(self): ... - def render_string(self, path, **kwargs): ... - -class _linkify(UIModule): - def render(self, text, **kwargs): ... - -class _xsrf_form_html(UIModule): - def render(self): ... - -class TemplateModule(UIModule): - def __init__(self, handler): ... - def render(self, path, **kwargs): ... - def embedded_javascript(self): ... - def javascript_files(self): ... - def embedded_css(self): ... - def css_files(self): ... - def html_head(self): ... - def html_body(self): ... - -class _UIModuleNamespace: - handler = ... # type: Any - ui_modules = ... # type: Any - def __init__(self, handler, ui_modules): ... - def __getitem__(self, key): ... - def __getattr__(self, key): ... - -class URLSpec: - regex = ... # type: Any - handler_class = ... # type: Any - kwargs = ... # type: Any - name = ... # type: Any - def __init__(self, pattern, handler, kwargs=None, name=None): ... - def reverse(self, *args): ... - -url = ... # type: Any - -def create_signed_value(secret, name, value, version=None, clock=None, key_version=None): ... -def decode_signed_value(secret, name, value, max_age_days=31, clock=None, min_version=None): ... -def get_signature_key_version(value): ... diff --git a/stubs/third-party-2.7/yaml/__init__.pyi b/stubs/third-party-2.7/yaml/__init__.pyi deleted file mode 100644 index c24c650a7bc4..000000000000 --- a/stubs/third-party-2.7/yaml/__init__.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for yaml (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -#from yaml.error import * -#from yaml.tokens import * -#from yaml.events import * -#from yaml.nodes import * -#from yaml.loader import * -#from yaml.dumper import * -# TODO: stubs for cyaml? -# from cyaml import * - -__with_libyaml__ = ... # type: Any - -def scan(stream, Loader=...): ... -def parse(stream, Loader=...): ... -def compose(stream, Loader=...): ... -def compose_all(stream, Loader=...): ... -def load(stream, Loader=...): ... -def load_all(stream, Loader=...): ... -def safe_load(stream): ... -def safe_load_all(stream): ... -def emit(events, stream=None, Dumper=..., canonical=None, indent=None, width=None, allow_unicode=None, line_break=None): ... -def serialize_all(nodes, stream=None, Dumper=..., canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding='', explicit_start=None, explicit_end=None, version=None, tags=None): ... -def serialize(node, stream=None, Dumper=..., **kwds): ... -def dump_all(documents, stream=None, Dumper=..., default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding='', explicit_start=None, explicit_end=None, version=None, tags=None): ... -def dump(data, stream=None, Dumper=..., **kwds): ... -def safe_dump_all(documents, stream=None, **kwds): ... -def safe_dump(data, stream=None, **kwds): ... -def add_implicit_resolver(tag, regexp, first=None, Loader=..., Dumper=...): ... -def add_path_resolver(tag, path, kind=None, Loader=..., Dumper=...): ... -def add_constructor(tag, constructor, Loader=...): ... -def add_multi_constructor(tag_prefix, multi_constructor, Loader=...): ... -def add_representer(data_type, representer, Dumper=...): ... -def add_multi_representer(data_type, multi_representer, Dumper=...): ... - -class YAMLObjectMetaclass(type): - def __init__(cls, name, bases, kwds): ... - -class YAMLObject: - __metaclass__ = ... # type: Any - yaml_loader = ... # type: Any - yaml_dumper = ... # type: Any - yaml_tag = ... # type: Any - yaml_flow_style = ... # type: Any - @classmethod - def from_yaml(cls, loader, node): ... - @classmethod - def to_yaml(cls, dumper, data): ... diff --git a/stubs/third-party-2.7/yaml/composer.pyi b/stubs/third-party-2.7/yaml/composer.pyi deleted file mode 100644 index 9c4b20d172e2..000000000000 --- a/stubs/third-party-2.7/yaml/composer.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for yaml.composer (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import Mark, YAMLError, MarkedYAMLError -from yaml.nodes import Node, ScalarNode, CollectionNode, SequenceNode, MappingNode - -class ComposerError(MarkedYAMLError): ... - -class Composer: - anchors = ... # type: Any - def __init__(self): ... - def check_node(self): ... - def get_node(self): ... - def get_single_node(self): ... - def compose_document(self): ... - def compose_node(self, parent, index): ... - def compose_scalar_node(self, anchor): ... - def compose_sequence_node(self, anchor): ... - def compose_mapping_node(self, anchor): ... diff --git a/stubs/third-party-2.7/yaml/constructor.pyi b/stubs/third-party-2.7/yaml/constructor.pyi deleted file mode 100644 index 03f57144ef42..000000000000 --- a/stubs/third-party-2.7/yaml/constructor.pyi +++ /dev/null @@ -1,70 +0,0 @@ -# Stubs for yaml.constructor (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from yaml.error import Mark, YAMLError, MarkedYAMLError -from yaml.nodes import Node, ScalarNode, CollectionNode, SequenceNode, MappingNode - -from typing import Any - -class ConstructorError(MarkedYAMLError): ... - -class BaseConstructor: - yaml_constructors = ... # type: Any - yaml_multi_constructors = ... # type: Any - constructed_objects = ... # type: Any - recursive_objects = ... # type: Any - state_generators = ... # type: Any - deep_construct = ... # type: Any - def __init__(self): ... - def check_data(self): ... - def get_data(self): ... - def get_single_data(self): ... - def construct_document(self, node): ... - def construct_object(self, node, deep=False): ... - def construct_scalar(self, node): ... - def construct_sequence(self, node, deep=False): ... - def construct_mapping(self, node, deep=False): ... - def construct_pairs(self, node, deep=False): ... - def add_constructor(cls, tag, constructor): ... - def add_multi_constructor(cls, tag_prefix, multi_constructor): ... - -class SafeConstructor(BaseConstructor): - def construct_scalar(self, node): ... - def flatten_mapping(self, node): ... - def construct_mapping(self, node, deep=False): ... - def construct_yaml_null(self, node): ... - bool_values = ... # type: Any - def construct_yaml_bool(self, node): ... - def construct_yaml_int(self, node): ... - inf_value = ... # type: Any - nan_value = ... # type: Any - def construct_yaml_float(self, node): ... - def construct_yaml_binary(self, node): ... - timestamp_regexp = ... # type: Any - def construct_yaml_timestamp(self, node): ... - def construct_yaml_omap(self, node): ... - def construct_yaml_pairs(self, node): ... - def construct_yaml_set(self, node): ... - def construct_yaml_str(self, node): ... - def construct_yaml_seq(self, node): ... - def construct_yaml_map(self, node): ... - def construct_yaml_object(self, node, cls): ... - def construct_undefined(self, node): ... - -class Constructor(SafeConstructor): - def construct_python_str(self, node): ... - def construct_python_unicode(self, node): ... - def construct_python_long(self, node): ... - def construct_python_complex(self, node): ... - def construct_python_tuple(self, node): ... - def find_python_module(self, name, mark): ... - def find_python_name(self, name, mark): ... - def construct_python_name(self, suffix, node): ... - def construct_python_module(self, suffix, node): ... - class classobj: ... - def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False): ... - def set_python_instance_state(self, instance, state): ... - def construct_python_object(self, suffix, node): ... - def construct_python_object_apply(self, suffix, node, newobj=False): ... - def construct_python_object_new(self, suffix, node): ... diff --git a/stubs/third-party-2.7/yaml/dumper.pyi b/stubs/third-party-2.7/yaml/dumper.pyi deleted file mode 100644 index 7ff6d6f18a88..000000000000 --- a/stubs/third-party-2.7/yaml/dumper.pyi +++ /dev/null @@ -1,17 +0,0 @@ -# Stubs for yaml.dumper (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from yaml.emitter import Emitter -from yaml.serializer import Serializer -from yaml.representer import BaseRepresenter, Representer, SafeRepresenter -from yaml.resolver import BaseResolver, Resolver - -class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): - def __init__(self, stream, default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None): ... - -class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver): - def __init__(self, stream, default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None): ... - -class Dumper(Emitter, Serializer, Representer, Resolver): - def __init__(self, stream, default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None): ... diff --git a/stubs/third-party-2.7/yaml/emitter.pyi b/stubs/third-party-2.7/yaml/emitter.pyi deleted file mode 100644 index 9e3fb419a3a8..000000000000 --- a/stubs/third-party-2.7/yaml/emitter.pyi +++ /dev/null @@ -1,110 +0,0 @@ -# Stubs for yaml.emitter (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import YAMLError - -class EmitterError(YAMLError): ... - -class ScalarAnalysis: - scalar = ... # type: Any - empty = ... # type: Any - multiline = ... # type: Any - allow_flow_plain = ... # type: Any - allow_block_plain = ... # type: Any - allow_single_quoted = ... # type: Any - allow_double_quoted = ... # type: Any - allow_block = ... # type: Any - def __init__(self, scalar, empty, multiline, allow_flow_plain, allow_block_plain, allow_single_quoted, allow_double_quoted, allow_block): ... - -class Emitter: - DEFAULT_TAG_PREFIXES = ... # type: Any - stream = ... # type: Any - encoding = ... # type: Any - states = ... # type: Any - state = ... # type: Any - events = ... # type: Any - event = ... # type: Any - indents = ... # type: Any - indent = ... # type: Any - flow_level = ... # type: Any - root_context = ... # type: Any - sequence_context = ... # type: Any - mapping_context = ... # type: Any - simple_key_context = ... # type: Any - line = ... # type: Any - column = ... # type: Any - whitespace = ... # type: Any - indention = ... # type: Any - open_ended = ... # type: Any - canonical = ... # type: Any - allow_unicode = ... # type: Any - best_indent = ... # type: Any - best_width = ... # type: Any - best_line_break = ... # type: Any - tag_prefixes = ... # type: Any - prepared_anchor = ... # type: Any - prepared_tag = ... # type: Any - analysis = ... # type: Any - style = ... # type: Any - def __init__(self, stream, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None): ... - def dispose(self): ... - def emit(self, event): ... - def need_more_events(self): ... - def need_events(self, count): ... - def increase_indent(self, flow=False, indentless=False): ... - def expect_stream_start(self): ... - def expect_nothing(self): ... - def expect_first_document_start(self): ... - def expect_document_start(self, first=False): ... - def expect_document_end(self): ... - def expect_document_root(self): ... - def expect_node(self, root=False, sequence=False, mapping=False, simple_key=False): ... - def expect_alias(self): ... - def expect_scalar(self): ... - def expect_flow_sequence(self): ... - def expect_first_flow_sequence_item(self): ... - def expect_flow_sequence_item(self): ... - def expect_flow_mapping(self): ... - def expect_first_flow_mapping_key(self): ... - def expect_flow_mapping_key(self): ... - def expect_flow_mapping_simple_value(self): ... - def expect_flow_mapping_value(self): ... - def expect_block_sequence(self): ... - def expect_first_block_sequence_item(self): ... - def expect_block_sequence_item(self, first=False): ... - def expect_block_mapping(self): ... - def expect_first_block_mapping_key(self): ... - def expect_block_mapping_key(self, first=False): ... - def expect_block_mapping_simple_value(self): ... - def expect_block_mapping_value(self): ... - def check_empty_sequence(self): ... - def check_empty_mapping(self): ... - def check_empty_document(self): ... - def check_simple_key(self): ... - def process_anchor(self, indicator): ... - def process_tag(self): ... - def choose_scalar_style(self): ... - def process_scalar(self): ... - def prepare_version(self, version): ... - def prepare_tag_handle(self, handle): ... - def prepare_tag_prefix(self, prefix): ... - def prepare_tag(self, tag): ... - def prepare_anchor(self, anchor): ... - def analyze_scalar(self, scalar): ... - def flush_stream(self): ... - def write_stream_start(self): ... - def write_stream_end(self): ... - def write_indicator(self, indicator, need_whitespace, whitespace=False, indention=False): ... - def write_indent(self): ... - def write_line_break(self, data=None): ... - def write_version_directive(self, version_text): ... - def write_tag_directive(self, handle_text, prefix_text): ... - def write_single_quoted(self, text, split=True): ... - ESCAPE_REPLACEMENTS = ... # type: Any - def write_double_quoted(self, text, split=True): ... - def determine_block_hints(self, text): ... - def write_folded(self, text): ... - def write_literal(self, text): ... - def write_plain(self, text, split=True): ... diff --git a/stubs/third-party-2.7/yaml/error.pyi b/stubs/third-party-2.7/yaml/error.pyi deleted file mode 100644 index 3370d126ed3c..000000000000 --- a/stubs/third-party-2.7/yaml/error.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for yaml.error (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Mark: - name = ... # type: Any - index = ... # type: Any - line = ... # type: Any - column = ... # type: Any - buffer = ... # type: Any - pointer = ... # type: Any - def __init__(self, name, index, line, column, buffer, pointer): ... - def get_snippet(self, indent=4, max_length=75): ... - -class YAMLError(Exception): ... - -class MarkedYAMLError(YAMLError): - context = ... # type: Any - context_mark = ... # type: Any - problem = ... # type: Any - problem_mark = ... # type: Any - note = ... # type: Any - def __init__(self, context=None, context_mark=None, problem=None, problem_mark=None, note=None): ... diff --git a/stubs/third-party-2.7/yaml/events.pyi b/stubs/third-party-2.7/yaml/events.pyi deleted file mode 100644 index 605d90652809..000000000000 --- a/stubs/third-party-2.7/yaml/events.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# Stubs for yaml.events (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Event: - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, start_mark=None, end_mark=None): ... - -class NodeEvent(Event): - anchor = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, anchor, start_mark=None, end_mark=None): ... - -class CollectionStartEvent(NodeEvent): - anchor = ... # type: Any - tag = ... # type: Any - implicit = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - flow_style = ... # type: Any - def __init__(self, anchor, tag, implicit, start_mark=None, end_mark=None, flow_style=None): ... - -class CollectionEndEvent(Event): ... - -class StreamStartEvent(Event): - start_mark = ... # type: Any - end_mark = ... # type: Any - encoding = ... # type: Any - def __init__(self, start_mark=None, end_mark=None, encoding=None): ... - -class StreamEndEvent(Event): ... - -class DocumentStartEvent(Event): - start_mark = ... # type: Any - end_mark = ... # type: Any - explicit = ... # type: Any - version = ... # type: Any - tags = ... # type: Any - def __init__(self, start_mark=None, end_mark=None, explicit=None, version=None, tags=None): ... - -class DocumentEndEvent(Event): - start_mark = ... # type: Any - end_mark = ... # type: Any - explicit = ... # type: Any - def __init__(self, start_mark=None, end_mark=None, explicit=None): ... - -class AliasEvent(NodeEvent): ... - -class ScalarEvent(NodeEvent): - anchor = ... # type: Any - tag = ... # type: Any - implicit = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - style = ... # type: Any - def __init__(self, anchor, tag, implicit, value, start_mark=None, end_mark=None, style=None): ... - -class SequenceStartEvent(CollectionStartEvent): ... -class SequenceEndEvent(CollectionEndEvent): ... -class MappingStartEvent(CollectionStartEvent): ... -class MappingEndEvent(CollectionEndEvent): ... diff --git a/stubs/third-party-2.7/yaml/loader.pyi b/stubs/third-party-2.7/yaml/loader.pyi deleted file mode 100644 index dfa5817b29ee..000000000000 --- a/stubs/third-party-2.7/yaml/loader.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for yaml.loader (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from yaml.reader import Reader -from yaml.scanner import Scanner -from yaml.parser import Parser -from yaml.composer import Composer -from yaml.constructor import BaseConstructor, SafeConstructor, Constructor -from yaml.resolver import BaseResolver, Resolver - -class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver): - def __init__(self, stream): ... - -class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver): - def __init__(self, stream): ... - -class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver): - def __init__(self, stream): ... diff --git a/stubs/third-party-2.7/yaml/nodes.pyi b/stubs/third-party-2.7/yaml/nodes.pyi deleted file mode 100644 index cb0a7a7ccf83..000000000000 --- a/stubs/third-party-2.7/yaml/nodes.pyi +++ /dev/null @@ -1,35 +0,0 @@ -# Stubs for yaml.nodes (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Node: - tag = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, tag, value, start_mark, end_mark): ... - -class ScalarNode(Node): - id = ... # type: Any - tag = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - style = ... # type: Any - def __init__(self, tag, value, start_mark=None, end_mark=None, style=None): ... - -class CollectionNode(Node): - tag = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - flow_style = ... # type: Any - def __init__(self, tag, value, start_mark=None, end_mark=None, flow_style=None): ... - -class SequenceNode(CollectionNode): - id = ... # type: Any - -class MappingNode(CollectionNode): - id = ... # type: Any diff --git a/stubs/third-party-2.7/yaml/parser.pyi b/stubs/third-party-2.7/yaml/parser.pyi deleted file mode 100644 index f44f21cf7b50..000000000000 --- a/stubs/third-party-2.7/yaml/parser.pyi +++ /dev/null @@ -1,48 +0,0 @@ -# Stubs for yaml.parser (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import MarkedYAMLError - -class ParserError(MarkedYAMLError): ... - -class Parser: - DEFAULT_TAGS = ... # type: Any - current_event = ... # type: Any - yaml_version = ... # type: Any - tag_handles = ... # type: Any - states = ... # type: Any - marks = ... # type: Any - state = ... # type: Any - def __init__(self): ... - def dispose(self): ... - def check_event(self, *choices): ... - def peek_event(self): ... - def get_event(self): ... - def parse_stream_start(self): ... - def parse_implicit_document_start(self): ... - def parse_document_start(self): ... - def parse_document_end(self): ... - def parse_document_content(self): ... - def process_directives(self): ... - def parse_block_node(self): ... - def parse_flow_node(self): ... - def parse_block_node_or_indentless_sequence(self): ... - def parse_node(self, block=False, indentless_sequence=False): ... - def parse_block_sequence_first_entry(self): ... - def parse_block_sequence_entry(self): ... - def parse_indentless_sequence_entry(self): ... - def parse_block_mapping_first_key(self): ... - def parse_block_mapping_key(self): ... - def parse_block_mapping_value(self): ... - def parse_flow_sequence_first_entry(self): ... - def parse_flow_sequence_entry(self, first=False): ... - def parse_flow_sequence_entry_mapping_key(self): ... - def parse_flow_sequence_entry_mapping_value(self): ... - def parse_flow_sequence_entry_mapping_end(self): ... - def parse_flow_mapping_first_key(self): ... - def parse_flow_mapping_key(self, first=False): ... - def parse_flow_mapping_value(self): ... - def parse_flow_mapping_empty_value(self): ... - def process_empty_scalar(self, mark): ... diff --git a/stubs/third-party-2.7/yaml/reader.pyi b/stubs/third-party-2.7/yaml/reader.pyi deleted file mode 100644 index d3b994f3da90..000000000000 --- a/stubs/third-party-2.7/yaml/reader.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# Stubs for yaml.reader (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import YAMLError - -class ReaderError(YAMLError): - name = ... # type: Any - character = ... # type: Any - position = ... # type: Any - encoding = ... # type: Any - reason = ... # type: Any - def __init__(self, name, position, character, encoding, reason): ... - -class Reader: - name = ... # type: Any - stream = ... # type: Any - stream_pointer = ... # type: Any - eof = ... # type: Any - buffer = ... # type: Any - pointer = ... # type: Any - raw_buffer = ... # type: Any - raw_decode = ... # type: Any - encoding = ... # type: Any - index = ... # type: Any - line = ... # type: Any - column = ... # type: Any - def __init__(self, stream): ... - def peek(self, index=0): ... - def prefix(self, length=1): ... - def forward(self, length=1): ... - def get_mark(self): ... - def determine_encoding(self): ... - NON_PRINTABLE = ... # type: Any - def check_printable(self, data): ... - def update(self, length): ... - def update_raw(self, size=1024): ... diff --git a/stubs/third-party-2.7/yaml/representer.pyi b/stubs/third-party-2.7/yaml/representer.pyi deleted file mode 100644 index 498b50aeddba..000000000000 --- a/stubs/third-party-2.7/yaml/representer.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# Stubs for yaml.representer (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import YAMLError - -class RepresenterError(YAMLError): ... - -class BaseRepresenter: - yaml_representers = ... # type: Any - yaml_multi_representers = ... # type: Any - default_style = ... # type: Any - default_flow_style = ... # type: Any - represented_objects = ... # type: Any - object_keeper = ... # type: Any - alias_key = ... # type: Any - def __init__(self, default_style=None, default_flow_style=None): ... - def represent(self, data): ... - def get_classobj_bases(self, cls): ... - def represent_data(self, data): ... - def add_representer(cls, data_type, representer): ... - def add_multi_representer(cls, data_type, representer): ... - def represent_scalar(self, tag, value, style=None): ... - def represent_sequence(self, tag, sequence, flow_style=None): ... - def represent_mapping(self, tag, mapping, flow_style=None): ... - def ignore_aliases(self, data): ... - -class SafeRepresenter(BaseRepresenter): - def ignore_aliases(self, data): ... - def represent_none(self, data): ... - def represent_str(self, data): ... - def represent_unicode(self, data): ... - def represent_bool(self, data): ... - def represent_int(self, data): ... - def represent_long(self, data): ... - inf_value = ... # type: Any - def represent_float(self, data): ... - def represent_list(self, data): ... - def represent_dict(self, data): ... - def represent_set(self, data): ... - def represent_date(self, data): ... - def represent_datetime(self, data): ... - def represent_yaml_object(self, tag, data, cls, flow_style=None): ... - def represent_undefined(self, data): ... - -class Representer(SafeRepresenter): - def represent_str(self, data): ... - def represent_unicode(self, data): ... - def represent_long(self, data): ... - def represent_complex(self, data): ... - def represent_tuple(self, data): ... - def represent_name(self, data): ... - def represent_module(self, data): ... - def represent_instance(self, data): ... - def represent_object(self, data): ... diff --git a/stubs/third-party-2.7/yaml/resolver.pyi b/stubs/third-party-2.7/yaml/resolver.pyi deleted file mode 100644 index d98493500937..000000000000 --- a/stubs/third-party-2.7/yaml/resolver.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for yaml.resolver (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import YAMLError - -class ResolverError(YAMLError): ... - -class BaseResolver: - DEFAULT_SCALAR_TAG = ... # type: Any - DEFAULT_SEQUENCE_TAG = ... # type: Any - DEFAULT_MAPPING_TAG = ... # type: Any - yaml_implicit_resolvers = ... # type: Any - yaml_path_resolvers = ... # type: Any - resolver_exact_paths = ... # type: Any - resolver_prefix_paths = ... # type: Any - def __init__(self): ... - def add_implicit_resolver(cls, tag, regexp, first): ... - def add_path_resolver(cls, tag, path, kind=None): ... - def descend_resolver(self, current_node, current_index): ... - def ascend_resolver(self): ... - def check_resolver_prefix(self, depth, path, kind, current_node, current_index): ... - def resolve(self, kind, value, implicit): ... - -class Resolver(BaseResolver): ... diff --git a/stubs/third-party-2.7/yaml/scanner.pyi b/stubs/third-party-2.7/yaml/scanner.pyi deleted file mode 100644 index 15b1e4edce4b..000000000000 --- a/stubs/third-party-2.7/yaml/scanner.pyi +++ /dev/null @@ -1,100 +0,0 @@ -# Stubs for yaml.scanner (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import MarkedYAMLError - -class ScannerError(MarkedYAMLError): ... - -class SimpleKey: - token_number = ... # type: Any - required = ... # type: Any - index = ... # type: Any - line = ... # type: Any - column = ... # type: Any - mark = ... # type: Any - def __init__(self, token_number, required, index, line, column, mark): ... - -class Scanner: - done = ... # type: Any - flow_level = ... # type: Any - tokens = ... # type: Any - tokens_taken = ... # type: Any - indent = ... # type: Any - indents = ... # type: Any - allow_simple_key = ... # type: Any - possible_simple_keys = ... # type: Any - def __init__(self): ... - def check_token(self, *choices): ... - def peek_token(self): ... - def get_token(self): ... - def need_more_tokens(self): ... - def fetch_more_tokens(self): ... - def next_possible_simple_key(self): ... - def stale_possible_simple_keys(self): ... - def save_possible_simple_key(self): ... - def remove_possible_simple_key(self): ... - def unwind_indent(self, column): ... - def add_indent(self, column): ... - def fetch_stream_start(self): ... - def fetch_stream_end(self): ... - def fetch_directive(self): ... - def fetch_document_start(self): ... - def fetch_document_end(self): ... - def fetch_document_indicator(self, TokenClass): ... - def fetch_flow_sequence_start(self): ... - def fetch_flow_mapping_start(self): ... - def fetch_flow_collection_start(self, TokenClass): ... - def fetch_flow_sequence_end(self): ... - def fetch_flow_mapping_end(self): ... - def fetch_flow_collection_end(self, TokenClass): ... - def fetch_flow_entry(self): ... - def fetch_block_entry(self): ... - def fetch_key(self): ... - def fetch_value(self): ... - def fetch_alias(self): ... - def fetch_anchor(self): ... - def fetch_tag(self): ... - def fetch_literal(self): ... - def fetch_folded(self): ... - def fetch_block_scalar(self, style): ... - def fetch_single(self): ... - def fetch_double(self): ... - def fetch_flow_scalar(self, style): ... - def fetch_plain(self): ... - def check_directive(self): ... - def check_document_start(self): ... - def check_document_end(self): ... - def check_block_entry(self): ... - def check_key(self): ... - def check_value(self): ... - def check_plain(self): ... - def scan_to_next_token(self): ... - def scan_directive(self): ... - def scan_directive_name(self, start_mark): ... - def scan_yaml_directive_value(self, start_mark): ... - def scan_yaml_directive_number(self, start_mark): ... - def scan_tag_directive_value(self, start_mark): ... - def scan_tag_directive_handle(self, start_mark): ... - def scan_tag_directive_prefix(self, start_mark): ... - def scan_directive_ignored_line(self, start_mark): ... - def scan_anchor(self, TokenClass): ... - def scan_tag(self): ... - def scan_block_scalar(self, style): ... - def scan_block_scalar_indicators(self, start_mark): ... - def scan_block_scalar_ignored_line(self, start_mark): ... - def scan_block_scalar_indentation(self): ... - def scan_block_scalar_breaks(self, indent): ... - def scan_flow_scalar(self, style): ... - ESCAPE_REPLACEMENTS = ... # type: Any - ESCAPE_CODES = ... # type: Any - def scan_flow_scalar_non_spaces(self, double, start_mark): ... - def scan_flow_scalar_spaces(self, double, start_mark): ... - def scan_flow_scalar_breaks(self, double, start_mark): ... - def scan_plain(self): ... - def scan_plain_spaces(self, indent, start_mark): ... - def scan_tag_handle(self, name, start_mark): ... - def scan_tag_uri(self, name, start_mark): ... - def scan_uri_escapes(self, name, start_mark): ... - def scan_line_break(self): ... diff --git a/stubs/third-party-2.7/yaml/serializer.pyi b/stubs/third-party-2.7/yaml/serializer.pyi deleted file mode 100644 index f469953f2b9e..000000000000 --- a/stubs/third-party-2.7/yaml/serializer.pyi +++ /dev/null @@ -1,27 +0,0 @@ -# Stubs for yaml.serializer (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from yaml.error import YAMLError - -class SerializerError(YAMLError): ... - -class Serializer: - ANCHOR_TEMPLATE = ... # type: Any - use_encoding = ... # type: Any - use_explicit_start = ... # type: Any - use_explicit_end = ... # type: Any - use_version = ... # type: Any - use_tags = ... # type: Any - serialized_nodes = ... # type: Any - anchors = ... # type: Any - last_anchor_id = ... # type: Any - closed = ... # type: Any - def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None): ... - def open(self): ... - def close(self): ... - def serialize(self, node): ... - def anchor_node(self, node): ... - def generate_anchor(self, node): ... - def serialize_node(self, node, parent, index): ... diff --git a/stubs/third-party-2.7/yaml/tokens.pyi b/stubs/third-party-2.7/yaml/tokens.pyi deleted file mode 100644 index f8d8c5461613..000000000000 --- a/stubs/third-party-2.7/yaml/tokens.pyi +++ /dev/null @@ -1,97 +0,0 @@ -# Stubs for yaml.tokens (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class Token: - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, start_mark, end_mark): ... - -class DirectiveToken(Token): - id = ... # type: Any - name = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, name, value, start_mark, end_mark): ... - -class DocumentStartToken(Token): - id = ... # type: Any - -class DocumentEndToken(Token): - id = ... # type: Any - -class StreamStartToken(Token): - id = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - encoding = ... # type: Any - def __init__(self, start_mark=None, end_mark=None, encoding=None): ... - -class StreamEndToken(Token): - id = ... # type: Any - -class BlockSequenceStartToken(Token): - id = ... # type: Any - -class BlockMappingStartToken(Token): - id = ... # type: Any - -class BlockEndToken(Token): - id = ... # type: Any - -class FlowSequenceStartToken(Token): - id = ... # type: Any - -class FlowMappingStartToken(Token): - id = ... # type: Any - -class FlowSequenceEndToken(Token): - id = ... # type: Any - -class FlowMappingEndToken(Token): - id = ... # type: Any - -class KeyToken(Token): - id = ... # type: Any - -class ValueToken(Token): - id = ... # type: Any - -class BlockEntryToken(Token): - id = ... # type: Any - -class FlowEntryToken(Token): - id = ... # type: Any - -class AliasToken(Token): - id = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, value, start_mark, end_mark): ... - -class AnchorToken(Token): - id = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, value, start_mark, end_mark): ... - -class TagToken(Token): - id = ... # type: Any - value = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - def __init__(self, value, start_mark, end_mark): ... - -class ScalarToken(Token): - id = ... # type: Any - value = ... # type: Any - plain = ... # type: Any - start_mark = ... # type: Any - end_mark = ... # type: Any - style = ... # type: Any - def __init__(self, value, plain, start_mark, end_mark, style=None): ... diff --git a/stubs/third-party-3.2/requests/__init__.pyi b/stubs/third-party-3.2/requests/__init__.pyi deleted file mode 100644 index 173481a1ca96..000000000000 --- a/stubs/third-party-3.2/requests/__init__.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# Stubs for requests (based on version 2.6.0, Python 3) - -from typing import Any -from . import models -from . import api -from . import sessions -from . import status_codes -from . import exceptions -import logging - -__title__ = ... # type: Any -__build__ = ... # type: Any -__license__ = ... # type: Any -__copyright__ = ... # type: Any - -Request = models.Request -Response = models.Response -PreparedRequest = models.PreparedRequest -request = api.request -get = api.get -head = api.head -post = api.post -patch = api.patch -put = api.put -delete = api.delete -options = api.options -session = sessions.session -Session = sessions.Session -codes = status_codes.codes -RequestException = exceptions.RequestException -Timeout = exceptions.Timeout -URLRequired = exceptions.URLRequired -TooManyRedirects = exceptions.TooManyRedirects -HTTPError = exceptions.HTTPError -ConnectionError = exceptions.ConnectionError - -class NullHandler(logging.Handler): - def emit(self, record): ... diff --git a/stubs/third-party-3.2/requests/adapters.pyi b/stubs/third-party-3.2/requests/adapters.pyi deleted file mode 100644 index bed0758b4d91..000000000000 --- a/stubs/third-party-3.2/requests/adapters.pyi +++ /dev/null @@ -1,69 +0,0 @@ -# Stubs for requests.adapters (Python 3) - -from typing import Any -from . import models -from .packages.urllib3 import poolmanager -from .packages.urllib3 import response -from .packages.urllib3.util import retry -from . import compat -from . import utils -from . import structures -from .packages.urllib3 import exceptions as urllib3_exceptions -from . import cookies -from . import exceptions -from . import auth - -Response = models.Response -PoolManager = poolmanager.PoolManager -proxy_from_url = poolmanager.proxy_from_url -HTTPResponse = response.HTTPResponse -Retry = retry.Retry -DEFAULT_CA_BUNDLE_PATH = utils.DEFAULT_CA_BUNDLE_PATH -get_encoding_from_headers = utils.get_encoding_from_headers -prepend_scheme_if_needed = utils.prepend_scheme_if_needed -get_auth_from_url = utils.get_auth_from_url -urldefragauth = utils.urldefragauth -CaseInsensitiveDict = structures.CaseInsensitiveDict -ConnectTimeoutError = urllib3_exceptions.ConnectTimeoutError -MaxRetryError = urllib3_exceptions.MaxRetryError -ProtocolError = urllib3_exceptions.ProtocolError -ReadTimeoutError = urllib3_exceptions.ReadTimeoutError -ResponseError = urllib3_exceptions.ResponseError -extract_cookies_to_jar = cookies.extract_cookies_to_jar -ConnectionError = exceptions.ConnectionError -ConnectTimeout = exceptions.ConnectTimeout -ReadTimeout = exceptions.ReadTimeout -SSLError = exceptions.SSLError -ProxyError = exceptions.ProxyError -RetryError = exceptions.RetryError - -DEFAULT_POOLBLOCK = ... # type: Any -DEFAULT_POOLSIZE = ... # type: Any -DEFAULT_RETRIES = ... # type: Any - -class BaseAdapter: - def __init__(self): ... - # TODO: "request" parameter not actually supported, added to please mypy. - def send(self, request=None): ... - def close(self): ... - -class HTTPAdapter(BaseAdapter): - __attrs__ = ... # type: Any - max_retries = ... # type: Any - config = ... # type: Any - proxy_manager = ... # type: Any - def __init__(self, pool_connections=..., pool_maxsize=..., max_retries=..., - pool_block=...): ... - poolmanager = ... # type: Any - def init_poolmanager(self, connections, maxsize, block=..., **pool_kwargs): ... - def proxy_manager_for(self, proxy, **proxy_kwargs): ... - def cert_verify(self, conn, url, verify, cert): ... - def build_response(self, req, resp): ... - def get_connection(self, url, proxies=None): ... - def close(self): ... - def request_url(self, request, proxies): ... - def add_headers(self, request, **kwargs): ... - def proxy_headers(self, proxy): ... - # TODO: "request" is not actually optional, modified to please mypy. - def send(self, request=None, stream=False, timeout=None, verify=True, cert=None, - proxies=None): ... diff --git a/stubs/third-party-3.2/requests/api.pyi b/stubs/third-party-3.2/requests/api.pyi deleted file mode 100644 index 741c80eb474a..000000000000 --- a/stubs/third-party-3.2/requests/api.pyi +++ /dev/null @@ -1,14 +0,0 @@ -# Stubs for requests.api (Python 3) - -import typing - -from .models import Response - -def request(method: str, url: str, **kwargs) -> Response: ... -def get(url: str, **kwargs) -> Response: ... -def options(url: str, **kwargs) -> Response: ... -def head(url: str, **kwargs) -> Response: ... -def post(url: str, data=None, json=None, **kwargs) -> Response: ... -def put(url: str, data=None, **kwargs) -> Response: ... -def patch(url: str, data=None, **kwargs) -> Response: ... -def delete(url: str, **kwargs) -> Response: ... diff --git a/stubs/third-party-3.2/requests/auth.pyi b/stubs/third-party-3.2/requests/auth.pyi deleted file mode 100644 index 43238dcba579..000000000000 --- a/stubs/third-party-3.2/requests/auth.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Stubs for requests.auth (Python 3) - -from typing import Any -from . import compat -from . import cookies -from . import utils -from . import status_codes - -extract_cookies_to_jar = cookies.extract_cookies_to_jar -parse_dict_header = utils.parse_dict_header -to_native_string = utils.to_native_string -codes = status_codes.codes - -CONTENT_TYPE_FORM_URLENCODED = ... # type: Any -CONTENT_TYPE_MULTI_PART = ... # type: Any - -class AuthBase: - def __call__(self, r): ... - -class HTTPBasicAuth(AuthBase): - username = ... # type: Any - password = ... # type: Any - def __init__(self, username, password): ... - def __call__(self, r): ... - -class HTTPProxyAuth(HTTPBasicAuth): - def __call__(self, r): ... - -class HTTPDigestAuth(AuthBase): - username = ... # type: Any - password = ... # type: Any - last_nonce = ... # type: Any - nonce_count = ... # type: Any - chal = ... # type: Any - pos = ... # type: Any - num_401_calls = ... # type: Any - def __init__(self, username, password): ... - def build_digest_header(self, method, url): ... - def handle_redirect(self, r, **kwargs): ... - def handle_401(self, r, **kwargs): ... - def __call__(self, r): ... diff --git a/stubs/third-party-3.2/requests/compat.pyi b/stubs/third-party-3.2/requests/compat.pyi deleted file mode 100644 index 63b92f6fef32..000000000000 --- a/stubs/third-party-3.2/requests/compat.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for requests.compat (Python 3.4) - -from typing import Any -import collections - -OrderedDict = collections.OrderedDict diff --git a/stubs/third-party-3.2/requests/cookies.pyi b/stubs/third-party-3.2/requests/cookies.pyi deleted file mode 100644 index a5b012993a1d..000000000000 --- a/stubs/third-party-3.2/requests/cookies.pyi +++ /dev/null @@ -1,65 +0,0 @@ -# Stubs for requests.cookies (Python 3) - -from typing import Any, MutableMapping -#import cookielib -from http import cookiejar as cookielib -import collections -from . import compat - -#cookielib = compat.cookielib - -class MockRequest: - type = ... # type: Any - def __init__(self, request): ... - def get_type(self): ... - def get_host(self): ... - def get_origin_req_host(self): ... - def get_full_url(self): ... - def is_unverifiable(self): ... - def has_header(self, name): ... - def get_header(self, name, default=None): ... - def add_header(self, key, val): ... - def add_unredirected_header(self, name, value): ... - def get_new_headers(self): ... - @property - def unverifiable(self): ... - @property - def origin_req_host(self): ... - @property - def host(self): ... - -class MockResponse: - def __init__(self, headers): ... - def info(self): ... - def getheaders(self, name): ... - -def extract_cookies_to_jar(jar, request, response): ... -def get_cookie_header(jar, request): ... -def remove_cookie_by_name(cookiejar, name, domain=None, path=None): ... - -class CookieConflictError(RuntimeError): ... - -class RequestsCookieJar(cookielib.CookieJar, MutableMapping): - def get(self, name, default=None, domain=None, path=None): ... - def set(self, name, value, **kwargs): ... - def iterkeys(self): ... - def keys(self): ... - def itervalues(self): ... - def values(self): ... - def iteritems(self): ... - def items(self): ... - def list_domains(self): ... - def list_paths(self): ... - def multiple_domains(self): ... - def get_dict(self, domain=None, path=None): ... - def __getitem__(self, name): ... - def __setitem__(self, name, value): ... - def __delitem__(self, name): ... - def set_cookie(self, cookie, *args, **kwargs): ... - def update(self, other): ... - def copy(self): ... - -def create_cookie(name, value, **kwargs): ... -def morsel_to_cookie(morsel): ... -def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True): ... -def merge_cookies(cookiejar, cookies): ... diff --git a/stubs/third-party-3.2/requests/exceptions.pyi b/stubs/third-party-3.2/requests/exceptions.pyi deleted file mode 100644 index 2957967834fc..000000000000 --- a/stubs/third-party-3.2/requests/exceptions.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for requests.exceptions (Python 3) - -from typing import Any -from .packages.urllib3.exceptions import HTTPError as BaseHTTPError - -class RequestException(IOError): - response = ... # type: Any - request = ... # type: Any - def __init__(self, *args, **kwargs): ... - -class HTTPError(RequestException): ... -class ConnectionError(RequestException): ... -class ProxyError(ConnectionError): ... -class SSLError(ConnectionError): ... -class Timeout(RequestException): ... -class ConnectTimeout(ConnectionError, Timeout): ... -class ReadTimeout(Timeout): ... -class URLRequired(RequestException): ... -class TooManyRedirects(RequestException): ... -class MissingSchema(RequestException, ValueError): ... -class InvalidSchema(RequestException, ValueError): ... -class InvalidURL(RequestException, ValueError): ... -class ChunkedEncodingError(RequestException): ... -class ContentDecodingError(RequestException, BaseHTTPError): ... -class StreamConsumedError(RequestException, TypeError): ... -class RetryError(RequestException): ... diff --git a/stubs/third-party-3.2/requests/hooks.pyi b/stubs/third-party-3.2/requests/hooks.pyi deleted file mode 100644 index 3367d9a48758..000000000000 --- a/stubs/third-party-3.2/requests/hooks.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.hooks (Python 3) - -from typing import Any - -HOOKS = ... # type: Any - -def default_hooks(): ... -def dispatch_hook(key, hooks, hook_data, **kwargs): ... diff --git a/stubs/third-party-3.2/requests/models.pyi b/stubs/third-party-3.2/requests/models.pyi deleted file mode 100644 index 662e7bc581b8..000000000000 --- a/stubs/third-party-3.2/requests/models.pyi +++ /dev/null @@ -1,134 +0,0 @@ -# Stubs for requests.models (Python 3) - -from typing import Any, List, MutableMapping, Iterator, Dict -import datetime - -from . import hooks -from . import structures -from . import auth -from . import cookies -from .cookies import RequestsCookieJar -from .packages.urllib3 import fields -from .packages.urllib3 import filepost -from .packages.urllib3 import util -from .packages.urllib3 import exceptions as urllib3_exceptions -from . import exceptions -from . import utils -from . import compat -from . import status_codes - -default_hooks = hooks.default_hooks -CaseInsensitiveDict = structures.CaseInsensitiveDict -HTTPBasicAuth = auth.HTTPBasicAuth -cookiejar_from_dict = cookies.cookiejar_from_dict -get_cookie_header = cookies.get_cookie_header -RequestField = fields.RequestField -encode_multipart_formdata = filepost.encode_multipart_formdata -parse_url = util.parse_url -DecodeError = urllib3_exceptions.DecodeError -ReadTimeoutError = urllib3_exceptions.ReadTimeoutError -ProtocolError = urllib3_exceptions.ProtocolError -LocationParseError = urllib3_exceptions.LocationParseError -HTTPError = exceptions.HTTPError -MissingSchema = exceptions.MissingSchema -InvalidURL = exceptions.InvalidURL -ChunkedEncodingError = exceptions.ChunkedEncodingError -ContentDecodingError = exceptions.ContentDecodingError -ConnectionError = exceptions.ConnectionError -StreamConsumedError = exceptions.StreamConsumedError -guess_filename = utils.guess_filename -get_auth_from_url = utils.get_auth_from_url -requote_uri = utils.requote_uri -stream_decode_response_unicode = utils.stream_decode_response_unicode -to_key_val_list = utils.to_key_val_list -parse_header_links = utils.parse_header_links -iter_slices = utils.iter_slices -guess_json_utf = utils.guess_json_utf -super_len = utils.super_len -to_native_string = utils.to_native_string -codes = status_codes.codes - -REDIRECT_STATI = ... # type: Any -DEFAULT_REDIRECT_LIMIT = ... # type: Any -CONTENT_CHUNK_SIZE = ... # type: Any -ITER_CHUNK_SIZE = ... # type: Any -json_dumps = ... # type: Any - -class RequestEncodingMixin: - @property - def path_url(self): ... - -class RequestHooksMixin: - def register_hook(self, event, hook): ... - def deregister_hook(self, event, hook): ... - -class Request(RequestHooksMixin): - hooks = ... # type: Any - method = ... # type: Any - url = ... # type: Any - headers = ... # type: Any - files = ... # type: Any - data = ... # type: Any - json = ... # type: Any - params = ... # type: Any - auth = ... # type: Any - cookies = ... # type: Any - def __init__(self, method=None, url=None, headers=None, files=None, data=None, params=None, - auth=None, cookies=None, hooks=None, json=None): ... - def prepare(self): ... - -class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): - method = ... # type: Any - url = ... # type: Any - headers = ... # type: Any - body = ... # type: Any - hooks = ... # type: Any - def __init__(self): ... - def prepare(self, method=None, url=None, headers=None, files=None, data=None, params=None, - auth=None, cookies=None, hooks=None, json=None): ... - def copy(self): ... - def prepare_method(self, method): ... - def prepare_url(self, url, params): ... - def prepare_headers(self, headers): ... - def prepare_body(self, data, files, json=None): ... - def prepare_content_length(self, body): ... - def prepare_auth(self, auth, url=''): ... - def prepare_cookies(self, cookies): ... - def prepare_hooks(self, hooks): ... - -class Response: - __attrs__ = ... # type: Any - status_code = ... # type: int - headers = ... # type: MutableMapping[str, str] - raw = ... # type: Any - url = ... # type: str - encoding = ... # type: str - history = ... # type: List[Response] - reason = ... # type: str - cookies = ... # type: RequestsCookieJar - elapsed = ... # type: datetime.timedelta - request = ... # type: PreparedRequest - def __init__(self) -> None: ... - def __bool__(self) -> bool: ... - def __nonzero__(self) -> bool: ... - def __iter__(self) -> Iterator[bytes]: ... - @property - def ok(self) -> bool: ... - @property - def is_redirect(self) -> bool: ... - @property - def is_permanent_redirect(self) -> bool: ... - @property - def apparent_encoding(self) -> str: ... - def iter_content(self, chunk_size: int = 1, - decode_unicode: bool = False) -> Iterator[Any]: ... - def iter_lines(self, chunk_size=..., decode_unicode=None, delimiter=None): ... - @property - def content(self) -> bytes: ... - @property - def text(self) -> str: ... - def json(self, **kwargs) -> Any: ... - @property - def links(self) -> Dict[Any, Any]: ... - def raise_for_status(self) -> None: ... - def close(self) -> None: ... diff --git a/stubs/third-party-3.2/requests/packages/__init__.pyi b/stubs/third-party-3.2/requests/packages/__init__.pyi deleted file mode 100644 index 835913f46091..000000000000 --- a/stubs/third-party-3.2/requests/packages/__init__.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.packages (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class VendorAlias: - def __init__(self, package_names): ... - def find_module(self, fullname, path=None): ... - def load_module(self, name): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/__init__.pyi b/stubs/third-party-3.2/requests/packages/urllib3/__init__.pyi deleted file mode 100644 index 61a1c5fe662e..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/__init__.pyi +++ /dev/null @@ -1,35 +0,0 @@ -# Stubs for requests.packages.urllib3 (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import connectionpool -from . import filepost -from . import poolmanager -from . import response -from .util import request as _request -from .util import url -from .util import timeout -from .util import retry -import logging - -__license__ = ... # type: Any - -HTTPConnectionPool = connectionpool.HTTPConnectionPool -HTTPSConnectionPool = connectionpool.HTTPSConnectionPool -connection_from_url = connectionpool.connection_from_url -encode_multipart_formdata = filepost.encode_multipart_formdata -PoolManager = poolmanager.PoolManager -ProxyManager = poolmanager.ProxyManager -proxy_from_url = poolmanager.proxy_from_url -HTTPResponse = response.HTTPResponse -make_headers = _request.make_headers -get_host = url.get_host -Timeout = timeout.Timeout -Retry = retry.Retry - -class NullHandler(logging.Handler): - def emit(self, record): ... - -def add_stderr_logger(level=...): ... -def disable_warnings(category=...): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/_collections.pyi b/stubs/third-party-3.2/requests/packages/urllib3/_collections.pyi deleted file mode 100644 index 452b7729243c..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/_collections.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# Stubs for requests.packages.urllib3._collections (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from collections import MutableMapping - -class RLock: - def __enter__(self): ... - def __exit__(self, exc_type, exc_value, traceback): ... - -class RecentlyUsedContainer(MutableMapping): - ContainerCls = ... # type: Any - dispose_func = ... # type: Any - lock = ... # type: Any - def __init__(self, maxsize=10, dispose_func=None): ... - def __getitem__(self, key): ... - def __setitem__(self, key, value): ... - def __delitem__(self, key): ... - def __len__(self): ... - def __iter__(self): ... - def clear(self): ... - def keys(self): ... - -class HTTPHeaderDict(dict): - def __init__(self, headers=None, **kwargs): ... - def __setitem__(self, key, val): ... - def __getitem__(self, key): ... - def __delitem__(self, key): ... - def __contains__(self, key): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - values = ... # type: Any - get = ... # type: Any - update = ... # type: Any - iterkeys = ... # type: Any - itervalues = ... # type: Any - def pop(self, key, default=...): ... - def discard(self, key): ... - def add(self, key, val): ... - def extend(*args, **kwargs): ... - def getlist(self, key): ... - getheaders = ... # type: Any - getallmatchingheaders = ... # type: Any - iget = ... # type: Any - def copy(self): ... - def iteritems(self): ... - def itermerged(self): ... - def items(self): ... - @classmethod - def from_httplib(cls, message, duplicates=...): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/connection.pyi b/stubs/third-party-3.2/requests/packages/urllib3/connection.pyi deleted file mode 100644 index 8a39d042a3e7..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/connection.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# Stubs for requests.packages.urllib3.connection (Python 3.4) - -from typing import Any -from . import packages -from http.client import HTTPConnection as _HTTPConnection -# from httplib import HTTPConnection as _HTTPConnection # python 2 -from . import exceptions -from .packages import ssl_match_hostname -from .util import ssl_ -from . import util -import http.client - -class DummyConnection: ... - -import ssl -BaseSSLError = ssl.SSLError -ConnectionError = __builtins__.ConnectionError -HTTPException = http.client.HTTPException - -ConnectTimeoutError = exceptions.ConnectTimeoutError -SystemTimeWarning = exceptions.SystemTimeWarning -SecurityWarning = exceptions.SecurityWarning -match_hostname = ssl_match_hostname.match_hostname -resolve_cert_reqs = ssl_.resolve_cert_reqs -resolve_ssl_version = ssl_.resolve_ssl_version -ssl_wrap_socket = ssl_.ssl_wrap_socket -assert_fingerprint = ssl_.assert_fingerprint -connection = util.connection - -port_by_scheme = ... # type: Any -RECENT_DATE = ... # type: Any - -class HTTPConnection(_HTTPConnection): - default_port = ... # type: Any - default_socket_options = ... # type: Any - is_verified = ... # type: Any - source_address = ... # type: Any - socket_options = ... # type: Any - def __init__(self, *args, **kw): ... - def connect(self): ... - -class HTTPSConnection(HTTPConnection): - default_port = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None, timeout=..., **kw): ... - sock = ... # type: Any - def connect(self): ... - -class VerifiedHTTPSConnection(HTTPSConnection): - cert_reqs = ... # type: Any - ca_certs = ... # type: Any - ssl_version = ... # type: Any - assert_fingerprint = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - assert_hostname = ... # type: Any - def set_cert(self, key_file=None, cert_file=None, cert_reqs=None, ca_certs=None, assert_hostname=None, assert_fingerprint=None): ... - sock = ... # type: Any - auto_open = ... # type: Any - is_verified = ... # type: Any - def connect(self): ... - -UnverifiedHTTPSConnection = ... # type: Any diff --git a/stubs/third-party-3.2/requests/packages/urllib3/connectionpool.pyi b/stubs/third-party-3.2/requests/packages/urllib3/connectionpool.pyi deleted file mode 100644 index 1bbeb05471b0..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/connectionpool.pyi +++ /dev/null @@ -1,87 +0,0 @@ -# Stubs for requests.packages.urllib3.connectionpool (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import exceptions -from .packages import ssl_match_hostname -from . import packages -from . import connection -from . import request -from . import response -from .util import connection as _connection -from .util import retry -from .util import timeout -from .util import url - -ClosedPoolError = exceptions.ClosedPoolError -ProtocolError = exceptions.ProtocolError -EmptyPoolError = exceptions.EmptyPoolError -HostChangedError = exceptions.HostChangedError -LocationValueError = exceptions.LocationValueError -MaxRetryError = exceptions.MaxRetryError -ProxyError = exceptions.ProxyError -ReadTimeoutError = exceptions.ReadTimeoutError -SSLError = exceptions.SSLError -TimeoutError = exceptions.TimeoutError -InsecureRequestWarning = exceptions.InsecureRequestWarning -CertificateError = ssl_match_hostname.CertificateError -port_by_scheme = connection.port_by_scheme -DummyConnection = connection.DummyConnection -HTTPConnection = connection.HTTPConnection -HTTPSConnection = connection.HTTPSConnection -VerifiedHTTPSConnection = connection.VerifiedHTTPSConnection -HTTPException = connection.HTTPException -BaseSSLError = connection.BaseSSLError -ConnectionError = connection.ConnectionError -RequestMethods = request.RequestMethods -HTTPResponse = response.HTTPResponse -is_connection_dropped = _connection.is_connection_dropped -Retry = retry.Retry -Timeout = timeout.Timeout -get_host = url.get_host - -xrange = ... # type: Any -log = ... # type: Any - -class ConnectionPool: - scheme = ... # type: Any - QueueCls = ... # type: Any - host = ... # type: Any - port = ... # type: Any - def __init__(self, host, port=None): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_val, exc_tb): ... - def close(self): ... - -class HTTPConnectionPool(ConnectionPool, RequestMethods): - scheme = ... # type: Any - ConnectionCls = ... # type: Any - strict = ... # type: Any - timeout = ... # type: Any - retries = ... # type: Any - pool = ... # type: Any - block = ... # type: Any - proxy = ... # type: Any - proxy_headers = ... # type: Any - num_connections = ... # type: Any - num_requests = ... # type: Any - conn_kw = ... # type: Any - def __init__(self, host, port=None, strict=False, timeout=..., maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, **conn_kw): ... - def close(self): ... - def is_same_host(self, url): ... - def urlopen(self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=..., pool_timeout=None, release_conn=None, **response_kw): ... - -class HTTPSConnectionPool(HTTPConnectionPool): - scheme = ... # type: Any - ConnectionCls = ... # type: Any - key_file = ... # type: Any - cert_file = ... # type: Any - cert_reqs = ... # type: Any - ca_certs = ... # type: Any - ssl_version = ... # type: Any - assert_hostname = ... # type: Any - assert_fingerprint = ... # type: Any - def __init__(self, host, port=None, strict=False, timeout=..., maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, key_file=None, cert_file=None, cert_reqs=None, ca_certs=None, ssl_version=None, assert_hostname=None, assert_fingerprint=None, **conn_kw): ... - -def connection_from_url(url, **kw): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/contrib/__init__.pyi b/stubs/third-party-3.2/requests/packages/urllib3/contrib/__init__.pyi deleted file mode 100644 index 17d26bb130dd..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/contrib/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for requests.packages.urllib3.contrib (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-3.2/requests/packages/urllib3/exceptions.pyi b/stubs/third-party-3.2/requests/packages/urllib3/exceptions.pyi deleted file mode 100644 index 39bba47467c5..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/exceptions.pyi +++ /dev/null @@ -1,54 +0,0 @@ -# Stubs for requests.packages.urllib3.exceptions (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class HTTPError(Exception): ... -class HTTPWarning(Warning): ... - -class PoolError(HTTPError): - pool = ... # type: Any - def __init__(self, pool, message): ... - def __reduce__(self): ... - -class RequestError(PoolError): - url = ... # type: Any - def __init__(self, pool, url, message): ... - def __reduce__(self): ... - -class SSLError(HTTPError): ... -class ProxyError(HTTPError): ... -class DecodeError(HTTPError): ... -class ProtocolError(HTTPError): ... - -ConnectionError = ... # type: Any - -class MaxRetryError(RequestError): - reason = ... # type: Any - def __init__(self, pool, url, reason=None): ... - -class HostChangedError(RequestError): - retries = ... # type: Any - def __init__(self, pool, url, retries=3): ... - -class TimeoutStateError(HTTPError): ... -class TimeoutError(HTTPError): ... -class ReadTimeoutError(TimeoutError, RequestError): ... -class ConnectTimeoutError(TimeoutError): ... -class EmptyPoolError(PoolError): ... -class ClosedPoolError(PoolError): ... -class LocationValueError(ValueError, HTTPError): ... - -class LocationParseError(LocationValueError): - location = ... # type: Any - def __init__(self, location): ... - -class ResponseError(HTTPError): - GENERIC_ERROR = ... # type: Any - SPECIFIC_ERROR = ... # type: Any - -class SecurityWarning(HTTPWarning): ... -class InsecureRequestWarning(SecurityWarning): ... -class SystemTimeWarning(SecurityWarning): ... -class InsecurePlatformWarning(SecurityWarning): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/fields.pyi b/stubs/third-party-3.2/requests/packages/urllib3/fields.pyi deleted file mode 100644 index ea43fb955bde..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/fields.pyi +++ /dev/null @@ -1,16 +0,0 @@ -# Stubs for requests.packages.urllib3.fields (Python 3.4) - -from typing import Any -from . import packages - -def guess_content_type(filename, default=''): ... -def format_header_param(name, value): ... - -class RequestField: - data = ... # type: Any - headers = ... # type: Any - def __init__(self, name, data, filename=None, headers=None): ... - @classmethod - def from_tuples(cls, fieldname, value): ... - def render_headers(self): ... - def make_multipart(self, content_disposition=None, content_type=None, content_location=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/filepost.pyi b/stubs/third-party-3.2/requests/packages/urllib3/filepost.pyi deleted file mode 100644 index 42a23f0b4042..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/filepost.pyi +++ /dev/null @@ -1,19 +0,0 @@ -# Stubs for requests.packages.urllib3.filepost (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from . import packages -#from .packages import six -from . import fields - -#six = packages.six -#b = six.b -RequestField = fields.RequestField - -writer = ... # type: Any - -def choose_boundary(): ... -def iter_field_objects(fields): ... -def iter_fields(fields): ... -def encode_multipart_formdata(fields, boundary=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/packages/__init__.pyi b/stubs/third-party-3.2/requests/packages/urllib3/packages/__init__.pyi deleted file mode 100644 index 231463649504..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/packages/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for requests.packages.urllib3.packages (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyi b/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyi deleted file mode 100644 index 9efeac09e4b2..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.packages.urllib3.packages.ssl_match_hostname (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -import ssl - -CertificateError = ssl.CertificateError -match_hostname = ssl.match_hostname diff --git a/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi b/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi deleted file mode 100644 index 5abbc9dd5c52..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Stubs for requests.packages.urllib3.packages.ssl_match_hostname._implementation (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class CertificateError(ValueError): ... - -def match_hostname(cert, hostname): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/poolmanager.pyi b/stubs/third-party-3.2/requests/packages/urllib3/poolmanager.pyi deleted file mode 100644 index 2c9fdb0cd669..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/poolmanager.pyi +++ /dev/null @@ -1,31 +0,0 @@ -# Stubs for requests.packages.urllib3.poolmanager (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .request import RequestMethods - -class PoolManager(RequestMethods): - proxy = ... # type: Any - connection_pool_kw = ... # type: Any - pools = ... # type: Any - def __init__(self, num_pools=10, headers=None, **connection_pool_kw): ... - def __enter__(self): ... - def __exit__(self, exc_type, exc_val, exc_tb): ... - def clear(self): ... - def connection_from_host(self, host, port=None, scheme=''): ... - def connection_from_url(self, url): ... - # TODO: This was the original signature -- copied another one from base class to fix complaint. - # def urlopen(self, method, url, redirect=True, **kw): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - -class ProxyManager(PoolManager): - proxy = ... # type: Any - proxy_headers = ... # type: Any - def __init__(self, proxy_url, num_pools=10, headers=None, proxy_headers=None, **connection_pool_kw): ... - def connection_from_host(self, host, port=None, scheme=''): ... - # TODO: This was the original signature -- copied another one from base class to fix complaint. - # def urlopen(self, method, url, redirect=True, **kw): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - -def proxy_from_url(url, **kw): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/request.pyi b/stubs/third-party-3.2/requests/packages/urllib3/request.pyi deleted file mode 100644 index ec03d6d12257..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/request.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for requests.packages.urllib3.request (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -class RequestMethods: - headers = ... # type: Any - def __init__(self, headers=None): ... - def urlopen(self, method, url, body=None, headers=None, encode_multipart=True, multipart_boundary=None, **kw): ... - def request(self, method, url, fields=None, headers=None, **urlopen_kw): ... - def request_encode_url(self, method, url, fields=None, **urlopen_kw): ... - def request_encode_body(self, method, url, fields=None, headers=None, encode_multipart=True, multipart_boundary=None, **urlopen_kw): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/response.pyi b/stubs/third-party-3.2/requests/packages/urllib3/response.pyi deleted file mode 100644 index 586a08208fa6..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/response.pyi +++ /dev/null @@ -1,60 +0,0 @@ -# Stubs for requests.packages.urllib3.response (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import io -from . import _collections -from . import exceptions -#from .packages import six -from . import connection -from .util import response - -HTTPHeaderDict = _collections.HTTPHeaderDict -ProtocolError = exceptions.ProtocolError -DecodeError = exceptions.DecodeError -ReadTimeoutError = exceptions.ReadTimeoutError -binary_type = bytes # six.binary_type -PY3 = True # six.PY3 -HTTPException = connection.HTTPException -BaseSSLError = connection.BaseSSLError -is_fp_closed = response.is_fp_closed - -class DeflateDecoder: - def __init__(self): ... - def __getattr__(self, name): ... - def decompress(self, data): ... - -class GzipDecoder: - def __init__(self): ... - def __getattr__(self, name): ... - def decompress(self, data): ... - -class HTTPResponse(io.IOBase): - CONTENT_DECODERS = ... # type: Any - REDIRECT_STATUSES = ... # type: Any - headers = ... # type: Any - status = ... # type: Any - version = ... # type: Any - reason = ... # type: Any - strict = ... # type: Any - decode_content = ... # type: Any - def __init__(self, body='', headers=None, status=0, version=0, reason=None, strict=0, preload_content=True, decode_content=True, original_response=None, pool=None, connection=None): ... - def get_redirect_location(self): ... - def release_conn(self): ... - @property - def data(self): ... - def tell(self): ... - def read(self, amt=None, decode_content=None, cache_content=False): ... - def stream(self, amt=..., decode_content=None): ... - @classmethod - def from_httplib(ResponseCls, r, **response_kw): ... - def getheaders(self): ... - def getheader(self, name, default=None): ... - def close(self): ... - @property - def closed(self): ... - def fileno(self): ... - def flush(self): ... - def readable(self): ... - def readinto(self, b): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/__init__.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/__init__.pyi deleted file mode 100644 index e4a0e138d1cc..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/__init__.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# Stubs for requests.packages.urllib3.util (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from . import connection -from . import request -from . import response -from . import ssl_ -from . import timeout -from . import retry -from . import url -import ssl - -is_connection_dropped = connection.is_connection_dropped -make_headers = request.make_headers -is_fp_closed = response.is_fp_closed -SSLContext = ssl.SSLContext -HAS_SNI = ssl_.HAS_SNI -assert_fingerprint = ssl_.assert_fingerprint -resolve_cert_reqs = ssl_.resolve_cert_reqs -resolve_ssl_version = ssl_.resolve_ssl_version -ssl_wrap_socket = ssl_.ssl_wrap_socket -current_time = timeout.current_time -Timeout = timeout.Timeout -Retry = retry.Retry -get_host = url.get_host -parse_url = url.parse_url -split_first = url.split_first -Url = url.Url diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/connection.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/connection.pyi deleted file mode 100644 index cfd53aca9738..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/connection.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Stubs for requests.packages.urllib3.util.connection (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -poll = ... # type: Any -select = ... # type: Any - -def is_connection_dropped(conn): ... -def create_connection(address, timeout=..., source_address=None, socket_options=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/request.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/request.pyi deleted file mode 100644 index 8eb9f3a7e04d..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/request.pyi +++ /dev/null @@ -1,12 +0,0 @@ -# Stubs for requests.packages.urllib3.util.request (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -#from ..packages import six - -#b = six.b - -ACCEPT_ENCODING = ... # type: Any - -def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/response.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/response.pyi deleted file mode 100644 index 761a00679554..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/response.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for requests.packages.urllib3.util.response (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def is_fp_closed(obj): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/retry.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/retry.pyi deleted file mode 100644 index a4ff661a6585..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/retry.pyi +++ /dev/null @@ -1,36 +0,0 @@ -# Stubs for requests.packages.urllib3.util.retry (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions -from .. import packages - -ConnectTimeoutError = exceptions.ConnectTimeoutError -MaxRetryError = exceptions.MaxRetryError -ProtocolError = exceptions.ProtocolError -ReadTimeoutError = exceptions.ReadTimeoutError -ResponseError = exceptions.ResponseError - -log = ... # type: Any - -class Retry: - DEFAULT_METHOD_WHITELIST = ... # type: Any - BACKOFF_MAX = ... # type: Any - total = ... # type: Any - connect = ... # type: Any - read = ... # type: Any - redirect = ... # type: Any - status_forcelist = ... # type: Any - method_whitelist = ... # type: Any - backoff_factor = ... # type: Any - raise_on_redirect = ... # type: Any - def __init__(self, total=10, connect=None, read=None, redirect=None, method_whitelist=..., status_forcelist=None, backoff_factor=0, raise_on_redirect=True, _observed_errors=0): ... - def new(self, **kw): ... - @classmethod - def from_int(cls, retries, redirect=True, default=None): ... - def get_backoff_time(self): ... - def sleep(self): ... - def is_forced_retry(self, method, status_code): ... - def is_exhausted(self): ... - def increment(self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/ssl_.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/ssl_.pyi deleted file mode 100644 index 3954484d80c7..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/ssl_.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# Stubs for requests.packages.urllib3.util.ssl_ (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions -import ssl - -SSLError = exceptions.SSLError -InsecurePlatformWarning = exceptions.InsecurePlatformWarning -SSLContext = ssl.SSLContext - -HAS_SNI = ... # type: Any -create_default_context = ... # type: Any -OP_NO_SSLv2 = ... # type: Any -OP_NO_SSLv3 = ... # type: Any -OP_NO_COMPRESSION = ... # type: Any - -def assert_fingerprint(cert, fingerprint): ... -def resolve_cert_reqs(candidate): ... -def resolve_ssl_version(candidate): ... -def create_urllib3_context(ssl_version=None, cert_reqs=..., options=None, ciphers=None): ... -def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None, ca_certs=None, - server_hostname=None, ssl_version=None, ciphers=None, ssl_context=None): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/timeout.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/timeout.pyi deleted file mode 100644 index 8bad19567e74..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/timeout.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# Stubs for requests.packages.urllib3.util.timeout (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions - -TimeoutStateError = exceptions.TimeoutStateError - -def current_time(): ... - -class Timeout: - DEFAULT_TIMEOUT = ... # type: Any - total = ... # type: Any - def __init__(self, total=None, connect=..., read=...): ... - @classmethod - def from_float(cls, timeout): ... - def clone(self): ... - def start_connect(self): ... - def get_connect_duration(self): ... - @property - def connect_timeout(self): ... - @property - def read_timeout(self): ... diff --git a/stubs/third-party-3.2/requests/packages/urllib3/util/url.pyi b/stubs/third-party-3.2/requests/packages/urllib3/util/url.pyi deleted file mode 100644 index ca6b03144208..000000000000 --- a/stubs/third-party-3.2/requests/packages/urllib3/util/url.pyi +++ /dev/null @@ -1,26 +0,0 @@ -# Stubs for requests.packages.urllib3.util.url (Python 3.4) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .. import exceptions - -LocationParseError = exceptions.LocationParseError - -url_attrs = ... # type: Any - -class Url: - slots = ... # type: Any - def __new__(cls, scheme=None, auth=None, host=None, port=None, path=None, query=None, fragment=None): ... - @property - def hostname(self): ... - @property - def request_uri(self): ... - @property - def netloc(self): ... - @property - def url(self): ... - -def split_first(s, delims): ... -def parse_url(url): ... -def get_host(url): ... diff --git a/stubs/third-party-3.2/requests/sessions.pyi b/stubs/third-party-3.2/requests/sessions.pyi deleted file mode 100644 index 5deb9983a3cb..000000000000 --- a/stubs/third-party-3.2/requests/sessions.pyi +++ /dev/null @@ -1,92 +0,0 @@ -# Stubs for requests.sessions (Python 3) - -from typing import Any, Union, MutableMapping -from . import auth -from . import compat -from . import cookies -from . import models -from .models import Response -from . import hooks -from . import utils -from . import exceptions -from .packages.urllib3 import _collections -from . import structures -from . import adapters -from . import status_codes - -OrderedDict = compat.OrderedDict -cookiejar_from_dict = cookies.cookiejar_from_dict -extract_cookies_to_jar = cookies.extract_cookies_to_jar -RequestsCookieJar = cookies.RequestsCookieJar -merge_cookies = cookies.merge_cookies -Request = models.Request -PreparedRequest = models.PreparedRequest -DEFAULT_REDIRECT_LIMIT = models.DEFAULT_REDIRECT_LIMIT -default_hooks = hooks.default_hooks -dispatch_hook = hooks.dispatch_hook -to_key_val_list = utils.to_key_val_list -default_headers = utils.default_headers -to_native_string = utils.to_native_string -TooManyRedirects = exceptions.TooManyRedirects -InvalidSchema = exceptions.InvalidSchema -ChunkedEncodingError = exceptions.ChunkedEncodingError -ContentDecodingError = exceptions.ContentDecodingError -RecentlyUsedContainer = _collections.RecentlyUsedContainer -CaseInsensitiveDict = structures.CaseInsensitiveDict -HTTPAdapter = adapters.HTTPAdapter -requote_uri = utils.requote_uri -get_environ_proxies = utils.get_environ_proxies -get_netrc_auth = utils.get_netrc_auth -should_bypass_proxies = utils.should_bypass_proxies -get_auth_from_url = utils.get_auth_from_url -codes = status_codes.codes -REDIRECT_STATI = models.REDIRECT_STATI - -REDIRECT_CACHE_SIZE = ... # type: Any - -def merge_setting(request_setting, session_setting, dict_class=...): ... -def merge_hooks(request_hooks, session_hooks, dict_class=...): ... - -class SessionRedirectMixin: - def resolve_redirects(self, resp, req, stream=False, timeout=None, verify=True, cert=None, - proxies=None): ... - def rebuild_auth(self, prepared_request, response): ... - def rebuild_proxies(self, prepared_request, proxies): ... - -class Session(SessionRedirectMixin): - __attrs__ = ... # type: Any - headers = ... # type: MutableMapping[str, str] - auth = ... # type: Any - proxies = ... # type: Any - hooks = ... # type: Any - params = ... # type: Any - stream = ... # type: Any - verify = ... # type: Any - cert = ... # type: Any - max_redirects = ... # type: Any - trust_env = ... # type: Any - cookies = ... # type: Any - adapters = ... # type: Any - redirect_cache = ... # type: Any - def __init__(self) -> None: ... - def __enter__(self) -> 'Session': ... - def __exit__(self, *args) -> None: ... - def prepare_request(self, request): ... - def request(self, method: str, url: Union[str, bytes], params=None, data=None, headers=None, - cookies=None, files=None, auth=None, timeout=None, allow_redirects=True, - proxies=None, hooks=None, stream=None, verify=None, cert=None, - json=None) -> Response: ... - def get(self, url: Union[str, bytes], **kwargs) -> Response: ... - def options(self, url: Union[str, bytes], **kwargs) -> Response: ... - def head(self, url: Union[str, bytes], **kwargs) -> Response: ... - def post(self, url: Union[str, bytes], data=None, json=None, **kwargs) -> Response: ... - def put(self, url: Union[str, bytes], data=None, **kwargs) -> Response: ... - def patch(self, url: Union[str, bytes], data=None, **kwargs) -> Response: ... - def delete(self, url: Union[str, bytes], **kwargs) -> Response: ... - def send(self, request, **kwargs): ... - def merge_environment_settings(self, url, proxies, stream, verify, cert): ... - def get_adapter(self, url): ... - def close(self) -> None: ... - def mount(self, prefix, adapter): ... - -def session() -> Session: ... diff --git a/stubs/third-party-3.2/requests/status_codes.pyi b/stubs/third-party-3.2/requests/status_codes.pyi deleted file mode 100644 index e3035eb9163a..000000000000 --- a/stubs/third-party-3.2/requests/status_codes.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for requests.status_codes (Python 3) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .structures import LookupDict - -codes = ... # type: Any diff --git a/stubs/third-party-3.2/requests/structures.pyi b/stubs/third-party-3.2/requests/structures.pyi deleted file mode 100644 index 6d9e0da59f46..000000000000 --- a/stubs/third-party-3.2/requests/structures.pyi +++ /dev/null @@ -1,21 +0,0 @@ -# Stubs for requests.structures (Python 3) - -from typing import Any -import collections - -class CaseInsensitiveDict(collections.MutableMapping): - def __init__(self, data=None, **kwargs): ... - def __setitem__(self, key, value): ... - def __getitem__(self, key): ... - def __delitem__(self, key): ... - def __iter__(self): ... - def __len__(self): ... - def lower_items(self): ... - def __eq__(self, other): ... - def copy(self): ... - -class LookupDict(dict): - name = ... # type: Any - def __init__(self, name=None): ... - def __getitem__(self, key): ... - def get(self, key, default=None): ... diff --git a/stubs/third-party-3.2/requests/utils.pyi b/stubs/third-party-3.2/requests/utils.pyi deleted file mode 100644 index 99a89f4962c5..000000000000 --- a/stubs/third-party-3.2/requests/utils.pyi +++ /dev/null @@ -1,52 +0,0 @@ -# Stubs for requests.utils (Python 3) - -from typing import Any -from . import compat -from . import cookies -from . import structures -from . import exceptions - -OrderedDict = compat.OrderedDict -RequestsCookieJar = cookies.RequestsCookieJar -cookiejar_from_dict = cookies.cookiejar_from_dict -CaseInsensitiveDict = structures.CaseInsensitiveDict -InvalidURL = exceptions.InvalidURL - -NETRC_FILES = ... # type: Any -DEFAULT_CA_BUNDLE_PATH = ... # type: Any - -def dict_to_sequence(d): ... -def super_len(o): ... -def get_netrc_auth(url): ... -def guess_filename(obj): ... -def from_key_val_list(value): ... -def to_key_val_list(value): ... -def parse_list_header(value): ... -def parse_dict_header(value): ... -def unquote_header_value(value, is_filename=False): ... -def dict_from_cookiejar(cj): ... -def add_dict_to_cookiejar(cj, cookie_dict): ... -def get_encodings_from_content(content): ... -def get_encoding_from_headers(headers): ... -def stream_decode_response_unicode(iterator, r): ... -def iter_slices(string, slice_length): ... -def get_unicode_from_response(r): ... - -UNRESERVED_SET = ... # type: Any - -def unquote_unreserved(uri): ... -def requote_uri(uri): ... -def address_in_network(ip, net): ... -def dotted_netmask(mask): ... -def is_ipv4_address(string_ip): ... -def is_valid_cidr(string_network): ... -def should_bypass_proxies(url): ... -def get_environ_proxies(url): ... -def default_user_agent(name=''): ... -def default_headers(): ... -def parse_header_links(value): ... -def guess_json_utf(data): ... -def prepend_scheme_if_needed(url, new_scheme): ... -def get_auth_from_url(url): ... -def to_native_string(string, encoding=''): ... -def urldefragauth(url): ... diff --git a/travis.sh b/travis.sh index 874c22772aa9..6b4f130388f1 100755 --- a/travis.sh +++ b/travis.sh @@ -38,12 +38,15 @@ done STUBTEST=_test_stubs.py echo "import typing" > $STUBTEST -cd stubs/3.2 -ls *.pyi | sed s/\\.pyi//g | sed "s/^/import /g" >> ../../$STUBTEST +for subdir in typeshed/builtins/3* typeshed/stdlib/3*; do + pushd $subdir > /dev/null + import=$(ls *.pyi | sed s/\\.pyi//g | sed "s/^/import /g") + popd > /dev/null + echo "$import" >> $STUBTEST +done for m in os os.path; do - echo "import $m" >> ../../$STUBTEST + echo "import $m" >> $STUBTEST done -cd ../.. NUMSTUBS=$(( `wc -l $STUBTEST | cut -d' ' -f1` - 1 )) diff --git a/typeshed b/typeshed new file mode 160000 index 000000000000..337abed05a35 --- /dev/null +++ b/typeshed @@ -0,0 +1 @@ +Subproject commit 337abed05a35f0c5b67c02d42bca0af1e2adc76e From f5b2af441e50de796f94d583225889d7fbb426d4 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 30 Sep 2015 10:23:05 -0700 Subject: [PATCH 02/12] adjust setup.py to use typeshed directory --- setup.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 69553acb483e..122d93e6f950 100644 --- a/setup.py +++ b/setup.py @@ -28,21 +28,22 @@ stubs = [] -for py_version in ['3.4', '3.3', '3.2', '2.7']: - base = os.path.join('stubs', py_version) - if not os.path.exists(base): - os.mkdir(base) - - stub_dirs = [''] - for root, dirs, files in os.walk(base): - stub_dirs.extend(os.path.relpath(os.path.join(root, stub_dir), base) - for stub_dir in dirs - if stub_dir != '__pycache__') - for stub_dir in stub_dirs: - target = os.path.join('lib', 'mypy', 'stubs', py_version, stub_dir) - files = glob.glob(os.path.join(base, stub_dir, '*.py')) - files += glob.glob(os.path.join(base, stub_dir, '*.pyi')) - stubs.append((target, files)) +for stub_type in ["builtins", "stdlib", "third_party"]: + for py_version in ['2and3', '2.7', '3' '3.2', '3.3', '3.3', '3.4', '3.5']: + base = os.path.join('typeshed', stub_type, py_version) + if not os.path.exists(base): + os.mkdir(base) + stub_dirs = [''] + for root, dirs, files in os.walk(base): + stub_dirs.extend(os.path.relpath(os.path.join(root, stub_dir), base) + for stub_dir in dirs + if stub_dir != '__pycache__') + for stub_dir in stub_dirs: + target = os.path.join('lib', 'mypy', 'typeshed', + stub_type, py_version, stub_dir) + files = glob.glob(os.path.join(base, stub_dir, '*.py')) + files += glob.glob(os.path.join(base, stub_dir, '*.pyi')) + stubs.append((target, files)) classifiers = [ 'Development Status :: 2 - Pre-Alpha', From 6669a99e7f36711e1dc08323d49f23eedb564e31 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 30 Sep 2015 11:55:50 -0700 Subject: [PATCH 03/12] Switch to 'master' branch of typeshed. This includes fixes to _random, cStringIO, errno, operator, sys, zlib, etc. --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index 337abed05a35..bb65ba14bdd1 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit 337abed05a35f0c5b67c02d42bca0af1e2adc76e +Subproject commit bb65ba14bdd148ae16a766aee561aec23044cf47 From 9f601497b5146fcfd251f7ac4c1c8d0b32b2797a Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 1 Oct 2015 15:34:46 -0700 Subject: [PATCH 04/12] update typeshed to latest version --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index bb65ba14bdd1..001e5af0fa31 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit bb65ba14bdd148ae16a766aee561aec23044cf47 +Subproject commit 001e5af0fa31eca51e9a5dd4a180ee49afc7120e From 38ed698f7fbac8ff6f193e81a8230af43096471e Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Oct 2015 14:25:19 -0700 Subject: [PATCH 05/12] fix typshed path in runtests.py --- runtests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runtests.py b/runtests.py index 462fa1491369..0616effc4a51 100755 --- a/runtests.py +++ b/runtests.py @@ -219,15 +219,16 @@ def add_stubs(driver: Driver) -> None: # Only test each module once, for the latest Python version supported. # The third-party stub modules will only be used if it is not in the version. seen = set() # type: Set[str] - for version in driver.versions: - for pfx in ['', 'third-party-']: - stubdir = join('stubs', pfx + version) + # TODO: This should also test Python 2, and pass pyversion accordingly. + for version in ["2and3", "3", "3.3", "3.4", "3.5"]: + for stub_type in ['builtins', 'stdlib', 'third_party']: + stubdir = join('typeshed', stub_type, version) for f in find_files(stubdir, suffix='.pyi'): module = file_to_module(f[len(stubdir) + 1:]) if module not in seen: seen.add(module) driver.add_mypy_string( - 'stub (%s) module %s' % (pfx + version, module), + 'stub (%s) module %s' % (stubdir, module), 'import typing, %s' % module) From 8055619022ded32d35dcfa9dfe8d77ec3b86e57c Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Oct 2015 14:28:14 -0700 Subject: [PATCH 06/12] Upgrade typeshed to latest version. (This adds lxml/ertree.pyi.) --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index 001e5af0fa31..060c2e564810 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit 001e5af0fa31eca51e9a5dd4a180ee49afc7120e +Subproject commit 060c2e564810f413252372a658022c99fe6c0108 From 271f95ac0397cd93291910eef330c7662da5fd10 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Oct 2015 14:33:15 -0700 Subject: [PATCH 07/12] fix third-party path, update typeshed --- mypy/build.py | 2 +- typeshed | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy/build.py b/mypy/build.py index e220d4dbf74d..ac03293db7ba 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -222,7 +222,7 @@ def default_lib_path(data_dir: str, target: int, pyversion: Tuple[int, int], for minor in reversed(range(pyversion[1] + 1))] # E.g. for Python 3.5, try 2and3/, then 3/, then 3.5/, then 3.4/, 3.3/, ... for v in ['2and3', str(pyversion[0])] + versions: - for lib_type in ['stdlib', 'builtins', 'third-party']: + for lib_type in ['stdlib', 'builtins', 'third_party']: stubdir = os.path.join(data_dir, 'typeshed', lib_type, v) if os.path.isdir(stubdir): path.append(stubdir) diff --git a/typeshed b/typeshed index 060c2e564810..ea123785121a 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit 060c2e564810f413252372a658022c99fe6c0108 +Subproject commit ea123785121ae5e0458f1965dfdb87352f18a6fc From 194b0bf875153860f4c336d1fde6030ce2d1d962 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Oct 2015 15:28:55 -0700 Subject: [PATCH 08/12] upgrade typeshed (includes httplib3 fix) --- typeshed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeshed b/typeshed index ea123785121a..e4a7edb949e0 160000 --- a/typeshed +++ b/typeshed @@ -1 +1 @@ -Subproject commit ea123785121ae5e0458f1965dfdb87352f18a6fc +Subproject commit e4a7edb949e0b920b16f61aeeb19fc3d328f3012 From 662374624e4e62f5f22a869009163cb32c3692da Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 14 Oct 2015 06:02:30 -0700 Subject: [PATCH 09/12] fix typeshed directory in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0a0caa15075a..45a096d71d32 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def find_data_files(base, globs): data_files = [] -data_files += find_data_files('stubs', ['*.py', '*.pyi']) +data_files += find_data_files('typeshed', ['*.py', '*.pyi']) data_files += find_data_files('xml', ['*.xsd', '*.xslt', '*.css']) From b5e5006753c992684d9efa90373b2c7032401007 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 14 Oct 2015 06:38:45 -0700 Subject: [PATCH 10/12] Add a note about typeshed to README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5c2703941a..26820bd1ce25 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Quick start for contributing to mypy If you want to contribute, first clone the mypy git repository: - $ git clone https://github.com/JukkaL/mypy.git + $ git clone --recurse-submodules https://github.com/JukkaL/mypy.git Run the supplied `setup.py` script to install mypy: @@ -130,6 +130,19 @@ The mypy wiki contains some useful information for contributors: http://www.mypy-lang.org/wiki/DeveloperGuides +Working with the git version of mypy +------------------------------------ + +mypy contains a submodule, "typeshed". See http://github.com/python/typeshed. +This submodule contains types for the Python standard library. + +Due to the way git submodules work, you'll have to do +``` + git submodule update typeshed +``` +whenever you change branches, merge, rebase, or pull. + +(It's possible to automate this: Search Google for "git hook update submodule") Running tests and linting ------------------------- From 14d9ab4034945f3f2ccd00d641f0c8cff176067f Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 14 Oct 2015 06:47:29 -0700 Subject: [PATCH 11/12] mention typeshed in basics.rst --- docs/source/basics.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/source/basics.rst b/docs/source/basics.rst index fd30da3365d1..f95b4886c45f 100644 --- a/docs/source/basics.rst +++ b/docs/source/basics.rst @@ -124,8 +124,8 @@ explains how to download and install mypy. .. _library-stubs: -Library stubs -************* +Typeshed +******** In order to type check code that uses library modules such as those included in the Python standard library, you need to have library @@ -141,8 +141,9 @@ For example, consider this code: Without a library stub, the type checker has no way of inferring the type of ``x`` and checking that the argument to ``chr`` has a valid -type. Mypy comes with a library stub for Python builtins that contains -a definition like this for ``chr``: +type. Mypy contains the `typeshed http://github.com/python/typeshed`_ project, +which contains library stubs for Python builtins that contains a definition +like this for ``chr``: .. code-block:: python @@ -167,9 +168,13 @@ for module ``csv``, and use a subdirectory with ``__init__.pyi`` for packages. If there is both a ``.py`` and a ``.pyi`` file for a module, the ``.pyi`` file takes precedence. This way you can easily add annotations for a module even if you don't want to modify the source code. This can be useful, for example, if you -use 3rd party open source libraries in your program. You can also override the stubs -mypy uses for standard libary modules, in case you need to make local -modifications. +use 3rd party open source libraries in your program. + +You can also override the stubs mypy uses for standard libary modules, in case +you need to make local modifications. (Note that if you want to submit your +changes, please submit a pull request to `typeshed http://github.com/python/typeshed`_ +first, and then update the submodule in mypy using a commit that only touches +the typeshed submodule and nothing else) That's it! Now you can access the module in mypy programs and type check code that uses the library. If you write a stub for a library module, From 040bcd93e7c998d52a0cee35b03cbeb2fd676d3a Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 14 Oct 2015 06:48:44 -0700 Subject: [PATCH 12/12] fix sphinx urls --- docs/source/basics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/basics.rst b/docs/source/basics.rst index f95b4886c45f..42ed1855c74a 100644 --- a/docs/source/basics.rst +++ b/docs/source/basics.rst @@ -141,7 +141,7 @@ For example, consider this code: Without a library stub, the type checker has no way of inferring the type of ``x`` and checking that the argument to ``chr`` has a valid -type. Mypy contains the `typeshed http://github.com/python/typeshed`_ project, +type. Mypy contains the `typeshed `_ project, which contains library stubs for Python builtins that contains a definition like this for ``chr``: @@ -172,7 +172,7 @@ use 3rd party open source libraries in your program. You can also override the stubs mypy uses for standard libary modules, in case you need to make local modifications. (Note that if you want to submit your -changes, please submit a pull request to `typeshed http://github.com/python/typeshed`_ +changes, please submit a pull request to `typeshed `_ first, and then update the submodule in mypy using a commit that only touches the typeshed submodule and nothing else)