summaryrefslogtreecommitdiffstats
path: root/typing-stubs/colored
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:59:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:59:48 +0000
commit6dba7fe33f3f508033d1192ef4dbf98707f24140 (patch)
treed84b5b1ebca79975ae2a30f22c91c7964182c223 /typing-stubs/colored
parentAdding debian version 0.1.28. (diff)
downloaddebputy-6dba7fe33f3f508033d1192ef4dbf98707f24140.tar.xz
debputy-6dba7fe33f3f508033d1192ef4dbf98707f24140.zip
Merging upstream version 0.1.29.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'typing-stubs/colored')
-rw-r--r--typing-stubs/colored/__init__.pyi8
-rw-r--r--typing-stubs/colored/attributes.pyi14
-rw-r--r--typing-stubs/colored/background.pyi14
-rw-r--r--typing-stubs/colored/colored.pyi30
-rw-r--r--typing-stubs/colored/controls.pyi8
-rw-r--r--typing-stubs/colored/cprint.pyi3
-rw-r--r--typing-stubs/colored/exceptions.pyi17
-rw-r--r--typing-stubs/colored/foreground.pyi14
-rw-r--r--typing-stubs/colored/hexadecimal.pyi7
-rw-r--r--typing-stubs/colored/library.pyi17
-rw-r--r--typing-stubs/colored/utilities.pyi13
11 files changed, 145 insertions, 0 deletions
diff --git a/typing-stubs/colored/__init__.pyi b/typing-stubs/colored/__init__.pyi
new file mode 100644
index 0000000..340b656
--- /dev/null
+++ b/typing-stubs/colored/__init__.pyi
@@ -0,0 +1,8 @@
+from .attributes import Style as Style
+from .background import Back as Back
+from .colored import Colored as Colored, attr as attr, back as back, back_rgb as back_rgb, bg as bg, fg as fg, fore as fore, fore_rgb as fore_rgb, set_tty_aware as set_tty_aware, style as style, stylize as stylize, stylize_interactive as stylize_interactive
+from .controls import Controls as Controls
+from .cprint import cprint as cprint
+from .foreground import Fore as Fore
+
+__version__: str
diff --git a/typing-stubs/colored/attributes.pyi b/typing-stubs/colored/attributes.pyi
new file mode 100644
index 0000000..d7fc0ab
--- /dev/null
+++ b/typing-stubs/colored/attributes.pyi
@@ -0,0 +1,14 @@
+from .exceptions import InvalidStyle as InvalidStyle
+from .library import Library as Library
+from .utilities import Utilities as Utilities
+
+class MetaStyle(type):
+ def __getattr__(cls, color: str): ...
+
+class Style(metaclass=MetaStyle):
+ @classmethod
+ def underline_color(cls, color: str | int) -> str: ...
+ @classmethod
+ def UNDERLINE_COLOR(cls, color: str | int) -> str: ...
+
+class style(Style): ...
diff --git a/typing-stubs/colored/background.pyi b/typing-stubs/colored/background.pyi
new file mode 100644
index 0000000..f98ef99
--- /dev/null
+++ b/typing-stubs/colored/background.pyi
@@ -0,0 +1,14 @@
+from .exceptions import InvalidColor as InvalidColor
+from .library import Library as Library
+from .utilities import Utilities as Utilities
+
+class MetaBack(type):
+ def __getattr__(cls, color: str): ...
+
+class Back(metaclass=MetaBack):
+ @classmethod
+ def rgb(cls, r: int | str, g: int | str, b: int | str) -> str: ...
+ @classmethod
+ def RGB(cls, r: int | str, g: int | str, b: int | str) -> str: ...
+
+class back(Back): ...
diff --git a/typing-stubs/colored/colored.pyi b/typing-stubs/colored/colored.pyi
new file mode 100644
index 0000000..8a463ac
--- /dev/null
+++ b/typing-stubs/colored/colored.pyi
@@ -0,0 +1,30 @@
+from .hexadecimal import Hex as Hex
+from .library import Library as Library
+from .utilities import Utilities as Utilities
+from _typeshed import Incomplete
+from typing import Any
+
+TTY_AWARE: bool
+IS_TTY: Incomplete
+
+class Colored:
+ def __init__(self, name: Any) -> None: ...
+ def attribute(self, line_color: str = '') -> str: ...
+ def foreground(self) -> str: ...
+ def background(self) -> str: ...
+ @staticmethod
+ def enable_windows_terminal_mode() -> Any: ...
+ @staticmethod
+ def enabled() -> bool: ...
+
+def style(name: int | str, color: str | int = '') -> str: ...
+def fore(name: int | str) -> str: ...
+def back(name: int | str) -> str: ...
+def fore_rgb(r: int | str, g: int | str, b: int | str) -> str: ...
+def back_rgb(r: int | str, g: int | str, b: int | str) -> str: ...
+def attr(name: int | str) -> str: ...
+def fg(name: int | str) -> str: ...
+def bg(name: int | str) -> str: ...
+def stylize(text: str, formatting: int | str, reset: bool = True) -> str: ...
+def stylize_interactive(text: str, formatting: str, reset: bool = True) -> str: ...
+def set_tty_aware(awareness: bool = True) -> None: ...
diff --git a/typing-stubs/colored/controls.pyi b/typing-stubs/colored/controls.pyi
new file mode 100644
index 0000000..11bf845
--- /dev/null
+++ b/typing-stubs/colored/controls.pyi
@@ -0,0 +1,8 @@
+from .exceptions import InvalidControl as InvalidControl
+from .library import Library as Library
+from .utilities import Utilities as Utilities
+from _typeshed import Incomplete
+
+class Controls:
+ def __init__(self) -> None: ...
+ def nav(self, name: str, row: int, column: Incomplete | None = None) -> str: ...
diff --git a/typing-stubs/colored/cprint.pyi b/typing-stubs/colored/cprint.pyi
new file mode 100644
index 0000000..81b942d
--- /dev/null
+++ b/typing-stubs/colored/cprint.pyi
@@ -0,0 +1,3 @@
+from .colored import Colored as Colored
+
+def cprint(text: str, fore_256: int | str = '', back_256: int | str = '', fore_rgb: tuple = (255, 255, 255), back_rgb: tuple = (0, 0, 0), formatting: int | str = '', line_color: int | str = '', reset: bool = True, **kwargs) -> None: ...
diff --git a/typing-stubs/colored/exceptions.pyi b/typing-stubs/colored/exceptions.pyi
new file mode 100644
index 0000000..cf3e9b8
--- /dev/null
+++ b/typing-stubs/colored/exceptions.pyi
@@ -0,0 +1,17 @@
+from _typeshed import Incomplete
+
+class InvalidColor(Exception):
+ message: Incomplete
+ def __init__(self, message: str) -> None: ...
+
+class InvalidHexColor(Exception):
+ message: Incomplete
+ def __init__(self, message: str) -> None: ...
+
+class InvalidStyle(Exception):
+ message: Incomplete
+ def __init__(self, message: str) -> None: ...
+
+class InvalidControl(Exception):
+ message: Incomplete
+ def __init__(self, message: str) -> None: ...
diff --git a/typing-stubs/colored/foreground.pyi b/typing-stubs/colored/foreground.pyi
new file mode 100644
index 0000000..1bca2ed
--- /dev/null
+++ b/typing-stubs/colored/foreground.pyi
@@ -0,0 +1,14 @@
+from .exceptions import InvalidColor as InvalidColor
+from .library import Library as Library
+from .utilities import Utilities as Utilities
+
+class MetaFore(type):
+ def __getattr__(cls, color: str): ...
+
+class Fore(metaclass=MetaFore):
+ @classmethod
+ def rgb(cls, r: int | str, g: int | str, b: int | str) -> str: ...
+ @classmethod
+ def RGB(cls, r: int | str, g: int | str, b: int | str) -> str: ...
+
+class fore(Fore): ...
diff --git a/typing-stubs/colored/hexadecimal.pyi b/typing-stubs/colored/hexadecimal.pyi
new file mode 100644
index 0000000..17f376e
--- /dev/null
+++ b/typing-stubs/colored/hexadecimal.pyi
@@ -0,0 +1,7 @@
+from .library import Library as Library
+
+class Hex:
+ def find(self, color: str | int) -> str: ...
+ @staticmethod
+ def cube(x: int) -> int: ...
+ def fit(self, hex_val: str, ref: int) -> int: ...
diff --git a/typing-stubs/colored/library.pyi b/typing-stubs/colored/library.pyi
new file mode 100644
index 0000000..c8ff33a
--- /dev/null
+++ b/typing-stubs/colored/library.pyi
@@ -0,0 +1,17 @@
+from dataclasses import dataclass
+
+@dataclass
+class Library:
+ ESC: str = ...
+ END: str = ...
+ FOREGROUND_256: str = ...
+ BACKGROUND_256: str = ...
+ FOREGROUND_RGB: str = ...
+ BACKGROUND_RGB: str = ...
+ UNDERLINE_COLOR: str = ...
+ CONTROLS = ...
+ STYLES = ...
+ COLORTERM = ...
+ COLORS = ...
+ HEX_COLORS = ...
+ def __init__(self, ESC, END, FOREGROUND_256, BACKGROUND_256, FOREGROUND_RGB, BACKGROUND_RGB, UNDERLINE_COLOR) -> None: ...
diff --git a/typing-stubs/colored/utilities.pyi b/typing-stubs/colored/utilities.pyi
new file mode 100644
index 0000000..97a1157
--- /dev/null
+++ b/typing-stubs/colored/utilities.pyi
@@ -0,0 +1,13 @@
+from .exceptions import InvalidColor as InvalidColor, InvalidControl as InvalidControl, InvalidHexColor as InvalidHexColor, InvalidStyle as InvalidStyle
+from .library import Library as Library
+
+class Utilities:
+ RGB_MAXIMUM_COLOR: int
+ colorterm: str
+ def __init__(self) -> None: ...
+ def is_color_exist(self, name: str) -> bool: ...
+ def is_style_exist(self, name: str) -> bool: ...
+ def is_control_exist(self, name: str) -> bool: ...
+ def convert_percentages(self, percent: str | int) -> int | str: ...
+ def set_colorterm(self, colorterm: str = ''): ...
+ def is_percentage(self, numbers: tuple) -> list: ...