mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 00:58:28 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
2
third_party/3/contextvars.pyi
vendored
2
third_party/3/contextvars.pyi
vendored
@@ -1,6 +1,6 @@
|
||||
from typing import Any, Callable, ClassVar, Generic, Iterator, Mapping, TypeVar
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class ContextVar(Generic[_T]):
|
||||
def __init__(self, name: str, *, default: _T = ...) -> None: ...
|
||||
|
||||
78
third_party/3/dataclasses.pyi
vendored
78
third_party/3/dataclasses.pyi
vendored
@@ -1,32 +1,26 @@
|
||||
from typing import overload, Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union
|
||||
from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union, overload
|
||||
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class _MISSING_TYPE: ...
|
||||
MISSING: _MISSING_TYPE
|
||||
|
||||
MISSING: _MISSING_TYPE
|
||||
@overload
|
||||
def asdict(obj: Any) -> Dict[str, Any]: ...
|
||||
@overload
|
||||
def asdict(obj: Any, *, dict_factory: Callable[[List[Tuple[str, Any]]], _T]) -> _T: ...
|
||||
|
||||
@overload
|
||||
def astuple(obj: Any) -> Tuple[Any, ...]: ...
|
||||
@overload
|
||||
def astuple(obj: Any, *, tuple_factory: Callable[[List[Any]], _T]) -> _T: ...
|
||||
|
||||
|
||||
@overload
|
||||
def dataclass(_cls: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
@overload
|
||||
def dataclass(_cls: None) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
@overload
|
||||
def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ...,
|
||||
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
def dataclass(
|
||||
*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ...
|
||||
) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
class Field(Generic[_T]):
|
||||
name: str
|
||||
@@ -39,36 +33,54 @@ class Field(Generic[_T]):
|
||||
compare: bool
|
||||
metadata: Mapping[str, Any]
|
||||
|
||||
|
||||
# NOTE: Actual return type is 'Field[_T]', but we want to help type checkers
|
||||
# to understand the magic that happens at runtime.
|
||||
@overload # `default` and `default_factory` are optional and mutually exclusive.
|
||||
def field(*, default: _T,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
def field(
|
||||
*,
|
||||
default: _T,
|
||||
init: bool = ...,
|
||||
repr: bool = ...,
|
||||
hash: Optional[bool] = ...,
|
||||
compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...,
|
||||
) -> _T: ...
|
||||
@overload
|
||||
def field(*, default_factory: Callable[[], _T],
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
def field(
|
||||
*,
|
||||
default_factory: Callable[[], _T],
|
||||
init: bool = ...,
|
||||
repr: bool = ...,
|
||||
hash: Optional[bool] = ...,
|
||||
compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...,
|
||||
) -> _T: ...
|
||||
@overload
|
||||
def field(*,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
|
||||
|
||||
def field(
|
||||
*,
|
||||
init: bool = ...,
|
||||
repr: bool = ...,
|
||||
hash: Optional[bool] = ...,
|
||||
compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...,
|
||||
) -> Any: ...
|
||||
def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ...
|
||||
|
||||
def is_dataclass(obj: Any) -> bool: ...
|
||||
|
||||
class FrozenInstanceError(AttributeError): ...
|
||||
|
||||
class InitVar(Generic[_T]): ...
|
||||
|
||||
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ...,
|
||||
frozen: bool = ...) -> type: ...
|
||||
|
||||
def make_dataclass(
|
||||
cls_name: str,
|
||||
fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]],
|
||||
*,
|
||||
bases: Tuple[type, ...] = ...,
|
||||
namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ...,
|
||||
repr: bool = ...,
|
||||
eq: bool = ...,
|
||||
order: bool = ...,
|
||||
unsafe_hash: bool = ...,
|
||||
frozen: bool = ...,
|
||||
) -> type: ...
|
||||
def replace(obj: _T, **changes: Any) -> _T: ...
|
||||
|
||||
6
third_party/3/docutils/nodes.pyi
vendored
6
third_party/3/docutils/nodes.pyi
vendored
@@ -1,10 +1,6 @@
|
||||
from typing import Any, List
|
||||
|
||||
class reference:
|
||||
def __init__(self,
|
||||
rawsource: str = ...,
|
||||
text: str = ...,
|
||||
*children: List[Any],
|
||||
**attributes) -> None: ...
|
||||
def __init__(self, rawsource: str = ..., text: str = ..., *children: List[Any], **attributes) -> None: ...
|
||||
|
||||
def __getattr__(name) -> Any: ...
|
||||
|
||||
5
third_party/3/docutils/parsers/rst/roles.pyi
vendored
5
third_party/3/docutils/parsers/rst/roles.pyi
vendored
@@ -1,13 +1,12 @@
|
||||
from typing import Any, Callable, Dict, List, Tuple
|
||||
|
||||
import docutils.nodes
|
||||
import docutils.parsers.rst.states
|
||||
|
||||
from typing import Callable, Any, List, Dict, Tuple
|
||||
|
||||
_RoleFn = Callable[
|
||||
[str, str, str, int, docutils.parsers.rst.states.Inliner, Dict[str, Any], List[str]],
|
||||
Tuple[List[docutils.nodes.reference], List[docutils.nodes.reference]],
|
||||
]
|
||||
|
||||
def register_local_role(name: str, role_fn: _RoleFn) -> None: ...
|
||||
|
||||
def __getattr__(name: str) -> Any: ... # incomplete
|
||||
|
||||
@@ -2,7 +2,6 @@ import typing
|
||||
from typing import Any
|
||||
|
||||
class Inliner:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def __getattr__(name) -> Any: ...
|
||||
|
||||
28
third_party/3/jwt/__init__.pyi
vendored
28
third_party/3/jwt/__init__.pyi
vendored
@@ -1,18 +1,24 @@
|
||||
from typing import Mapping, Any, Optional, Union, Dict
|
||||
from typing import Any, Dict, Mapping, Optional, Union
|
||||
|
||||
from . import algorithms
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
from . import algorithms
|
||||
|
||||
def decode(jwt: Union[str, bytes], key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey] = ...,
|
||||
verify: bool = ..., algorithms: Optional[Any] = ...,
|
||||
options: Optional[Mapping[Any, Any]] = ...,
|
||||
**kwargs: Any) -> Dict[str, Any]: ...
|
||||
|
||||
def encode(payload: Mapping[str, Any], key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey],
|
||||
algorithm: str = ..., headers: Optional[Mapping[str, Any]] = ...,
|
||||
json_encoder: Optional[Any] = ...) -> bytes: ...
|
||||
|
||||
def decode(
|
||||
jwt: Union[str, bytes],
|
||||
key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey] = ...,
|
||||
verify: bool = ...,
|
||||
algorithms: Optional[Any] = ...,
|
||||
options: Optional[Mapping[Any, Any]] = ...,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]: ...
|
||||
def encode(
|
||||
payload: Mapping[str, Any],
|
||||
key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey],
|
||||
algorithm: str = ...,
|
||||
headers: Optional[Mapping[str, Any]] = ...,
|
||||
json_encoder: Optional[Any] = ...,
|
||||
) -> bytes: ...
|
||||
def register_algorithm(alg_id: str, alg_obj: algorithms.Algorithm[Any]) -> None: ...
|
||||
def unregister_algorithm(alg_id: str) -> None: ...
|
||||
|
||||
|
||||
2
third_party/3/jwt/algorithms.pyi
vendored
2
third_party/3/jwt/algorithms.pyi
vendored
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from hashlib import _Hash
|
||||
from typing import Any, Set, Dict, Optional, ClassVar, Union, Generic, TypeVar
|
||||
from typing import Any, ClassVar, Dict, Generic, Optional, Set, TypeVar, Union
|
||||
|
||||
requires_cryptography = Set[str]
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
from jwt.algorithms import Algorithm
|
||||
|
||||
from . import _HashAlg
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
from jwt.algorithms import Algorithm
|
||||
|
||||
from . import _HashAlg
|
||||
|
||||
6
third_party/3/orjson.pyi
vendored
6
third_party/3/orjson.pyi
vendored
@@ -2,11 +2,7 @@ from typing import Any, Callable, Optional, Union
|
||||
|
||||
__version__ = str
|
||||
|
||||
def dumps(
|
||||
__obj: Any,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
option: Optional[int] = ...,
|
||||
) -> bytes: ...
|
||||
def dumps(__obj: Any, default: Optional[Callable[[Any], Any]] = ..., option: Optional[int] = ...,) -> bytes: ...
|
||||
def loads(__obj: Union[bytes, bytearray, str]) -> Any: ...
|
||||
|
||||
class JSONDecodeError(ValueError): ...
|
||||
|
||||
4
third_party/3/pkg_resources/__init__.pyi
vendored
4
third_party/3/pkg_resources/__init__.pyi
vendored
@@ -1,10 +1,10 @@
|
||||
# Stubs for pkg_resources (Python 3.4)
|
||||
|
||||
from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Set, Union, TypeVar, overload
|
||||
from abc import ABCMeta
|
||||
import importlib.abc
|
||||
import types
|
||||
import zipimport
|
||||
from abc import ABCMeta
|
||||
from typing import IO, Any, Callable, Dict, Generator, Iterable, List, Optional, Sequence, Set, Tuple, TypeVar, Union, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_NestedStr = Union[str, Iterable[Union[str, Iterable[Any]]]]
|
||||
|
||||
2
third_party/3/pkg_resources/py31compat.pyi
vendored
2
third_party/3/pkg_resources/py31compat.pyi
vendored
@@ -1,6 +1,6 @@
|
||||
from typing import Text
|
||||
import os
|
||||
import sys
|
||||
from typing import Text
|
||||
|
||||
needs_makedirs: bool
|
||||
|
||||
|
||||
42
third_party/3/six/__init__.pyi
vendored
42
third_party/3/six/__init__.pyi
vendored
@@ -1,5 +1,11 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import types
|
||||
import typing
|
||||
import unittest
|
||||
from builtins import next as next
|
||||
from functools import wraps as wraps
|
||||
from io import BytesIO as BytesIO, StringIO as StringIO
|
||||
from typing import (
|
||||
Any,
|
||||
AnyStr,
|
||||
@@ -20,18 +26,12 @@ from typing import (
|
||||
ValuesView,
|
||||
overload,
|
||||
)
|
||||
import types
|
||||
import typing
|
||||
import unittest
|
||||
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
from builtins import next as next
|
||||
from functools import wraps as wraps
|
||||
from . import moves
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_K = TypeVar('_K')
|
||||
_V = TypeVar('_V')
|
||||
_T = TypeVar("_T")
|
||||
_K = TypeVar("_K")
|
||||
_V = TypeVar("_V")
|
||||
|
||||
__version__: str
|
||||
|
||||
@@ -41,16 +41,15 @@ PY2 = False
|
||||
PY3 = True
|
||||
PY34: bool
|
||||
|
||||
string_types = str,
|
||||
integer_types = int,
|
||||
class_types = type,
|
||||
string_types = (str,)
|
||||
integer_types = (int,)
|
||||
class_types = (type,)
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
|
||||
MAXSIZE: int
|
||||
|
||||
def callable(obj: object) -> bool: ...
|
||||
|
||||
def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ...
|
||||
def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ...
|
||||
def create_unbound_method(func: types.FunctionType, cls: type) -> types.FunctionType: ...
|
||||
@@ -63,35 +62,38 @@ def get_function_closure(fun: types.FunctionType) -> Optional[Tuple[types._Cell,
|
||||
def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
|
||||
def get_function_defaults(fun: types.FunctionType) -> Optional[Tuple[Any, ...]]: ...
|
||||
def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ...
|
||||
|
||||
def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ...
|
||||
def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ...
|
||||
def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ...
|
||||
|
||||
# def iterlists
|
||||
|
||||
def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ...
|
||||
def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ...
|
||||
def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ...
|
||||
|
||||
def b(s: str) -> binary_type: ...
|
||||
def u(s: str) -> text_type: ...
|
||||
|
||||
unichr = chr
|
||||
|
||||
def int2byte(i: int) -> bytes: ...
|
||||
def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = ...) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = ...) -> Any: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...) -> None: ...
|
||||
def assertRegex(
|
||||
self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...
|
||||
) -> None: ...
|
||||
|
||||
exec_ = exec
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def reraise(
|
||||
tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...
|
||||
) -> NoReturn: ...
|
||||
def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ...
|
||||
|
||||
print_ = print
|
||||
@@ -116,7 +118,9 @@ class MovedModule(_LazyDescriptor):
|
||||
class MovedAttribute(_LazyDescriptor):
|
||||
mod: str
|
||||
attr: str
|
||||
def __init__(self, name: str, old_mod: str, new_mod: str, old_attr: Optional[str] = ..., new_attr: Optional[str] = ...) -> None: ...
|
||||
def __init__(
|
||||
self, name: str, old_mod: str, new_mod: str, old_attr: Optional[str] = ..., new_attr: Optional[str] = ...
|
||||
) -> None: ...
|
||||
|
||||
def add_move(move: Union[MovedModule, MovedAttribute]) -> None: ...
|
||||
def remove_move(name: str) -> None: ...
|
||||
|
||||
106
third_party/3/six/moves/__init__.pyi
vendored
106
third_party/3/six/moves/__init__.pyi
vendored
@@ -3,67 +3,59 @@
|
||||
# Note: Commented out items means they weren't implemented at the time.
|
||||
# Uncomment them when the modules have been added to the typeshed.
|
||||
import sys
|
||||
|
||||
from io import StringIO as cStringIO
|
||||
from builtins import filter as filter
|
||||
from itertools import filterfalse as filterfalse
|
||||
from builtins import input as input
|
||||
from sys import intern as intern
|
||||
from builtins import map as map
|
||||
from os import getcwd as getcwd
|
||||
from os import getcwdb as getcwdb
|
||||
from builtins import range as range
|
||||
from builtins import filter as filter, input as input, map as map, range as xrange, zip as zip
|
||||
from collections import UserDict as UserDict, UserList as UserList, UserString as UserString
|
||||
from functools import reduce as reduce
|
||||
from shlex import quote as shlex_quote
|
||||
from importlib import reload as reload_module
|
||||
from io import StringIO as StringIO
|
||||
from collections import UserDict as UserDict
|
||||
from collections import UserList as UserList
|
||||
from collections import UserString as UserString
|
||||
from builtins import range as xrange
|
||||
from builtins import zip as zip
|
||||
from itertools import zip_longest as zip_longest
|
||||
from . import builtins
|
||||
from . import configparser
|
||||
# import copyreg as copyreg
|
||||
# import dbm.gnu as dbm_gnu
|
||||
from . import _dummy_thread
|
||||
from . import http_cookiejar
|
||||
from . import http_cookies
|
||||
from . import html_entities
|
||||
from . import html_parser
|
||||
from . import http_client
|
||||
from . import email_mime_multipart
|
||||
from . import email_mime_nonmultipart
|
||||
from . import email_mime_text
|
||||
from . import email_mime_base
|
||||
from . import BaseHTTPServer
|
||||
from . import CGIHTTPServer
|
||||
from . import SimpleHTTPServer
|
||||
from . import cPickle
|
||||
from . import queue
|
||||
from . import reprlib
|
||||
from . import socketserver
|
||||
from . import _thread
|
||||
from . import tkinter
|
||||
from . import tkinter_dialog
|
||||
from . import tkinter_filedialog
|
||||
# import tkinter.scrolledtext as tkinter_scrolledtext
|
||||
# import tkinter.simpledialog as tkinter_simpledialog
|
||||
# import tkinter.tix as tkinter_tix
|
||||
from . import tkinter_ttk
|
||||
from . import tkinter_constants
|
||||
# import tkinter.dnd as tkinter_dnd
|
||||
# import tkinter.colorchooser as tkinter_colorchooser
|
||||
from . import tkinter_commondialog
|
||||
from . import tkinter_tkfiledialog
|
||||
from itertools import filterfalse as filterfalse, zip_longest as zip_longest
|
||||
from os import getcwd as getcwd, getcwdb as getcwdb
|
||||
from shlex import quote as shlex_quote
|
||||
from sys import intern as intern
|
||||
|
||||
# import tkinter.font as tkinter_font
|
||||
# import tkinter.messagebox as tkinter_messagebox
|
||||
# import tkinter.simpledialog as tkinter_tksimpledialog
|
||||
from . import urllib_parse
|
||||
from . import urllib_error
|
||||
from . import urllib
|
||||
from . import urllib_robotparser
|
||||
# import tkinter.dnd as tkinter_dnd
|
||||
# import tkinter.colorchooser as tkinter_colorchooser
|
||||
# import tkinter.scrolledtext as tkinter_scrolledtext
|
||||
# import tkinter.simpledialog as tkinter_simpledialog
|
||||
# import tkinter.tix as tkinter_tix
|
||||
# import copyreg as copyreg
|
||||
# import dbm.gnu as dbm_gnu
|
||||
from . import (
|
||||
BaseHTTPServer,
|
||||
CGIHTTPServer,
|
||||
SimpleHTTPServer,
|
||||
_dummy_thread,
|
||||
_thread,
|
||||
builtins,
|
||||
configparser,
|
||||
cPickle,
|
||||
email_mime_base,
|
||||
email_mime_multipart,
|
||||
email_mime_nonmultipart,
|
||||
email_mime_text,
|
||||
html_entities,
|
||||
html_parser,
|
||||
http_client,
|
||||
http_cookiejar,
|
||||
http_cookies,
|
||||
queue,
|
||||
reprlib,
|
||||
socketserver,
|
||||
tkinter,
|
||||
tkinter_commondialog,
|
||||
tkinter_constants,
|
||||
tkinter_dialog,
|
||||
tkinter_filedialog,
|
||||
tkinter_tkfiledialog,
|
||||
tkinter_ttk,
|
||||
urllib,
|
||||
urllib_error,
|
||||
urllib_parse,
|
||||
urllib_robotparser,
|
||||
)
|
||||
|
||||
# import xmlrpc.client as xmlrpc_client
|
||||
# import xmlrpc.server as xmlrpc_server
|
||||
|
||||
from importlib import reload as reload_module
|
||||
|
||||
4
third_party/3/six/moves/urllib/error.pyi
vendored
4
third_party/3/six/moves/urllib/error.pyi
vendored
@@ -1,3 +1 @@
|
||||
from urllib.error import URLError as URLError
|
||||
from urllib.error import HTTPError as HTTPError
|
||||
from urllib.error import ContentTooShortError as ContentTooShortError
|
||||
from urllib.error import ContentTooShortError as ContentTooShortError, HTTPError as HTTPError, URLError as URLError
|
||||
|
||||
44
third_party/3/six/moves/urllib/parse.pyi
vendored
44
third_party/3/six/moves/urllib/parse.pyi
vendored
@@ -2,27 +2,29 @@
|
||||
#
|
||||
# Note: Commented out items means they weren't implemented at the time.
|
||||
# Uncomment them when the modules have been added to the typeshed.
|
||||
from urllib.parse import ParseResult as ParseResult
|
||||
from urllib.parse import SplitResult as SplitResult
|
||||
from urllib.parse import parse_qs as parse_qs
|
||||
from urllib.parse import parse_qsl as parse_qsl
|
||||
from urllib.parse import urldefrag as urldefrag
|
||||
from urllib.parse import urljoin as urljoin
|
||||
from urllib.parse import urlparse as urlparse
|
||||
from urllib.parse import urlsplit as urlsplit
|
||||
from urllib.parse import urlunparse as urlunparse
|
||||
from urllib.parse import urlunsplit as urlunsplit
|
||||
from urllib.parse import quote as quote
|
||||
from urllib.parse import quote_plus as quote_plus
|
||||
from urllib.parse import unquote as unquote
|
||||
from urllib.parse import unquote_plus as unquote_plus
|
||||
from urllib.parse import unquote_to_bytes as unquote_to_bytes
|
||||
from urllib.parse import urlencode as urlencode
|
||||
# from urllib.parse import splitquery as splitquery
|
||||
# from urllib.parse import splittag as splittag
|
||||
# from urllib.parse import splituser as splituser
|
||||
from urllib.parse import uses_fragment as uses_fragment
|
||||
from urllib.parse import uses_netloc as uses_netloc
|
||||
from urllib.parse import uses_params as uses_params
|
||||
from urllib.parse import uses_query as uses_query
|
||||
from urllib.parse import uses_relative as uses_relative
|
||||
from urllib.parse import (
|
||||
ParseResult as ParseResult,
|
||||
SplitResult as SplitResult,
|
||||
parse_qs as parse_qs,
|
||||
parse_qsl as parse_qsl,
|
||||
quote as quote,
|
||||
quote_plus as quote_plus,
|
||||
unquote as unquote,
|
||||
unquote_plus as unquote_plus,
|
||||
unquote_to_bytes as unquote_to_bytes,
|
||||
urldefrag as urldefrag,
|
||||
urlencode as urlencode,
|
||||
urljoin as urljoin,
|
||||
urlparse as urlparse,
|
||||
urlsplit as urlsplit,
|
||||
urlunparse as urlunparse,
|
||||
urlunsplit as urlunsplit,
|
||||
uses_fragment as uses_fragment,
|
||||
uses_netloc as uses_netloc,
|
||||
uses_params as uses_params,
|
||||
uses_query as uses_query,
|
||||
uses_relative as uses_relative,
|
||||
)
|
||||
|
||||
70
third_party/3/six/moves/urllib/request.pyi
vendored
70
third_party/3/six/moves/urllib/request.pyi
vendored
@@ -2,38 +2,40 @@
|
||||
#
|
||||
# Note: Commented out items means they weren't implemented at the time.
|
||||
# Uncomment them when the modules have been added to the typeshed.
|
||||
from urllib.request import urlopen as urlopen
|
||||
from urllib.request import install_opener as install_opener
|
||||
from urllib.request import build_opener as build_opener
|
||||
from urllib.request import pathname2url as pathname2url
|
||||
from urllib.request import url2pathname as url2pathname
|
||||
from urllib.request import getproxies as getproxies
|
||||
from urllib.request import Request as Request
|
||||
from urllib.request import OpenerDirector as OpenerDirector
|
||||
from urllib.request import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler
|
||||
from urllib.request import HTTPRedirectHandler as HTTPRedirectHandler
|
||||
from urllib.request import HTTPCookieProcessor as HTTPCookieProcessor
|
||||
from urllib.request import ProxyHandler as ProxyHandler
|
||||
from urllib.request import BaseHandler as BaseHandler
|
||||
from urllib.request import HTTPPasswordMgr as HTTPPasswordMgr
|
||||
from urllib.request import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm
|
||||
from urllib.request import AbstractBasicAuthHandler as AbstractBasicAuthHandler
|
||||
from urllib.request import HTTPBasicAuthHandler as HTTPBasicAuthHandler
|
||||
from urllib.request import ProxyBasicAuthHandler as ProxyBasicAuthHandler
|
||||
from urllib.request import AbstractDigestAuthHandler as AbstractDigestAuthHandler
|
||||
from urllib.request import HTTPDigestAuthHandler as HTTPDigestAuthHandler
|
||||
from urllib.request import ProxyDigestAuthHandler as ProxyDigestAuthHandler
|
||||
from urllib.request import HTTPHandler as HTTPHandler
|
||||
from urllib.request import HTTPSHandler as HTTPSHandler
|
||||
from urllib.request import FileHandler as FileHandler
|
||||
from urllib.request import FTPHandler as FTPHandler
|
||||
from urllib.request import CacheFTPHandler as CacheFTPHandler
|
||||
from urllib.request import UnknownHandler as UnknownHandler
|
||||
from urllib.request import HTTPErrorProcessor as HTTPErrorProcessor
|
||||
from urllib.request import urlretrieve as urlretrieve
|
||||
from urllib.request import urlcleanup as urlcleanup
|
||||
from urllib.request import URLopener as URLopener
|
||||
from urllib.request import FancyURLopener as FancyURLopener
|
||||
# from urllib.request import proxy_bypass as proxy_bypass
|
||||
from urllib.request import parse_http_list as parse_http_list
|
||||
from urllib.request import parse_keqv_list as parse_keqv_list
|
||||
from urllib.request import (
|
||||
AbstractBasicAuthHandler as AbstractBasicAuthHandler,
|
||||
AbstractDigestAuthHandler as AbstractDigestAuthHandler,
|
||||
BaseHandler as BaseHandler,
|
||||
CacheFTPHandler as CacheFTPHandler,
|
||||
FancyURLopener as FancyURLopener,
|
||||
FileHandler as FileHandler,
|
||||
FTPHandler as FTPHandler,
|
||||
HTTPBasicAuthHandler as HTTPBasicAuthHandler,
|
||||
HTTPCookieProcessor as HTTPCookieProcessor,
|
||||
HTTPDefaultErrorHandler as HTTPDefaultErrorHandler,
|
||||
HTTPDigestAuthHandler as HTTPDigestAuthHandler,
|
||||
HTTPErrorProcessor as HTTPErrorProcessor,
|
||||
HTTPHandler as HTTPHandler,
|
||||
HTTPPasswordMgr as HTTPPasswordMgr,
|
||||
HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm,
|
||||
HTTPRedirectHandler as HTTPRedirectHandler,
|
||||
HTTPSHandler as HTTPSHandler,
|
||||
OpenerDirector as OpenerDirector,
|
||||
ProxyBasicAuthHandler as ProxyBasicAuthHandler,
|
||||
ProxyDigestAuthHandler as ProxyDigestAuthHandler,
|
||||
ProxyHandler as ProxyHandler,
|
||||
Request as Request,
|
||||
UnknownHandler as UnknownHandler,
|
||||
URLopener as URLopener,
|
||||
build_opener as build_opener,
|
||||
getproxies as getproxies,
|
||||
install_opener as install_opener,
|
||||
parse_http_list as parse_http_list,
|
||||
parse_keqv_list as parse_keqv_list,
|
||||
pathname2url as pathname2url,
|
||||
url2pathname as url2pathname,
|
||||
urlcleanup as urlcleanup,
|
||||
urlopen as urlopen,
|
||||
urlretrieve as urlretrieve,
|
||||
)
|
||||
|
||||
44
third_party/3/typed_ast/ast27.pyi
vendored
44
third_party/3/typed_ast/ast27.pyi
vendored
@@ -1,7 +1,7 @@
|
||||
import typing
|
||||
from typing import Any, Optional, Union, Generic, Iterator
|
||||
from typing import Any, Generic, Iterator, Optional, Union
|
||||
|
||||
class NodeVisitor():
|
||||
class NodeVisitor:
|
||||
def visit(self, node: AST) -> Any: ...
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
@@ -30,8 +30,7 @@ class AST:
|
||||
_fields: typing.Tuple[str, ...]
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
class mod(AST):
|
||||
...
|
||||
class mod(AST): ...
|
||||
|
||||
class Module(mod):
|
||||
body: typing.List[stmt]
|
||||
@@ -50,7 +49,6 @@ class FunctionType(mod):
|
||||
class Suite(mod):
|
||||
body: typing.List[stmt]
|
||||
|
||||
|
||||
class stmt(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
@@ -152,10 +150,7 @@ class Expr(stmt):
|
||||
class Pass(stmt): ...
|
||||
class Break(stmt): ...
|
||||
class Continue(stmt): ...
|
||||
|
||||
|
||||
class slice(AST):
|
||||
...
|
||||
class slice(AST): ...
|
||||
|
||||
_slice = slice # this lets us type the variable named 'slice' below
|
||||
|
||||
@@ -172,7 +167,6 @@ class Index(slice):
|
||||
|
||||
class Ellipsis(slice): ...
|
||||
|
||||
|
||||
class expr(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
@@ -270,27 +264,17 @@ class Tuple(expr):
|
||||
elts: typing.List[expr]
|
||||
ctx: expr_context
|
||||
|
||||
|
||||
class expr_context(AST):
|
||||
...
|
||||
|
||||
class expr_context(AST): ...
|
||||
class AugLoad(expr_context): ...
|
||||
class AugStore(expr_context): ...
|
||||
class Del(expr_context): ...
|
||||
class Load(expr_context): ...
|
||||
class Param(expr_context): ...
|
||||
class Store(expr_context): ...
|
||||
|
||||
|
||||
class boolop(AST):
|
||||
...
|
||||
|
||||
class boolop(AST): ...
|
||||
class And(boolop): ...
|
||||
class Or(boolop): ...
|
||||
|
||||
class operator(AST):
|
||||
...
|
||||
|
||||
class operator(AST): ...
|
||||
class Add(operator): ...
|
||||
class BitAnd(operator): ...
|
||||
class BitOr(operator): ...
|
||||
@@ -303,18 +287,12 @@ class Mult(operator): ...
|
||||
class Pow(operator): ...
|
||||
class RShift(operator): ...
|
||||
class Sub(operator): ...
|
||||
|
||||
class unaryop(AST):
|
||||
...
|
||||
|
||||
class unaryop(AST): ...
|
||||
class Invert(unaryop): ...
|
||||
class Not(unaryop): ...
|
||||
class UAdd(unaryop): ...
|
||||
class USub(unaryop): ...
|
||||
|
||||
class cmpop(AST):
|
||||
...
|
||||
|
||||
class cmpop(AST): ...
|
||||
class Eq(cmpop): ...
|
||||
class Gt(cmpop): ...
|
||||
class GtE(cmpop): ...
|
||||
@@ -326,13 +304,11 @@ class LtE(cmpop): ...
|
||||
class NotEq(cmpop): ...
|
||||
class NotIn(cmpop): ...
|
||||
|
||||
|
||||
class comprehension(AST):
|
||||
target: expr
|
||||
iter: expr
|
||||
ifs: typing.List[expr]
|
||||
|
||||
|
||||
class ExceptHandler(AST):
|
||||
type: Optional[expr]
|
||||
name: Optional[expr]
|
||||
@@ -340,7 +316,6 @@ class ExceptHandler(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
|
||||
|
||||
class arguments(AST):
|
||||
args: typing.List[expr]
|
||||
vararg: Optional[identifier]
|
||||
@@ -356,6 +331,5 @@ class alias(AST):
|
||||
name: identifier
|
||||
asname: Optional[identifier]
|
||||
|
||||
|
||||
class TypeIgnore(AST):
|
||||
lineno: int
|
||||
|
||||
49
third_party/3/typed_ast/ast3.pyi
vendored
49
third_party/3/typed_ast/ast3.pyi
vendored
@@ -1,17 +1,14 @@
|
||||
import typing
|
||||
from typing import Any, Optional, Union, Generic, Iterator
|
||||
from typing import Any, Generic, Iterator, Optional, Union
|
||||
|
||||
class NodeVisitor():
|
||||
class NodeVisitor:
|
||||
def visit(self, node: AST) -> Any: ...
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
def parse(source: Union[str, bytes],
|
||||
filename: Union[str, bytes] = ...,
|
||||
mode: str = ...,
|
||||
feature_version: int = ...) -> AST: ...
|
||||
def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ..., feature_version: int = ...) -> AST: ...
|
||||
def copy_location(new_node: AST, old_node: AST) -> AST: ...
|
||||
def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ...
|
||||
def fix_missing_locations(node: AST) -> AST: ...
|
||||
@@ -33,8 +30,7 @@ class AST:
|
||||
_fields: typing.Tuple[str, ...]
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
class mod(AST):
|
||||
...
|
||||
class mod(AST): ...
|
||||
|
||||
class Module(mod):
|
||||
body: typing.List[stmt]
|
||||
@@ -53,7 +49,6 @@ class FunctionType(mod):
|
||||
class Suite(mod):
|
||||
body: typing.List[stmt]
|
||||
|
||||
|
||||
class stmt(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
@@ -171,10 +166,7 @@ class Expr(stmt):
|
||||
class Pass(stmt): ...
|
||||
class Break(stmt): ...
|
||||
class Continue(stmt): ...
|
||||
|
||||
|
||||
class slice(AST):
|
||||
...
|
||||
class slice(AST): ...
|
||||
|
||||
_slice = slice # this lets us type the variable named 'slice' below
|
||||
|
||||
@@ -189,7 +181,6 @@ class ExtSlice(slice):
|
||||
class Index(slice):
|
||||
value: expr
|
||||
|
||||
|
||||
class expr(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
@@ -308,27 +299,17 @@ class Tuple(expr):
|
||||
elts: typing.List[expr]
|
||||
ctx: expr_context
|
||||
|
||||
|
||||
class expr_context(AST):
|
||||
...
|
||||
|
||||
class expr_context(AST): ...
|
||||
class AugLoad(expr_context): ...
|
||||
class AugStore(expr_context): ...
|
||||
class Del(expr_context): ...
|
||||
class Load(expr_context): ...
|
||||
class Param(expr_context): ...
|
||||
class Store(expr_context): ...
|
||||
|
||||
|
||||
class boolop(AST):
|
||||
...
|
||||
|
||||
class boolop(AST): ...
|
||||
class And(boolop): ...
|
||||
class Or(boolop): ...
|
||||
|
||||
class operator(AST):
|
||||
...
|
||||
|
||||
class operator(AST): ...
|
||||
class Add(operator): ...
|
||||
class BitAnd(operator): ...
|
||||
class BitOr(operator): ...
|
||||
@@ -342,18 +323,12 @@ class MatMult(operator): ...
|
||||
class Pow(operator): ...
|
||||
class RShift(operator): ...
|
||||
class Sub(operator): ...
|
||||
|
||||
class unaryop(AST):
|
||||
...
|
||||
|
||||
class unaryop(AST): ...
|
||||
class Invert(unaryop): ...
|
||||
class Not(unaryop): ...
|
||||
class UAdd(unaryop): ...
|
||||
class USub(unaryop): ...
|
||||
|
||||
class cmpop(AST):
|
||||
...
|
||||
|
||||
class cmpop(AST): ...
|
||||
class Eq(cmpop): ...
|
||||
class Gt(cmpop): ...
|
||||
class GtE(cmpop): ...
|
||||
@@ -365,14 +340,12 @@ class LtE(cmpop): ...
|
||||
class NotEq(cmpop): ...
|
||||
class NotIn(cmpop): ...
|
||||
|
||||
|
||||
class comprehension(AST):
|
||||
target: expr
|
||||
iter: expr
|
||||
ifs: typing.List[expr]
|
||||
is_async: int
|
||||
|
||||
|
||||
class ExceptHandler(AST):
|
||||
type: Optional[expr]
|
||||
name: Optional[identifier]
|
||||
@@ -380,7 +353,6 @@ class ExceptHandler(AST):
|
||||
lineno: int
|
||||
col_offset: int
|
||||
|
||||
|
||||
class arguments(AST):
|
||||
args: typing.List[arg]
|
||||
vararg: Optional[arg]
|
||||
@@ -408,6 +380,5 @@ class withitem(AST):
|
||||
context_expr: expr
|
||||
optional_vars: Optional[expr]
|
||||
|
||||
|
||||
class TypeIgnore(AST):
|
||||
lineno: int
|
||||
|
||||
3
third_party/3/typed_ast/conversions.pyi
vendored
3
third_party/3/typed_ast/conversions.pyi
vendored
@@ -1,4 +1,3 @@
|
||||
from . import ast27
|
||||
from . import ast3
|
||||
from . import ast3, ast27
|
||||
|
||||
def py2to3(ast: ast27.AST) -> ast3.AST: ...
|
||||
|
||||
1
third_party/3/waitress/__init__.pyi
vendored
1
third_party/3/waitress/__init__.pyi
vendored
@@ -1,4 +1,5 @@
|
||||
from typing import Any, Tuple
|
||||
|
||||
from waitress.server import create_server
|
||||
|
||||
def serve(app: Any, **kw: Any) -> None: ...
|
||||
|
||||
5
third_party/3/waitress/adjustments.pyi
vendored
5
third_party/3/waitress/adjustments.pyi
vendored
@@ -1,7 +1,8 @@
|
||||
from socket import SocketType
|
||||
from typing import Any, Dict, FrozenSet, Iterable, List, Optional, Sequence, Set, Tuple, Union
|
||||
|
||||
from .compat import HAS_IPV6, PY2, WIN, string_types
|
||||
from .proxy_headers import PROXY_HEADERS
|
||||
from socket import SocketType
|
||||
from typing import Any, Dict, FrozenSet, Iterable, List, Sequence, Optional, Set, Tuple, Union
|
||||
|
||||
truthy: FrozenSet
|
||||
KNOWN_PROXY_HEADERS: FrozenSet
|
||||
|
||||
8
third_party/3/waitress/channel.pyi
vendored
8
third_party/3/waitress/channel.pyi
vendored
@@ -1,14 +1,16 @@
|
||||
from . import wasyncore as wasyncore
|
||||
from socket import SocketType
|
||||
from threading import Condition, Lock
|
||||
from typing import Mapping, Sequence, Optional, Tuple
|
||||
from typing import Mapping, Optional, Sequence, Tuple
|
||||
|
||||
from waitress.adjustments import Adjustments
|
||||
from waitress.buffers import OverflowableBuffer, ReadOnlyFileBasedBuffer
|
||||
from waitress.parser import HTTPRequestParser
|
||||
from waitress.server import BaseWSGIServer
|
||||
from waitress.task import ErrorTask, WSGITask, Task
|
||||
from waitress.task import ErrorTask, Task, WSGITask
|
||||
from waitress.utilities import InternalServerError
|
||||
|
||||
from . import wasyncore as wasyncore
|
||||
|
||||
class ClientDisconnected(Exception): ...
|
||||
|
||||
class HTTPChannel(wasyncore.dispatcher):
|
||||
|
||||
14
third_party/3/waitress/compat.pyi
vendored
14
third_party/3/waitress/compat.pyi
vendored
@@ -1,5 +1,5 @@
|
||||
from io import TextIOWrapper
|
||||
import sys
|
||||
from io import TextIOWrapper
|
||||
from typing import Any, Optional, Text, Tuple
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
@@ -10,9 +10,15 @@ else:
|
||||
PY2: bool
|
||||
PY3: bool
|
||||
WIN: bool
|
||||
string_types: Tuple[str, ]
|
||||
integer_types: Tuple[int, ]
|
||||
class_types: Tuple[type, ]
|
||||
string_types: Tuple[
|
||||
str,
|
||||
]
|
||||
integer_types: Tuple[
|
||||
int,
|
||||
]
|
||||
class_types: Tuple[
|
||||
type,
|
||||
]
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
long = int
|
||||
|
||||
8
third_party/3/waitress/parser.pyi
vendored
8
third_party/3/waitress/parser.pyi
vendored
@@ -1,19 +1,21 @@
|
||||
from .rfc7230 import HEADER_FIELD
|
||||
from io import BytesIO
|
||||
from typing import Mapping, Sequence, Optional, Pattern, Tuple, Union
|
||||
from typing import Mapping, Optional, Pattern, Sequence, Tuple, Union
|
||||
|
||||
from waitress.adjustments import Adjustments
|
||||
from waitress.buffers import OverflowableBuffer
|
||||
from waitress.compat import tostr, unquote_bytes_to_wsgi, urlparse
|
||||
from waitress.receiver import ChunkedReceiver, FixedStreamReceiver
|
||||
from waitress.utilities import (
|
||||
BadRequest,
|
||||
Error,
|
||||
RequestEntityTooLarge,
|
||||
RequestHeaderFieldsTooLarge,
|
||||
ServerNotImplemented,
|
||||
find_double_newline,
|
||||
Error,
|
||||
)
|
||||
|
||||
from .rfc7230 import HEADER_FIELD
|
||||
|
||||
class ParsingError(Exception): ...
|
||||
class TransferEncodingNotImplemented(Exception): ...
|
||||
|
||||
|
||||
5
third_party/3/waitress/proxy_headers.pyi
vendored
5
third_party/3/waitress/proxy_headers.pyi
vendored
@@ -1,7 +1,8 @@
|
||||
from .utilities import BadRequest
|
||||
from collections import namedtuple
|
||||
from logging import Logger
|
||||
from typing import Any, Callable, Mapping, Sequence, Optional, Set
|
||||
from typing import Any, Callable, Mapping, Optional, Sequence, Set
|
||||
|
||||
from .utilities import BadRequest
|
||||
|
||||
PROXY_HEADERS: frozenset
|
||||
|
||||
|
||||
1
third_party/3/waitress/receiver.pyi
vendored
1
third_party/3/waitress/receiver.pyi
vendored
@@ -1,5 +1,6 @@
|
||||
from io import BytesIO
|
||||
from typing import Optional
|
||||
|
||||
from waitress.buffers import OverflowableBuffer
|
||||
from waitress.utilities import BadRequest, find_double_newline
|
||||
|
||||
|
||||
3
third_party/3/waitress/rfc7230.pyi
vendored
3
third_party/3/waitress/rfc7230.pyi
vendored
@@ -1,6 +1,7 @@
|
||||
from .compat import tobytes
|
||||
from typing import Pattern
|
||||
|
||||
from .compat import tobytes
|
||||
|
||||
WS: str
|
||||
OWS: str
|
||||
RWS: str
|
||||
|
||||
3
third_party/3/waitress/runner.pyi
vendored
3
third_party/3/waitress/runner.pyi
vendored
@@ -1,5 +1,6 @@
|
||||
from io import TextIOWrapper
|
||||
from typing import Any, Callable, Sequence, Optional, Pattern, Tuple
|
||||
from typing import Any, Callable, Optional, Pattern, Sequence, Tuple
|
||||
|
||||
from waitress import serve
|
||||
|
||||
HELP: str
|
||||
|
||||
8
third_party/3/waitress/server.pyi
vendored
8
third_party/3/waitress/server.pyi
vendored
@@ -1,13 +1,15 @@
|
||||
from . import wasyncore
|
||||
from .proxy_headers import proxy_headers_middleware
|
||||
from socket import SocketType
|
||||
from typing import Any, Sequence, Optional, Tuple, Union
|
||||
from typing import Any, Optional, Sequence, Tuple, Union
|
||||
|
||||
from waitress.adjustments import Adjustments
|
||||
from waitress.channel import HTTPChannel
|
||||
from waitress.compat import IPPROTO_IPV6, IPV6_V6ONLY
|
||||
from waitress.task import Task, ThreadedTaskDispatcher
|
||||
from waitress.utilities import cleanup_unix_socket
|
||||
|
||||
from . import wasyncore
|
||||
from .proxy_headers import proxy_headers_middleware
|
||||
|
||||
def create_server(
|
||||
application: Any,
|
||||
map: Optional[Any] = ...,
|
||||
|
||||
7
third_party/3/waitress/task.pyi
vendored
7
third_party/3/waitress/task.pyi
vendored
@@ -1,10 +1,11 @@
|
||||
from logging import Logger
|
||||
from threading import Condition, Lock
|
||||
from typing import Any, Deque, Mapping, Optional, Sequence, Set, Tuple
|
||||
|
||||
from .buffers import ReadOnlyFileBasedBuffer
|
||||
from .channel import HTTPChannel
|
||||
from .compat import reraise, tobytes
|
||||
from .utilities import Error
|
||||
from logging import Logger
|
||||
from threading import Condition, Lock
|
||||
from typing import Any, Deque, Mapping, Sequence, Optional, Set, Tuple
|
||||
|
||||
rename_headers: Mapping[str, str]
|
||||
hop_by_hop: frozenset
|
||||
|
||||
8
third_party/3/waitress/trigger.pyi
vendored
8
third_party/3/waitress/trigger.pyi
vendored
@@ -1,10 +1,12 @@
|
||||
from . import wasyncore as wasyncore
|
||||
from threading import Lock
|
||||
from socket import SocketType
|
||||
import sys
|
||||
from socket import SocketType
|
||||
from threading import Lock
|
||||
from typing import Callable, Mapping, Optional
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from . import wasyncore as wasyncore
|
||||
|
||||
class _triggerbase:
|
||||
kind: Optional[str] = ...
|
||||
lock: Lock = ...
|
||||
|
||||
5
third_party/3/waitress/utilities.pyi
vendored
5
third_party/3/waitress/utilities.pyi
vendored
@@ -1,6 +1,7 @@
|
||||
from .rfc7230 import OBS_TEXT, VCHAR
|
||||
from logging import Logger
|
||||
from typing import Any, Callable, Mapping, Sequence, Match, Pattern, Tuple
|
||||
from typing import Any, Callable, Mapping, Match, Pattern, Sequence, Tuple
|
||||
|
||||
from .rfc7230 import OBS_TEXT, VCHAR
|
||||
|
||||
logger: Logger
|
||||
queue_logger: Logger
|
||||
|
||||
3
third_party/3/waitress/wasyncore.pyi
vendored
3
third_party/3/waitress/wasyncore.pyi
vendored
@@ -1,9 +1,10 @@
|
||||
from . import compat, utilities
|
||||
from io import BytesIO
|
||||
from logging import Logger
|
||||
from socket import SocketType
|
||||
from typing import Any, Callable, Mapping, Optional, Tuple
|
||||
|
||||
from . import compat, utilities
|
||||
|
||||
socket_map: Mapping[int, SocketType]
|
||||
map: Mapping[int, SocketType]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user