formatting

This commit is contained in:
2021-01-01 13:10:41 -05:00
parent c43c6b3053
commit a203828c11
+16 -11
View File
@@ -1,9 +1,12 @@
"""Pure Python ANSI Color Escape Code generator."""
import colorsys
def clear() -> None:
"""Clear the terminal."""
print("\033[H\033[2J", end="", flush=True)
@@ -41,7 +44,7 @@ class Color:
Args:
hexvalue (str): The color's hex value
Raises:
ValueError
@@ -65,7 +68,7 @@ class Color:
Args:
hexvalue (str): The color's hex value
Raises:
ValueError
@@ -87,7 +90,7 @@ class Color:
Args:
hexvalue (str): The color's hex value
Raises:
ValueError
@@ -124,14 +127,16 @@ class Bit:
self.bg = f"\033[48;5;{value}m"
attributes = { # use only repl.it supported ansi codes. Codes such as blink do not work.
"reset": 0,
"bold": 1,
"faint": 2,
"italic": 3,
"underline": 4,
"highlight": 7,
}
attributes = (
{ # use only repl.it supported ansi codes. Codes such as blink do not work.
"reset": 0,
"bold": 1,
"faint": 2,
"italic": 3,
"underline": 4,
"highlight": 7,
}
)
class Attr: