mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
pygments: Annotate several generator functions (#6695)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Iterable, Iterator
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.filter import Filter
|
||||
@@ -7,7 +7,7 @@ from pygments.token import _TokenType
|
||||
|
||||
def find_filter_class(filtername): ...
|
||||
def get_filter_by_name(filtername, **options): ...
|
||||
def get_all_filters(): ...
|
||||
def get_all_filters() -> Generator[str, None, None]: ...
|
||||
|
||||
class CodeTagFilter(Filter):
|
||||
tag_re: Any
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
from typing import Any, Generator, Iterable
|
||||
|
||||
from pygments.filter import Filter
|
||||
from pygments.formatter import Formatter
|
||||
from pygments.lexer import Lexer
|
||||
from pygments.style import Style
|
||||
|
||||
LEXER_ENTRY_POINT: str
|
||||
FORMATTER_ENTRY_POINT: str
|
||||
STYLE_ENTRY_POINT: str
|
||||
FILTER_ENTRY_POINT: str
|
||||
|
||||
def iter_entry_points(group_name): ...
|
||||
def find_plugin_lexers() -> None: ...
|
||||
def find_plugin_formatters() -> None: ...
|
||||
def find_plugin_styles() -> None: ...
|
||||
def find_plugin_filters() -> None: ...
|
||||
def iter_entry_points(group_name: str) -> Iterable[Any]: ...
|
||||
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]: ...
|
||||
def find_plugin_filters() -> Generator[tuple[str, type[Filter]], None, None]: ...
|
||||
|
||||
Reference in New Issue
Block a user