massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / importlib / resources.pyi
1 import sys\r
2 # This is a >=3.7 module, so we conditionally include its source.\r
3 if sys.version_info >= (3, 7):\r
4     import os\r
5 \r
6     from pathlib import Path\r
7     from types import ModuleType\r
8     from typing import ContextManager, Iterator, Union, BinaryIO, TextIO\r
9 \r
10     Package = Union[str, ModuleType]\r
11     Resource = Union[str, os.PathLike]\r
12 \r
13     def open_binary(package: Package, resource: Resource) -> BinaryIO: ...\r
14     def open_text(package: Package,\r
15                 resource: Resource,\r
16                 encoding: str = ...,\r
17                 errors: str = ...) -> TextIO: ...\r
18     def read_binary(package: Package, resource: Resource) -> bytes: ...\r
19     def read_text(package: Package,\r
20                 resource: Resource,\r
21                 encoding: str = ...,\r
22                 errors: str = ...) -> str: ...\r
23     def path(package: Package, resource: Resource) -> ContextManager[Path]: ...\r
24     def is_resource(package: Package, name: str) -> bool: ...\r
25     def contents(package: Package) -> Iterator[str]: ...\r