Annotate return type of pygments.plugin.iter_entry_points (#6697)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Sebastian Rittau
2021-12-26 14:44:40 +01:00
committed by GitHub
parent 0e75580381
commit 74cd202b2d
2 changed files with 4 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
version = "2.9.*"
requires = ["types-docutils"]
requires = ["types-docutils", "types-setuptools"]

View File

@@ -1,5 +1,6 @@
from typing import Any, Generator, Iterable
from typing import Generator, Iterable
from pkg_resources import EntryPoint
from pygments.filter import Filter
from pygments.formatter import Formatter
from pygments.lexer import Lexer
@@ -10,7 +11,7 @@ FORMATTER_ENTRY_POINT: str
STYLE_ENTRY_POINT: str
FILTER_ENTRY_POINT: str
def iter_entry_points(group_name: str) -> Iterable[Any]: ...
def iter_entry_points(group_name: str) -> Iterable[EntryPoint]: ...
def find_plugin_lexers() -> Generator[type[Lexer], None, None]: ...
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter]], None, None]: ...
def find_plugin_styles() -> Generator[tuple[str, type[Style]], None, None]: ...