massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / entrypoints / entrypoints.pyi
1 import sys
2 from _typeshed import Self
3 from typing import Any, Iterator, Sequence, Text, Type
4
5 if sys.version_info >= (3, 0):
6     from configparser import ConfigParser
7 else:
8     from ConfigParser import ConfigParser
9
10 if sys.version_info >= (3, 8):
11     from re import Pattern
12 else:
13     from typing import Pattern
14
15 entry_point_pattern: Pattern[Text]
16 file_in_zip_pattern: Pattern[Text]
17
18 class BadEntryPoint(Exception):
19     epstr: Text
20     def __init__(self, epstr: Text) -> None: ...
21     @staticmethod
22     def err_to_warnings() -> Iterator[None]: ...
23
24 class NoSuchEntryPoint(Exception):
25     group: Text
26     name: Text
27     def __init__(self, group: Text, name: Text) -> None: ...
28
29 class EntryPoint:
30     name: Text
31     module_name: Text
32     object_name: Text
33     extras: Sequence[Text] | None
34     distro: Distribution | None
35     def __init__(
36         self,
37         name: Text,
38         module_name: Text,
39         object_name: Text,
40         extras: Sequence[Text] | None = ...,
41         distro: Distribution | None = ...,
42     ) -> None: ...
43     def load(self) -> Any: ...
44     @classmethod
45     def from_string(cls: Type[Self], epstr: Text, name: Text, distro: Distribution | None = ...) -> Self: ...
46
47 class Distribution:
48     name: Text
49     version: Text
50     def __init__(self, name: Text, version: Text) -> None: ...
51
52 def iter_files_distros(
53     path: Sequence[Text] | None = ..., repeated_distro: Text = ...
54 ) -> Iterator[tuple[ConfigParser, Distribution | None]]: ...
55 def get_single(group: Text, name: Text, path: Sequence[Text] | None = ...) -> EntryPoint: ...
56 def get_group_named(group: Text, path: Sequence[Text] | None = ...) -> dict[str, EntryPoint]: ...
57 def get_group_all(group: Text, path: Sequence[Text] | None = ...) -> list[EntryPoint]: ...