massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / waitress / waitress / adjustments.pyi
1 from socket import socket
2 from typing import Any, Iterable, Sequence
3
4 from .compat import HAS_IPV6 as HAS_IPV6, PY2 as PY2, WIN as WIN, string_types as string_types
5 from .proxy_headers import PROXY_HEADERS as PROXY_HEADERS
6
7 truthy: frozenset[Any]
8 KNOWN_PROXY_HEADERS: frozenset[Any]
9
10 def asbool(s: bool | str | int | None) -> bool: ...
11 def asoctal(s: str) -> int: ...
12 def aslist_cronly(value: str) -> list[str]: ...
13 def aslist(value: str) -> list[str]: ...
14 def asset(value: str | None) -> set[str]: ...
15 def slash_fixed_str(s: str | None) -> str: ...
16 def str_iftruthy(s: str | None) -> str | None: ...
17 def as_socket_list(sockets: Sequence[object]) -> list[socket]: ...
18
19 class _str_marker(str): ...
20 class _int_marker(int): ...
21 class _bool_marker: ...
22
23 class Adjustments:
24     host: _str_marker = ...
25     port: _int_marker = ...
26     listen: list[str] = ...
27     threads: int = ...
28     trusted_proxy: str | None = ...
29     trusted_proxy_count: int | None = ...
30     trusted_proxy_headers: set[str] = ...
31     log_untrusted_proxy_headers: bool = ...
32     clear_untrusted_proxy_headers: _bool_marker | bool = ...
33     url_scheme: str = ...
34     url_prefix: str = ...
35     ident: str = ...
36     backlog: int = ...
37     recv_bytes: int = ...
38     send_bytes: int = ...
39     outbuf_overflow: int = ...
40     outbuf_high_watermark: int = ...
41     inbuf_overflow: int = ...
42     connection_limit: int = ...
43     cleanup_interval: int = ...
44     channel_timeout: int = ...
45     log_socket_errors: bool = ...
46     max_request_header_size: int = ...
47     max_request_body_size: int = ...
48     expose_tracebacks: bool = ...
49     unix_socket: str | None = ...
50     unix_socket_perms: int = ...
51     socket_options: list[tuple[int, int, int]] = ...
52     asyncore_loop_timeout: int = ...
53     asyncore_use_poll: bool = ...
54     ipv4: bool = ...
55     ipv6: bool = ...
56     sockets: list[socket] = ...
57     def __init__(self, **kw: Any) -> None: ...
58     @classmethod
59     def parse_args(cls, argv: str) -> tuple[dict[str, Any], Any]: ...
60     @classmethod
61     def check_sockets(cls, sockets: Iterable[socket]) -> None: ...