massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2 / six / __init__.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2/six/__init__.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2/six/__init__.pyi
new file mode 100644 (file)
index 0000000..f04b9bb
--- /dev/null
@@ -0,0 +1,91 @@
+# Stubs for six (Python 2.7)\r
+\r
+from __future__ import print_function\r
+\r
+import types\r
+from typing import (\r
+    Any, AnyStr, Callable, Dict, Iterable, Mapping, NoReturn, Optional,\r
+    Pattern, Tuple, Type, TypeVar, Union, overload, ValuesView, KeysView, ItemsView\r
+)\r
+import typing\r
+import unittest\r
+\r
+# Exports\r
+from __builtin__ import unichr as unichr\r
+from StringIO import StringIO as StringIO, StringIO as BytesIO\r
+from functools import wraps as wraps\r
+from . import moves\r
+\r
+\r
+_T = TypeVar('_T')\r
+_K = TypeVar('_K')\r
+_V = TypeVar('_V')\r
+\r
+# TODO make constant, then move this stub to 2and3\r
+# https://github.com/python/typeshed/issues/17\r
+PY2 = True\r
+PY3 = False\r
+PY34 = False\r
+\r
+string_types = (str, unicode)\r
+integer_types = (int, long)\r
+class_types = (type, types.ClassType)\r
+text_type = unicode\r
+binary_type = str\r
+\r
+MAXSIZE = ...  # type: int\r
+\r
+# def add_move\r
+# def remove_move\r
+\r
+def advance_iterator(it: typing.Iterator[_T]) -> _T: ...\r
+next = advance_iterator\r
+\r
+def callable(obj: object) -> bool: ...\r
+\r
+def get_unbound_function(unbound: types.MethodType) -> types.FunctionType: ...\r
+def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ...\r
+def create_unbound_method(func: types.FunctionType, cls: Union[type, types.ClassType]) -> types.MethodType: ...\r
+\r
+class Iterator:\r
+    def next(self) -> Any: ...\r
+\r
+def get_method_function(meth: types.MethodType) -> types.FunctionType: ...\r
+def get_method_self(meth: types.MethodType) -> Optional[object]: ...\r
+def get_function_closure(fun: types.FunctionType) -> Optional[Tuple[types._Cell, ...]]: ...\r
+def get_function_code(fun: types.FunctionType) -> types.CodeType: ...\r
+def get_function_defaults(fun: types.FunctionType) -> Optional[Tuple[Any, ...]]: ...\r
+def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ...\r
+\r
+def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ...\r
+def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ...\r
+def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ...\r
+# def iterlists\r
+\r
+def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ...\r
+def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ...\r
+def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ...\r
+\r
+def b(s: str) -> binary_type: ...\r
+def u(s: str) -> text_type: ...\r
+int2byte = chr\r
+def byte2int(bs: binary_type) -> int: ...\r
+def indexbytes(buf: binary_type, i: int) -> int: ...\r
+def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...\r
+\r
+def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = ...) -> None: ...\r
+@overload\r
+def assertRaisesRegex(self: unittest.TestCase, msg: str = ...) -> Any: ...\r
+@overload\r
+def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...\r
+def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: str = ...) -> None: ...\r
+\r
+def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...\r
+def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ...\r
+def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ...\r
+\r
+print_ = print\r
+\r
+def with_metaclass(meta: type, *bases: type) -> type: ...\r
+def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ...\r
+def python_2_unicode_compatible(klass: _T) -> _T: ...\r