From 1626c250874ec154625ea33e8bbef8be73260f6f Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 16 Jan 2016 16:56:25 -0500 Subject: [PATCH] Add some third_party modules. backports_abc and singledispatch were made with stubgen, certifi was written by hand, and ssl_match_hostname was copied from ssl.pyi. --- third_party/2and3/backports/__init__.pyi | 0 .../2and3/backports/ssl_match_hostname.pyi | 3 +++ third_party/2and3/backports_abc.pyi | 19 +++++++++++++++++++ third_party/2and3/certifi.pyi | 2 ++ third_party/2and3/singledispatch.pyi | 5 +++++ 5 files changed, 29 insertions(+) create mode 100644 third_party/2and3/backports/__init__.pyi create mode 100644 third_party/2and3/backports/ssl_match_hostname.pyi create mode 100644 third_party/2and3/backports_abc.pyi create mode 100644 third_party/2and3/certifi.pyi create mode 100644 third_party/2and3/singledispatch.pyi diff --git a/third_party/2and3/backports/__init__.pyi b/third_party/2and3/backports/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/third_party/2and3/backports/ssl_match_hostname.pyi b/third_party/2and3/backports/ssl_match_hostname.pyi new file mode 100644 index 000000000..c21998013 --- /dev/null +++ b/third_party/2and3/backports/ssl_match_hostname.pyi @@ -0,0 +1,3 @@ +class CertificateError(ValueError): ... + +def match_hostname(cert, hostname): ... diff --git a/third_party/2and3/backports_abc.pyi b/third_party/2and3/backports_abc.pyi new file mode 100644 index 000000000..a82293fa4 --- /dev/null +++ b/third_party/2and3/backports_abc.pyi @@ -0,0 +1,19 @@ +# Stubs for backports_abc (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +def mk_gen(): ... +def mk_awaitable(): ... +def mk_coroutine(): ... + +Generator = ... # type: Any +Awaitable = ... # type: Any +Coroutine = ... # type: Any + +def isawaitable(obj): ... + +PATCHED = ... # type: Any + +def patch(patch_inspect=True): ... diff --git a/third_party/2and3/certifi.pyi b/third_party/2and3/certifi.pyi new file mode 100644 index 000000000..c809e6d49 --- /dev/null +++ b/third_party/2and3/certifi.pyi @@ -0,0 +1,2 @@ +def where() -> str: ... +def old_where() -> str: ... diff --git a/third_party/2and3/singledispatch.pyi b/third_party/2and3/singledispatch.pyi new file mode 100644 index 000000000..dac3ceae8 --- /dev/null +++ b/third_party/2and3/singledispatch.pyi @@ -0,0 +1,5 @@ +# Stubs for singledispatch (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def singledispatch(func): ...