Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stubs/Pygments/pygments/console.pyi
Original file line number Diff line number Diff line change
@@ -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): ...
Expand Down
6 changes: 3 additions & 3 deletions stubs/Pygments/pygments/filter.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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]]: ...
28 changes: 14 additions & 14 deletions stubs/Pygments/pygments/filters/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
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
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]]: ...
Expand All @@ -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
19 changes: 10 additions & 9 deletions stubs/Pygments/pygments/formatter.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions stubs/Pygments/pygments/formatters/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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): ...
4 changes: 2 additions & 2 deletions stubs/Pygments/pygments/formatters/_mapping.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from typing import Any
from _typeshed import Incomplete

FORMATTERS: Any
FORMATTERS: Incomplete
9 changes: 5 additions & 4 deletions stubs/Pygments/pygments/formatters/bbcode.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from typing import Any, TypeVar
from _typeshed import Incomplete
from typing import TypeVar

from pygments.formatter import Formatter

_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: ...
53 changes: 27 additions & 26 deletions stubs/Pygments/pygments/formatters/html.pyi
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
from typing import Any, TypeVar
from _typeshed import Incomplete
from typing import TypeVar

from pygments.formatter import Formatter

_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): ...
Expand Down
65 changes: 33 additions & 32 deletions stubs/Pygments/pygments/formatters/img.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, TypeVar
from _typeshed import Incomplete
from typing import TypeVar

from pygments.formatter import Formatter

Expand All @@ -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): ...
Expand All @@ -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
13 changes: 7 additions & 6 deletions stubs/Pygments/pygments/formatters/irc.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from typing import Any, TypeVar
from _typeshed import Incomplete
from typing import TypeVar

from pygments.formatter import Formatter

_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: ...
Loading