massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / fileinput.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/fileinput.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/fileinput.pyi
new file mode 100644 (file)
index 0000000..5392675
--- /dev/null
@@ -0,0 +1,62 @@
+from typing import Iterable, Callable, IO, AnyStr, Generic, Any, Text, Union, Iterator, Optional\r
+\r
+import os\r
+import sys\r
+\r
+if sys.version_info >= (3, 6):\r
+    _Path = Union[Text, bytes, os.PathLike[Any]]\r
+else:\r
+    _Path = Union[Text, bytes]\r
+\r
+\r
+def input(\r
+    files: Union[_Path, Iterable[_Path], None] = ...,\r
+    inplace: bool = ...,\r
+    backup: str = ...,\r
+    bufsize: int = ...,\r
+    mode: str = ...,\r
+    openhook: Callable[[_Path, str], IO[AnyStr]] = ...) -> FileInput[AnyStr]: ...\r
+\r
+\r
+def close() -> None: ...\r
+def nextfile() -> None: ...\r
+def filename() -> str: ...\r
+def lineno() -> int: ...\r
+def filelineno() -> int: ...\r
+def fileno() -> int: ...\r
+def isfirstline() -> bool: ...\r
+def isstdin() -> bool: ...\r
+\r
+class FileInput(Iterable[AnyStr], Generic[AnyStr]):\r
+    def __init__(\r
+        self,\r
+        files: Union[None, _Path, Iterable[_Path]] = ...,\r
+        inplace: bool = ...,\r
+        backup: str = ...,\r
+        bufsize: int = ...,\r
+        mode: str = ...,\r
+        openhook: Callable[[_Path, str], IO[AnyStr]] = ...\r
+    ) -> None: ...\r
+\r
+    def __del__(self) -> None: ...\r
+    def close(self) -> None: ...\r
+    if sys.version_info >= (3, 2):\r
+        def __enter__(self) -> FileInput[AnyStr]: ...\r
+        def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...\r
+    def __iter__(self) -> Iterator[AnyStr]: ...\r
+    def __next__(self) -> AnyStr: ...\r
+    def __getitem__(self, i: int) -> AnyStr: ...\r
+    def nextfile(self) -> None: ...\r
+    def readline(self) -> AnyStr: ...\r
+    def filename(self) -> str: ...\r
+    def lineno(self) -> int: ...\r
+    def filelineno(self) -> int: ...\r
+    def fileno(self) -> int: ...\r
+    def isfirstline(self) -> bool: ...\r
+    def isstdin(self) -> bool: ...\r
+\r
+def hook_compressed(filename: _Path, mode: str) -> IO[Any]: ...\r
+if sys.version_info >= (3, 6):\r
+    def hook_encoded(encoding: str, errors: Optional[str] = ...) -> Callable[[_Path, str], IO[Any]]: ...\r
+else:\r
+    def hook_encoded(encoding: str) -> Callable[[_Path, str], IO[Any]]: ...\r