2 from _typeshed import Self
3 from typing import Any, Iterator, Sequence, Text, Type
5 if sys.version_info >= (3, 0):
6 from configparser import ConfigParser
8 from ConfigParser import ConfigParser
10 if sys.version_info >= (3, 8):
11 from re import Pattern
13 from typing import Pattern
15 entry_point_pattern: Pattern[Text]
16 file_in_zip_pattern: Pattern[Text]
18 class BadEntryPoint(Exception):
20 def __init__(self, epstr: Text) -> None: ...
22 def err_to_warnings() -> Iterator[None]: ...
24 class NoSuchEntryPoint(Exception):
27 def __init__(self, group: Text, name: Text) -> None: ...
33 extras: Sequence[Text] | None
34 distro: Distribution | None
40 extras: Sequence[Text] | None = ...,
41 distro: Distribution | None = ...,
43 def load(self) -> Any: ...
45 def from_string(cls: Type[Self], epstr: Text, name: Text, distro: Distribution | None = ...) -> Self: ...
50 def __init__(self, name: Text, version: Text) -> None: ...
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]: ...