mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
[Pygments] Use Incomplete instead of Any (#15053)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
esc: str
|
||||
codes: Any
|
||||
dark_colors: Any
|
||||
light_colors: Any
|
||||
codes: Incomplete
|
||||
dark_colors: Incomplete
|
||||
light_colors: Incomplete
|
||||
|
||||
def reset_color(): ...
|
||||
def colorize(color_key, text): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.lexer import Lexer
|
||||
from pygments.token import _TokenType
|
||||
@@ -8,11 +8,11 @@ def apply_filters(stream, filters, lexer=None): ...
|
||||
def simplefilter(f): ...
|
||||
|
||||
class Filter:
|
||||
options: Any
|
||||
options: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class FunctionFilter(Filter):
|
||||
function: Any
|
||||
function: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.filter import Filter
|
||||
from pygments.lexer import Lexer
|
||||
@@ -7,46 +7,46 @@ from pygments.token import _TokenType
|
||||
|
||||
def find_filter_class(filtername): ...
|
||||
def get_filter_by_name(filtername, **options): ...
|
||||
def get_all_filters() -> Generator[str, None, None]: ...
|
||||
def get_all_filters() -> Generator[str]: ...
|
||||
|
||||
class CodeTagFilter(Filter):
|
||||
tag_re: Any
|
||||
tag_re: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class SymbolFilter(Filter):
|
||||
latex_symbols: Any
|
||||
isabelle_symbols: Any
|
||||
lang_map: Any
|
||||
symbols: Any
|
||||
latex_symbols: Incomplete
|
||||
isabelle_symbols: Incomplete
|
||||
lang_map: Incomplete
|
||||
symbols: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class KeywordCaseFilter(Filter):
|
||||
convert: Any
|
||||
convert: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class NameHighlightFilter(Filter):
|
||||
names: Any
|
||||
tokentype: Any
|
||||
names: Incomplete
|
||||
tokentype: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class ErrorToken(Exception): ...
|
||||
|
||||
class RaiseOnErrorTokenFilter(Filter):
|
||||
exception: Any
|
||||
exception: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class VisibleWhitespaceFilter(Filter):
|
||||
wstt: Any
|
||||
wstt: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class GobbleFilter(Filter):
|
||||
n: Any
|
||||
n: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def gobble(self, value, left): ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
@@ -55,4 +55,4 @@ class TokenMergeFilter(Filter):
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
FILTERS: Any
|
||||
FILTERS: Incomplete
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from _typeshed import Incomplete
|
||||
from typing import Generic, TypeVar, overload
|
||||
|
||||
_T = TypeVar("_T", str, bytes)
|
||||
|
||||
class Formatter(Generic[_T]):
|
||||
name: Any
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
name: Incomplete
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
style: Any
|
||||
full: Any
|
||||
title: Any
|
||||
encoding: Any
|
||||
options: Any
|
||||
style: Incomplete
|
||||
full: Incomplete
|
||||
title: Incomplete
|
||||
encoding: Incomplete
|
||||
options: Incomplete
|
||||
@overload
|
||||
def __init__(self: Formatter[str], *, encoding: None = None, outencoding: None = None, **options) -> None: ...
|
||||
@overload
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
from ..formatter import Formatter
|
||||
from .bbcode import BBCodeFormatter as BBCodeFormatter
|
||||
@@ -19,7 +19,7 @@ from .svg import SvgFormatter as SvgFormatter
|
||||
from .terminal import TerminalFormatter as TerminalFormatter
|
||||
from .terminal256 import Terminal256Formatter as Terminal256Formatter, TerminalTrueColorFormatter as TerminalTrueColorFormatter
|
||||
|
||||
def get_all_formatters() -> Generator[type[Formatter[Any]], None, None]: ...
|
||||
def get_all_formatters() -> Generator[type[Formatter[Incomplete]]]: ...
|
||||
def get_formatter_by_name(_alias, **options): ...
|
||||
def load_formatter_from_file(filename, formattername: str = "CustomFormatter", **options): ...
|
||||
def get_formatter_for_filename(fn, **options): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
FORMATTERS: Any
|
||||
FORMATTERS: Incomplete
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,7 +7,7 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class BBCodeFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
styles: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
styles: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,32 +7,32 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class HtmlFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
title: Any
|
||||
nowrap: Any
|
||||
noclasses: Any
|
||||
classprefix: Any
|
||||
cssclass: Any
|
||||
cssstyles: Any
|
||||
prestyles: Any
|
||||
cssfile: Any
|
||||
noclobber_cssfile: Any
|
||||
tagsfile: Any
|
||||
tagurlformat: Any
|
||||
filename: Any
|
||||
wrapcode: Any
|
||||
span_element_openers: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
title: Incomplete
|
||||
nowrap: Incomplete
|
||||
noclasses: Incomplete
|
||||
classprefix: Incomplete
|
||||
cssclass: Incomplete
|
||||
cssstyles: Incomplete
|
||||
prestyles: Incomplete
|
||||
cssfile: Incomplete
|
||||
noclobber_cssfile: Incomplete
|
||||
tagsfile: Incomplete
|
||||
tagurlformat: Incomplete
|
||||
filename: Incomplete
|
||||
wrapcode: Incomplete
|
||||
span_element_openers: Incomplete
|
||||
linenos: int
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
linenospecial: Any
|
||||
nobackground: Any
|
||||
lineseparator: Any
|
||||
lineanchors: Any
|
||||
linespans: Any
|
||||
anchorlinenos: Any
|
||||
hl_lines: Any
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
linenospecial: Incomplete
|
||||
nobackground: Incomplete
|
||||
lineseparator: Incomplete
|
||||
lineanchors: Incomplete
|
||||
linespans: Incomplete
|
||||
anchorlinenos: Incomplete
|
||||
hl_lines: Incomplete
|
||||
def get_style_defs(self, arg=None): ...
|
||||
def get_token_style_defs(self, arg=None): ...
|
||||
def get_background_style_defs(self, arg=None): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -8,10 +9,10 @@ class PilNotAvailable(ImportError): ...
|
||||
class FontNotFound(Exception): ...
|
||||
|
||||
class FontManager:
|
||||
font_name: Any
|
||||
font_size: Any
|
||||
fonts: Any
|
||||
encoding: Any
|
||||
font_name: Incomplete
|
||||
font_size: Incomplete
|
||||
fonts: Incomplete
|
||||
encoding: Incomplete
|
||||
variable: bool
|
||||
def __init__(self, font_name, font_size: int = 14) -> None: ...
|
||||
def get_char_size(self): ...
|
||||
@@ -21,48 +22,48 @@ class FontManager:
|
||||
|
||||
class ImageFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
default_image_format: str
|
||||
encoding: str
|
||||
styles: Any
|
||||
styles: Incomplete
|
||||
background_color: str
|
||||
image_format: Any
|
||||
image_pad: Any
|
||||
line_pad: Any
|
||||
fonts: Any
|
||||
line_number_fg: Any
|
||||
line_number_bg: Any
|
||||
line_number_chars: Any
|
||||
line_number_bold: Any
|
||||
line_number_italic: Any
|
||||
line_number_pad: Any
|
||||
line_numbers: Any
|
||||
line_number_separator: Any
|
||||
line_number_step: Any
|
||||
line_number_start: Any
|
||||
line_number_width: Any
|
||||
hl_lines: Any
|
||||
hl_color: Any
|
||||
drawables: Any
|
||||
image_format: Incomplete
|
||||
image_pad: Incomplete
|
||||
line_pad: Incomplete
|
||||
fonts: Incomplete
|
||||
line_number_fg: Incomplete
|
||||
line_number_bg: Incomplete
|
||||
line_number_chars: Incomplete
|
||||
line_number_bold: Incomplete
|
||||
line_number_italic: Incomplete
|
||||
line_number_pad: Incomplete
|
||||
line_numbers: Incomplete
|
||||
line_number_separator: Incomplete
|
||||
line_number_step: Incomplete
|
||||
line_number_start: Incomplete
|
||||
line_number_width: Incomplete
|
||||
hl_lines: Incomplete
|
||||
hl_color: Incomplete
|
||||
drawables: Incomplete
|
||||
def get_style_defs(self, arg: str = "") -> None: ...
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class GifImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
class JpgImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
class BmpImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,9 +7,9 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class IRCFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
darkbg: Any
|
||||
colorscheme: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
darkbg: Incomplete
|
||||
colorscheme: Incomplete
|
||||
linenos: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
from pygments.lexer import Lexer
|
||||
@@ -7,28 +8,28 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class LatexFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
docclass: Any
|
||||
preamble: Any
|
||||
linenos: Any
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
verboptions: Any
|
||||
nobackground: Any
|
||||
commandprefix: Any
|
||||
texcomments: Any
|
||||
mathescape: Any
|
||||
escapeinside: Any
|
||||
left: Any
|
||||
right: Any
|
||||
envname: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
docclass: Incomplete
|
||||
preamble: Incomplete
|
||||
linenos: Incomplete
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
verboptions: Incomplete
|
||||
nobackground: Incomplete
|
||||
commandprefix: Incomplete
|
||||
texcomments: Incomplete
|
||||
mathescape: Incomplete
|
||||
escapeinside: Incomplete
|
||||
left: Incomplete
|
||||
right: Incomplete
|
||||
envname: Incomplete
|
||||
def get_style_defs(self, arg: str = ""): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class LatexEmbeddedLexer(Lexer):
|
||||
left: Any
|
||||
right: Any
|
||||
lang: Any
|
||||
left: Incomplete
|
||||
right: Incomplete
|
||||
lang: Incomplete
|
||||
def __init__(self, left, right, lang, **options) -> None: ...
|
||||
def get_tokens_unprocessed(self, text): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,21 +7,21 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class NullFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class RawTokenFormatter(Formatter[bytes]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
encoding: str
|
||||
compress: Any
|
||||
error_color: Any
|
||||
compress: Incomplete
|
||||
error_color: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class TestcaseFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
aliases: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,7 +7,7 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class PangoMarkupFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
styles: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
styles: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,8 +7,8 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class RtfFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
fontface: Any
|
||||
fontsize: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
fontface: Incomplete
|
||||
fontsize: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,17 +7,17 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class SvgFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
nowrap: Any
|
||||
fontfamily: Any
|
||||
fontsize: Any
|
||||
xoffset: Any
|
||||
yoffset: Any
|
||||
ystep: Any
|
||||
spacehack: Any
|
||||
linenos: Any
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
linenowidth: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
nowrap: Incomplete
|
||||
fontfamily: Incomplete
|
||||
fontsize: Incomplete
|
||||
xoffset: Incomplete
|
||||
yoffset: Incomplete
|
||||
ystep: Incomplete
|
||||
spacehack: Incomplete
|
||||
linenos: Incomplete
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
linenowidth: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,10 +7,10 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class TerminalFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
darkbg: Any
|
||||
colorscheme: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
darkbg: Incomplete
|
||||
colorscheme: Incomplete
|
||||
linenos: Incomplete
|
||||
def format(self, tokensource, outfile): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
_T = TypeVar("_T", str, bytes)
|
||||
|
||||
class EscapeSequence:
|
||||
fg: Any
|
||||
bg: Any
|
||||
bold: Any
|
||||
underline: Any
|
||||
italic: Any
|
||||
fg: Incomplete
|
||||
bg: Incomplete
|
||||
bold: Incomplete
|
||||
underline: Incomplete
|
||||
italic: Incomplete
|
||||
def __init__(self, fg=None, bg=None, bold: bool = False, underline: bool = False, italic: bool = False) -> None: ...
|
||||
def escape(self, attrs): ...
|
||||
def color_string(self): ...
|
||||
@@ -18,19 +19,19 @@ class EscapeSequence:
|
||||
|
||||
class Terminal256Formatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
xterm_colors: Any
|
||||
best_match: Any
|
||||
style_string: Any
|
||||
usebold: Any
|
||||
useunderline: Any
|
||||
useitalic: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
xterm_colors: Incomplete
|
||||
best_match: Incomplete
|
||||
style_string: Incomplete
|
||||
usebold: Incomplete
|
||||
useunderline: Incomplete
|
||||
useitalic: Incomplete
|
||||
linenos: Incomplete
|
||||
def format(self, tokensource, outfile): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class TerminalTrueColorFormatter(Terminal256Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
from _typeshed import FileDescriptorOrPath, StrPath
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.lexer import Lexer, LexerMeta
|
||||
|
||||
def get_all_lexers(plugins: bool = True) -> Iterator[tuple[str, tuple[str, ...], tuple[str, ...], tuple[str, ...]]]: ...
|
||||
def find_lexer_class(name: str) -> LexerMeta | None: ...
|
||||
def find_lexer_class_by_name(_alias: str) -> LexerMeta: ...
|
||||
def get_lexer_by_name(_alias: str, **options: Any) -> Lexer: ...
|
||||
def load_lexer_from_file(filename: FileDescriptorOrPath, lexername: str = "CustomLexer", **options: Any) -> Lexer: ...
|
||||
def get_lexer_by_name(_alias: str, **options) -> Lexer: ...
|
||||
def load_lexer_from_file(filename: FileDescriptorOrPath, lexername: str = "CustomLexer", **options) -> Lexer: ...
|
||||
def find_lexer_class_for_filename(_fn: StrPath, code: str | bytes | None = None) -> LexerMeta | None: ...
|
||||
def get_lexer_for_filename(_fn: StrPath, code: str | bytes | None = None, **options: Any) -> Lexer: ...
|
||||
def get_lexer_for_mimetype(_mime: str, **options: Any) -> Lexer: ...
|
||||
def guess_lexer_for_filename(_fn: StrPath, _text: str, **options: Any) -> Lexer: ...
|
||||
def guess_lexer(_text: str | bytes, **options: Any) -> Lexer: ...
|
||||
def get_lexer_for_filename(_fn: StrPath, code: str | bytes | None = None, **options) -> Lexer: ...
|
||||
def get_lexer_for_mimetype(_mime: str, **options) -> Lexer: ...
|
||||
def guess_lexer_for_filename(_fn: StrPath, _text: str, **options) -> Lexer: ...
|
||||
def guess_lexer(_text: str | bytes, **options) -> Lexer: ...
|
||||
|
||||
# Having every lexer class here doesn't seem to be worth it
|
||||
def __getattr__(name: str): ... # incomplete module
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
from pygments.filter import Filter
|
||||
from pygments.formatter import Formatter
|
||||
@@ -21,7 +21,7 @@ else:
|
||||
|
||||
def iter_entry_points(group_name: str) -> tuple[EntryPoint, ...] | list[EntryPoint]: ...
|
||||
|
||||
def find_plugin_lexers() -> Generator[type[Lexer], None, None]: ...
|
||||
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter[Any]]], None, None]: ...
|
||||
def find_plugin_styles() -> Generator[tuple[str, type[Style]], None, None]: ...
|
||||
def find_plugin_filters() -> Generator[tuple[str, type[Filter]], None, None]: ...
|
||||
def find_plugin_lexers() -> Generator[type[Lexer]]: ...
|
||||
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter[Incomplete]]]]: ...
|
||||
def find_plugin_styles() -> Generator[tuple[str, type[Style]]]: ...
|
||||
def find_plugin_filters() -> Generator[tuple[str, type[Filter]]]: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
CS_ESCAPE: Any
|
||||
FIRST_ELEMENT: Any
|
||||
CS_ESCAPE: Incomplete
|
||||
FIRST_ELEMENT: Incomplete
|
||||
|
||||
def make_charset(letters): ...
|
||||
def regex_opt_inner(strings, open_paren): ...
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class EndOfText(RuntimeError): ...
|
||||
|
||||
class Scanner:
|
||||
data: Any
|
||||
data_length: Any
|
||||
data: Incomplete
|
||||
data_length: Incomplete
|
||||
start_pos: int
|
||||
pos: int
|
||||
flags: Any
|
||||
last: Any
|
||||
match: Any
|
||||
flags: Incomplete
|
||||
last: Incomplete
|
||||
match: Incomplete
|
||||
def __init__(self, text, flags: int = 0) -> None: ...
|
||||
@property
|
||||
def eos(self): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
Cc: str
|
||||
Cf: str
|
||||
@@ -32,7 +32,7 @@ Zp: str
|
||||
Zs: str
|
||||
xid_continue: str
|
||||
xid_start: str
|
||||
cats: Any
|
||||
cats: Incomplete
|
||||
|
||||
def combine(*args): ...
|
||||
def allexcept(*args): ...
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from io import TextIOWrapper
|
||||
from typing import Any
|
||||
|
||||
split_path_re: Any
|
||||
doctype_lookup_re: Any
|
||||
tag_re: Any
|
||||
xml_decl_re: Any
|
||||
split_path_re: Incomplete
|
||||
doctype_lookup_re: Incomplete
|
||||
tag_re: Incomplete
|
||||
xml_decl_re: Incomplete
|
||||
|
||||
class ClassNotFound(ValueError): ...
|
||||
class OptionError(Exception): ...
|
||||
|
||||
Reference in New Issue
Block a user