Fix some mypy typing issues

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-05-31 10:13:54 -07:00
parent 28eca5e2de
commit 6086f5a46d
3 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import textwrap
from .colorizer import PaletteColorizer
from .matricizer import Matricizer, NibbleMatricizer, RandomartMatricizer
from .palettes import Palette, DEFAULT_PALETTES, PALETTES
from .writer import ANSIWriter, SVGWriter
from .writer import ANSIWriter, SVGWriter, Writer
# TODO - WASM compile for embedding directly in HTML

View File

@@ -10,6 +10,7 @@ class Color(metaclass=abc.ABCMeta):
This can be used to convert any color format into another color format.
"""
@abc.abstractmethod
def to_html_color(self) -> str:
"""
Convert this color to an HTML color.

View File

@@ -6,7 +6,7 @@ from .color import Color, HSLColor
HSLRange = range | float | int | list[float | int]
Palette = Sequence[str]
Palette = Sequence[Color]
def quantize(r: range, steps: int = 16) -> list[float]: