massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / difflib.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/difflib.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/difflib.pyi
new file mode 100644 (file)
index 0000000..c566a2d
--- /dev/null
@@ -0,0 +1,87 @@
+# Based on https://docs.python.org/2.7/library/difflib.html and https://docs.python.org/3.2/library/difflib.html\r
+\r
+import sys\r
+from typing import (\r
+    TypeVar, Callable, Iterable, Iterator, List, NamedTuple, Sequence, Tuple,\r
+    Generic, Optional, Text, Union, AnyStr\r
+)\r
+\r
+_T = TypeVar('_T')\r
+\r
+if sys.version_info >= (3,):\r
+    _StrType = Text\r
+else:\r
+    # Aliases can't point to type vars, so we need to redeclare AnyStr\r
+    _StrType = TypeVar('_StrType', str, bytes)\r
+\r
+_JunkCallback = Union[Callable[[Text], bool], Callable[[str], bool]]\r
+\r
+Match = NamedTuple('Match', [\r
+    ('a', int),\r
+    ('b', int),\r
+    ('size', int),\r
+])\r
+\r
+class SequenceMatcher(Generic[_T]):\r
+    def __init__(self, isjunk: Optional[Callable[[_T], bool]] = ...,\r
+                 a: Sequence[_T] = ..., b: Sequence[_T] = ...,\r
+                 autojunk: bool = ...) -> None: ...\r
+    def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ...\r
+    def set_seq1(self, a: Sequence[_T]) -> None: ...\r
+    def set_seq2(self, b: Sequence[_T]) -> None: ...\r
+    def find_longest_match(self, alo: int, ahi: int, blo: int,\r
+                           bhi: int) -> Match: ...\r
+    def get_matching_blocks(self) -> List[Match]: ...\r
+    def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ...\r
+    def get_grouped_opcodes(self, n: int = ...\r
+                            ) -> Iterable[List[Tuple[str, int, int, int, int]]]: ...\r
+    def ratio(self) -> float: ...\r
+    def quick_ratio(self) -> float: ...\r
+    def real_quick_ratio(self) -> float: ...\r
+\r
+def get_close_matches(word: Sequence[_T], possibilities: Iterable[Sequence[_T]],\r
+                      n: int = ..., cutoff: float = ...) -> List[Sequence[_T]]: ...\r
+\r
+class Differ:\r
+    def __init__(self, linejunk: _JunkCallback = ..., charjunk: _JunkCallback = ...) -> None: ...\r
+    def compare(self, a: Sequence[_StrType], b: Sequence[_StrType]) -> Iterator[_StrType]: ...\r
+\r
+def IS_LINE_JUNK(line: _StrType) -> bool: ...\r
+def IS_CHARACTER_JUNK(line: _StrType) -> bool: ...\r
+def unified_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType = ...,\r
+                 tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ...,\r
+                 n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ...\r
+def context_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType =...,\r
+                 tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ...,\r
+                 n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ...\r
+def ndiff(a: Sequence[_StrType], b: Sequence[_StrType],\r
+          linejunk: _JunkCallback = ...,\r
+          charjunk: _JunkCallback = ...\r
+          ) -> Iterator[_StrType]: ...\r
+\r
+class HtmlDiff(object):\r
+    def __init__(self, tabsize: int = ..., wrapcolumn: int = ...,\r
+                 linejunk: _JunkCallback = ...,\r
+                 charjunk: _JunkCallback = ...\r
+                 ) -> None: ...\r
+    def make_file(self, fromlines: Sequence[_StrType], tolines: Sequence[_StrType],\r
+                  fromdesc: _StrType = ..., todesc: _StrType = ..., context: bool = ...,\r
+                  numlines: int = ...) -> _StrType: ...\r
+    def make_table(self, fromlines: Sequence[_StrType], tolines: Sequence[_StrType],\r
+                   fromdesc: _StrType = ..., todesc: _StrType = ..., context: bool = ...,\r
+                   numlines: int = ...) -> _StrType: ...\r
+\r
+def restore(delta: Iterable[_StrType], which: int) -> Iterator[_StrType]: ...\r
+\r
+if sys.version_info >= (3, 5):\r
+    def diff_bytes(\r
+        dfunc: Callable[[Sequence[str], Sequence[str], str, str, str, str, int, str], Iterator[str]],\r
+        a: Sequence[bytes],\r
+        b: Sequence[bytes],\r
+        fromfile: bytes = ...,\r
+        tofile: bytes = ...,\r
+        fromfiledate: bytes = ...,\r
+        tofiledate: bytes = ...,\r
+        n: int = ...,\r
+        lineterm: bytes = ...\r
+    ) -> Iterator[bytes]: ...\r