massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / _codecs.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/_codecs.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/_codecs.pyi
new file mode 100644 (file)
index 0000000..d775c0d
--- /dev/null
@@ -0,0 +1,74 @@
+"""Stub file for the '_codecs' module."""\r
+\r
+import sys\r
+from typing import Any, Callable, Tuple, Optional, Dict, Text, Union\r
+\r
+import codecs\r
+\r
+# For convenience:\r
+_Handler = Callable[[Exception], Tuple[Text, int]]\r
+_String = Union[bytes, str]\r
+_Errors = Union[str, Text, None]\r
+if sys.version_info < (3, 0):\r
+    _Decodable = Union[bytes, Text]\r
+    _Encodable = Union[bytes, Text]\r
+else:\r
+    _Decodable = bytes\r
+    _Encodable = str\r
+\r
+# This type is not exposed; it is defined in unicodeobject.c\r
+class _EncodingMap(object):\r
+    def size(self) -> int: ...\r
+_MapT = Union[Dict[int, int], _EncodingMap]\r
+\r
+def register(search_function: Callable[[str], Any]) -> None: ...\r
+def register_error(errors: Union[str, Text], handler: _Handler) -> None: ...\r
+def lookup(encoding: Union[str, Text]) -> codecs.CodecInfo: ...\r
+def lookup_error(name: Union[str, Text]) -> _Handler: ...\r
+def decode(obj: Any, encoding: Union[str, Text] = ..., errors: _Errors = ...) -> Any: ...\r
+def encode(obj: Any, encoding: Union[str, Text] = ..., errors: _Errors = ...) -> Any: ...\r
+def charmap_build(map: Text) -> _MapT: ...\r
+\r
+def ascii_decode(data: _Decodable, errors: _Errors = ...) -> Tuple[Text, int]: ...\r
+def ascii_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def charbuffer_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def charmap_decode(data: _Decodable, errors: _Errors = ..., mapping: Optional[_MapT] = ...) -> Tuple[Text, int]: ...\r
+def charmap_encode(data: _Encodable, errors: _Errors, mapping: Optional[_MapT] = ...) -> Tuple[bytes, int]: ...\r
+def escape_decode(data: _String, errors: _Errors = ...) -> Tuple[str, int]: ...\r
+def escape_encode(data: bytes, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def latin_1_decode(data: _Decodable, errors: _Errors = ...) -> Tuple[Text, int]: ...\r
+def latin_1_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def raw_unicode_escape_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ...\r
+def raw_unicode_escape_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def readbuffer_encode(data: _String, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def unicode_escape_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ...\r
+def unicode_escape_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def unicode_internal_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ...\r
+def unicode_internal_encode(data: _String, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_16_be_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_16_be_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_16_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_16_encode(data: _Encodable, errors: _Errors = ..., byteorder: int = ...) -> Tuple[bytes, int]: ...\r
+def utf_16_ex_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int, int]: ...\r
+def utf_16_le_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_16_le_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_32_be_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_32_be_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_32_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_32_encode(data: _Encodable, errors: _Errors = ..., byteorder: int = ...) -> Tuple[bytes, int]: ...\r
+def utf_32_ex_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int, int]: ...\r
+def utf_32_le_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_32_le_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_7_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_7_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+def utf_8_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+def utf_8_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+\r
+if sys.platform == 'win32':\r
+    def mbcs_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+    def mbcs_encode(str: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+    if sys.version_info >= (3, 0):\r
+        def oem_decode(data: bytes, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+        def code_page_decode(codepage: int, data: bytes, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ...\r
+        def oem_encode(str: Text, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r
+        def code_page_encode(code_page: int, str: Text, errors: _Errors = ...) -> Tuple[bytes, int]: ...\r