|
1 |
| -from typing import Text |
| 1 | +import logging |
| 2 | +import logging.handlers |
| 3 | +import datetime |
| 4 | +import subprocess |
| 5 | +import thread |
| 6 | +import time |
2 | 7 |
|
| 8 | +import boto.provider |
| 9 | +import boto.connection |
| 10 | +import six |
| 11 | +from typing import Any, List, Hashable, Optional, Text, Union, Tuple |
| 12 | + |
| 13 | + |
| 14 | +JSONDecodeError = ... # type: Exception |
| 15 | +qsa_of_interest = ... # type: List[Text] |
| 16 | + |
| 17 | +def unquote_v(nv: Text) -> Union[Text, Tuple[Text, Text]]: ... |
| 18 | +def canonical_string( |
| 19 | + method: Text, |
| 20 | + path: Text, |
| 21 | + headers: Dict[Text, Text], |
| 22 | + expires: Optional[int] = ..., |
| 23 | + provider: Optional[boto.provider.Provider] = ..., |
| 24 | +): ... |
| 25 | +def merge_meta( |
| 26 | + headers: Dict[Text, Text], |
| 27 | + metadata: Dict[Text, Text], |
| 28 | + provider: Optional[boto.provider.Provider] = ..., |
| 29 | +): ... |
| 30 | +def get_aws_metadata(headers: Dict[Text, Text], provider: Optional[boto.provider.Provider] = ...): ... |
| 31 | +def retry_url( |
| 32 | + url: Text, |
| 33 | + retry_on_404: bool = ..., |
| 34 | + num_retries: int = ..., |
| 35 | + timeout: Optional[int] = ..., |
| 36 | +): ... |
| 37 | + |
| 38 | +class LazyLoadMetadata(dict): |
| 39 | + def __init__( |
| 40 | + self, |
| 41 | + url: Text, |
| 42 | + num_retries: int, |
| 43 | + timeout: Optional[int] = ..., |
| 44 | + ) -> None: ... |
| 45 | + def __getitem__(self, key: Hashable): ... |
| 46 | + def get(self, key: Hashable, default: Optional[Any] = ...) -> Any: ... |
| 47 | + def values(self) -> List[Any]: ... |
| 48 | + def items(self) -> List[Tuple[Any, Any]]: ... |
| 49 | + |
| 50 | +def get_instance_metadata( |
| 51 | + version: Text = ..., |
| 52 | + url: Text = ..., |
| 53 | + data: Text = ..., |
| 54 | + timeout: Optional[int] = ..., |
| 55 | + num_retries: int = ... |
| 56 | +) -> Optional[LazyLoadMetadata]: ... |
| 57 | +def get_instance_identity( |
| 58 | + version: Text = ..., |
| 59 | + url: Text = ..., |
| 60 | + timeout: Optional[int] = ..., |
| 61 | + num_retries: int = ..., |
| 62 | +) -> Optional[Dict[Text, Any]]: ... |
| 63 | +def get_instance_userdata( |
| 64 | + version: Text = ..., |
| 65 | + sep: Optional[Text] = ..., |
| 66 | + url: Text = ..., |
| 67 | + timeout: Optional[int] = ..., |
| 68 | + num_retries: int = ..., |
| 69 | +) -> Dict[Text, Text]: ... |
| 70 | + |
| 71 | +ISO8601 = ... # type: Text |
| 72 | +ISO8601_MS = ... # type: Text |
| 73 | +RFC1123 = ... # type: Text |
| 74 | +LOCALE_LOCK = ... # type: therad.LockType |
| 75 | + |
| 76 | +def setlocale(name: Union[Text, Tuple[Text, Text]]): ... |
| 77 | +def get_ts(ts: Optional[time.struct_time] = ...) -> Text: ... |
| 78 | +def parse_ts(ts: Text) -> datetime.datetime: ... |
| 79 | +def find_class(module_name: Text, class_name: Optional[Text] = ...) -> Optional[Any]: ... |
| 80 | +def update_dme(username: Text, password: Text, dme_id: Text, ip_address: Text) -> Text: ... |
| 81 | +def fetch_file( |
| 82 | + uri: Text, |
| 83 | + file: Optional[file] = ..., |
| 84 | + username: Optional[Text] = ..., |
| 85 | + password: Optional[Text] = ..., |
| 86 | +) -> file: ... |
| 87 | + |
| 88 | +class ShellCommand: |
| 89 | + exit_code = ... # type: int |
| 90 | + command = ... # type: subprocess._CMD |
| 91 | + log_fp = ... # type: six.StringIO |
| 92 | + wait = ... # type: bool |
| 93 | + fail_fast = ... # type: bool |
| 94 | + |
| 95 | + def __init__( |
| 96 | + self, |
| 97 | + command: subprocess._CMD, |
| 98 | + wait: bool = ..., |
| 99 | + fail_fast: bool = ..., |
| 100 | + cwd: Optional[subprocess._TXT] = ..., |
| 101 | + ) -> None: .... |
| 102 | + |
| 103 | + process = ... # type: subprocess.Popen |
| 104 | + |
| 105 | + def run(self, cwd: Optional[subprocess._CMD] = ...) -> Optional[int]: ... |
| 106 | + def setReadOnly(self, value) -> None: ... |
| 107 | + def getStatus(self) -> Optional[int]: ... |
| 108 | + |
| 109 | + status = ... # type: Any |
| 110 | + |
| 111 | + def getOutput(self) -> Text: ... |
| 112 | + |
| 113 | + output = ... # type: Any |
| 114 | + |
| 115 | +class AuthSMTPHandler(logging.handlers.SMTPHandler): |
| 116 | + username = ... # type: Text |
| 117 | + password = ... # type: Text |
| 118 | + def __init__( |
| 119 | + self, |
| 120 | + mailhost: Text, |
| 121 | + username: Text, |
| 122 | + password: Text, |
| 123 | + fromaddr: Text, |
| 124 | + toaddrs: Sequence[Text], |
| 125 | + subject: Text, |
| 126 | + ) -> None: ... |
| 127 | + def emit(self, record: logging.Record) -> None: ... |
| 128 | + |
| 129 | +class LRUCache(dict): |
| 130 | + class _Item: |
| 131 | + previous = ... # type: Optional[_Item] |
| 132 | + key = ... # type: Hashable |
| 133 | + value = ... # type: Any |
| 134 | + def __init__(self, key, value) -> None: ... |
| 135 | + |
| 136 | + capacity = ... # type: int |
| 137 | + head = ... # type: Optional[_Item] |
| 138 | + tail = ... # type: Optional[_Item] |
| 139 | + |
| 140 | + def __init__(self, capacity: int) -> None: ... |
| 141 | + def __contains__(self, key: Hashable) -> bool: ... |
| 142 | + def __iter__(self): ... |
| 143 | + def __len__(self) -> int: ... |
| 144 | + def __getitem__(self, key: Hashable) -> Any: ... |
| 145 | + def __setitem__(self, key: Hashable, value: Any): ... |
| 146 | + |
| 147 | +class Password: |
| 148 | + hashfunc = ... # type: Callable |
| 149 | + str = ... # type: Optional[Text] |
| 150 | + |
| 151 | + def __init__( |
| 152 | + self, |
| 153 | + str: Optional[Text] = ..., |
| 154 | + hashfunc: Optional[Callable] = ..., |
| 155 | + ) -> None: ... |
| 156 | + def set(self, value: Optional[bytes, Text]): ... |
| 157 | + def __eq__(self, other: Any) -> bool: ... |
| 158 | + def __len__(self) -> bool: ... |
| 159 | + |
| 160 | +def notify( |
| 161 | + subject: Text, |
| 162 | + body: Optional[Text] = ..., |
| 163 | + html_body: Optional[Union[Sequence[Text], Text]] = ..., |
| 164 | + to_string: Optional[Text] = ..., |
| 165 | + attachments: Optional[Iterable] = ..., |
| 166 | + append_instance_id: bool = ..., |
| 167 | +): ... |
| 168 | +def get_utf8_value(value: Text) -> Text: ... |
| 169 | +def mklist(value: Any) -> List: ... |
3 | 170 | def pythonize_name(name: Text) -> Text: ...
|
| 171 | +def write_mime_multipart( |
| 172 | + content: List[Tuple[Text, Text]], |
| 173 | + compress: bool = ..., |
| 174 | + deftype: Text = ..., |
| 175 | + delimiter: Text = ..., |
| 176 | +): ... |
| 177 | +def guess_mime_type(content: Text, deftype: Text) -> Text: ... |
| 178 | +def compute_md5( |
| 179 | + fp: file, |
| 180 | + buf_size: int = ..., |
| 181 | + size: Optional[int] = ..., |
| 182 | +) -> Tuple[Text, Text, int]: ... |
| 183 | +def compute_hash( |
| 184 | + fp: file, |
| 185 | + buf_size: int = ..., |
| 186 | + size: Optional[int] = ..., |
| 187 | + hash_algorithm: Any = ..., |
| 188 | +) -> Tuple[Text, Text, int]: ... |
| 189 | +def find_matching_headers(name: Text, headers: Dict[Text, Text]) -> List[Text]: ... |
| 190 | +def merge_headers_by_name(name: Text, headers: Dict[Text, Text]) -> Text: ... |
| 191 | + |
| 192 | +class RequestHook: |
| 193 | + def handle_request_data( |
| 194 | + self, |
| 195 | + request: boto.connection.HTTPRequest, |
| 196 | + response: boto.connection.HTTPResponse, |
| 197 | + error: bool = ..., |
| 198 | + ): ... |
| 199 | + |
| 200 | +def host_is_ipv6(hostname: Text) -> bool: ... |
| 201 | +def parse_host(hostname: Text) -> Text: ... |
0 commit comments