Skip to content

Commit 95182f0

Browse files
committed
fix colorful handle dynamic type
1 parent 23246f8 commit 95182f0

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
from _typeshed import SupportsWrite
2+
from builtins import str as _str
3+
from collections.abc import ContextManager
4+
from typing import Final
5+
from typing_extensions import LiteralString
6+
7+
from .core import Colorful, ColorfulString, _ColorModeType, _PaletteType
8+
9+
__version__: Final[_str]
10+
11+
NO_COLORS: Final[int]
12+
ANSI_8_COLORS: Final[int]
13+
ANSI_16_COLORS: Final[int]
14+
ANSI_256_COLORS: Final[int]
15+
TRUE_COLORS: Final[int]
16+
COLORNAMES_COLORS: Final[_str]
17+
18+
close_fg_color: Final[_str]
19+
close_bg_color: Final[_str]
20+
no_bold: Final[_str]
21+
no_dimmed: Final[_str]
22+
no_italic: Final[_str]
23+
no_underlined: Final[_str]
24+
no_blinkslow: Final[_str]
25+
no_blinkrapid: Final[_str]
26+
no_inversed: Final[_str]
27+
no_concealed: Final[_str]
28+
no_struckthrough: Final[_str]
29+
30+
colormode: _ColorModeType
31+
colorpalette: _str | _PaletteType | None
32+
33+
def setup(
34+
colormode: _ColorModeType | None = None, colorpalette: _str | _PaletteType | None = None, extend_colors: bool = False
35+
) -> None: ...
36+
def disable() -> None: ...
37+
def use_8_ansi_colors() -> None: ...
38+
def use_16_ansi_colors() -> None: ...
39+
def use_256_ansi_colors() -> None: ...
40+
def use_true_colors() -> None: ...
41+
def use_palette(colorpalette: _str | _PaletteType) -> None: ...
42+
def update_palette(colorpalette: _str | _PaletteType) -> None: ...
43+
def use_style(style_name: _str) -> None: ...
44+
def format(string: _str, *args: LiteralString, **kwargs: LiteralString) -> _str: ...
45+
def str(string: _str) -> ColorfulString: ...
46+
def print(
47+
*objects: object, sep: _str = " ", end: _str = "\n", file: SupportsWrite[_str] | None = None, flush: bool = False
48+
) -> None: ...
49+
def with_setup(
50+
colormode: _ColorModeType | None = None, colorpalette: _str | _PaletteType | None = None, extend_colors: bool = False
51+
) -> ContextManager[Colorful]: ...
52+
def with_8_ansi_colors() -> ContextManager[Colorful]: ...
53+
def with_16_ansi_colors() -> ContextManager[Colorful]: ...
54+
def with_256_ansi_colors() -> ContextManager[Colorful]: ...
55+
def with_true_colors() -> ContextManager[Colorful]: ...
56+
def with_palette(colorpalette: _str | _PaletteType) -> ContextManager[Colorful]: ...
57+
def with_updated_palette(colorpalette: _str | _PaletteType) -> ContextManager[Colorful]: ...
58+
def with_style(style_name: _str) -> ContextManager[Colorful]: ...
59+
def __getattr__(name: _str) -> Colorful.ColorfulStyle: ...

0 commit comments

Comments
 (0)