massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / urllib / parse.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/3/urllib/parse.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/3/urllib/parse.pyi
new file mode 100644 (file)
index 0000000..b9192fd
--- /dev/null
@@ -0,0 +1,147 @@
+# Stubs for urllib.parse\r
+from typing import Any, List, Dict, Tuple, AnyStr, Generic, overload, Sequence, Mapping, Union, NamedTuple, Callable\r
+import sys\r
+\r
+_Str = Union[bytes, str]\r
+\r
+\r
+uses_relative = ...  # type: List[str]\r
+uses_netloc = ...  # type: List[str]\r
+uses_params = ...  # type: List[str]\r
+non_hierarchical = ...  # type: List[str]\r
+uses_query = ...  # type: List[str]\r
+uses_fragment = ...  # type: List[str]\r
+scheme_chars = ...  # type: str\r
+MAX_CACHE_SIZE = 0\r
+\r
+class _ResultMixinBase(Generic[AnyStr]):\r
+    def geturl(self) -> AnyStr: ...\r
+\r
+class _ResultMixinStr(_ResultMixinBase[str]):\r
+    def encode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinBytes': ...\r
+\r
+\r
+class _ResultMixinBytes(_ResultMixinBase[str]):\r
+    def decode(self, encoding: str = ..., errors: str = ...) -> '_ResultMixinStr': ...\r
+\r
+\r
+class _NetlocResultMixinBase(Generic[AnyStr]):\r
+    username = ...  # type: AnyStr\r
+    password = ...  # type: AnyStr\r
+    hostname = ...  # type: AnyStr\r
+    port = ...  # type: int\r
+\r
+class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...\r
+\r
+\r
+class _NetlocResultMixinBytes(_NetlocResultMixinBase[str], _ResultMixinBytes): ...\r
+\r
+class _DefragResultBase(tuple, Generic[AnyStr]):\r
+    url = ...  # type: AnyStr\r
+    fragment = ...  # type: AnyStr\r
+\r
+\r
+_SplitResultBase = NamedTuple(\r
+    '_SplitResultBase',\r
+    [\r
+        ('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str)\r
+    ]\r
+)\r
+_SplitResultBytesBase = NamedTuple(\r
+    '_SplitResultBytesBase',\r
+    [\r
+        ('scheme', bytes), ('netloc', bytes), ('path', bytes), ('query', bytes), ('fragment', bytes)\r
+    ]\r
+)\r
+\r
+_ParseResultBase = NamedTuple(\r
+    '_ParseResultBase',\r
+    [\r
+        ('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str), ('fragment', str)\r
+    ]\r
+)\r
+_ParseResultBytesBase = NamedTuple(\r
+    '_ParseResultBytesBase',\r
+    [\r
+        ('scheme', bytes), ('netloc', bytes), ('path', bytes), ('params', bytes), ('query', bytes), ('fragment', bytes)\r
+    ]\r
+)\r
+\r
+# Structured result objects for string data\r
+class DefragResult(_DefragResultBase[str], _ResultMixinStr): ...\r
+\r
+class SplitResult(_SplitResultBase, _NetlocResultMixinStr): ...\r
+\r
+class ParseResult(_ParseResultBase, _NetlocResultMixinStr): ...\r
+\r
+# Structured result objects for bytes data\r
+class DefragResultBytes(_DefragResultBase[bytes], _ResultMixinBytes): ...\r
+\r
+class SplitResultBytes(_SplitResultBytesBase, _NetlocResultMixinBytes): ...\r
+\r
+class ParseResultBytes(_ParseResultBytesBase, _NetlocResultMixinBytes): ...\r
+\r
+\r
+def parse_qs(qs: AnyStr, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> Dict[AnyStr, List[AnyStr]]: ...\r
+\r
+def parse_qsl(qs: AnyStr, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[AnyStr, AnyStr]]: ...\r
+\r
+\r
+@overload\r
+def quote(string: str, safe: _Str = ..., encoding: str = ..., errors: str = ...) -> str: ...\r
+@overload\r
+def quote(string: bytes, safe: _Str = ...) -> str: ...\r
+\r
+def quote_from_bytes(bs: bytes, safe: _Str = ...) -> str: ...\r
+\r
+@overload\r
+def quote_plus(string: str, safe: _Str = ..., encoding: str = ..., errors: str = ...) -> str: ...\r
+@overload\r
+def quote_plus(string: bytes, safe: _Str = ...) -> str: ...\r
+\r
+def unquote(string: str, encoding: str = ..., errors: str = ...) -> str: ...\r
+\r
+def unquote_to_bytes(string: _Str) -> bytes: ...\r
+\r
+def unquote_plus(string: str, encoding: str = ..., errors: str = ...) -> str: ...\r
+\r
+@overload\r
+def urldefrag(url: str) -> DefragResult: ...\r
+@overload\r
+def urldefrag(url: bytes) -> DefragResultBytes: ...\r
+\r
+if sys.version_info >= (3, 5):\r
+    def urlencode(query: Union[Mapping[Any, Any],\r
+                               Mapping[Any, Sequence[Any]],\r
+                               Sequence[Tuple[Any, Any]],\r
+                               Sequence[Tuple[Any, Sequence[Any]]]],\r
+                  doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...,\r
+                  quote_via: Callable[[str, AnyStr, str, str], str] = ...) -> str: ...\r
+else:\r
+    def urlencode(query: Union[Mapping[Any, Any],\r
+                               Mapping[Any, Sequence[Any]],\r
+                               Sequence[Tuple[Any, Any]],\r
+                               Sequence[Tuple[Any, Sequence[Any]]]],\r
+                  doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...\r
+\r
+def urljoin(base: AnyStr, url: AnyStr, allow_fragments: bool = ...) -> AnyStr: ...\r
+\r
+@overload\r
+def urlparse(url: str, scheme: str = ..., allow_fragments: bool = ...) -> ParseResult: ...\r
+@overload\r
+def urlparse(url: bytes, scheme: bytes = ..., allow_fragments: bool = ...) -> ParseResultBytes: ...\r
+\r
+@overload\r
+def urlsplit(url: str, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...\r
+@overload\r
+def urlsplit(url: bytes, scheme: bytes = ..., allow_fragments: bool = ...) -> SplitResultBytes: ...\r
+\r
+@overload\r
+def urlunparse(components: Tuple[AnyStr, AnyStr, AnyStr, AnyStr, AnyStr, AnyStr]) -> AnyStr: ...\r
+@overload\r
+def urlunparse(components: Sequence[AnyStr]) -> AnyStr: ...\r
+\r
+@overload\r
+def urlunsplit(components: Tuple[AnyStr, AnyStr, AnyStr, AnyStr, AnyStr]) -> AnyStr: ...\r
+@overload\r
+def urlunsplit(components: Sequence[AnyStr]) -> AnyStr: ...\r