massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Pygments / pygments / style.pyi
1 from collections.abc import Iterator, Mapping, Set
2 from typing_extensions import TypedDict
3
4 from pygments.token import _TokenType
5
6 ansicolors: Set[str]  # not intended to be mutable (== typing.AbstractSet, not builtins.set)
7
8 class _StyleDict(TypedDict):
9     color: str | None
10     bold: bool
11     italic: bool
12     underline: bool
13     bgcolor: str | None
14     border: str | None
15     roman: bool | None  # lol yes, can be True or False or None
16     sans: bool | None
17     mono: bool | None
18     ansicolor: str | None
19     bgansicolor: str | None
20
21 class StyleMeta(type):
22     def __new__(cls, name, bases, dct): ...
23     def style_for_token(cls, token: _TokenType) -> _StyleDict: ...
24     def styles_token(cls, ttype: _TokenType) -> bool: ...
25     def list_styles(cls) -> list[tuple[_TokenType, _StyleDict]]: ...
26     def __iter__(cls) -> Iterator[tuple[_TokenType, _StyleDict]]: ...
27     def __len__(cls) -> int: ...
28     # These are a bit tricky.
29     # Technically should be ClassVar in class Style.
30     # But then we can't use StyleMeta to denote a style class.
31     # We need that because Type[Style] is not iterable, for example.
32     background_color: str
33     highlight_color: str
34     line_number_color: str
35     line_number_background_color: str
36     line_number_special_color: str
37     line_number_special_background_color: str
38     styles: Mapping[_TokenType, str]  # not intended to be mutable
39
40 class Style(metaclass=StyleMeta): ...