Fix some mypy typing issues
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import textwrap
|
|||||||
from .colorizer import PaletteColorizer
|
from .colorizer import PaletteColorizer
|
||||||
from .matricizer import Matricizer, NibbleMatricizer, RandomartMatricizer
|
from .matricizer import Matricizer, NibbleMatricizer, RandomartMatricizer
|
||||||
from .palettes import Palette, DEFAULT_PALETTES, PALETTES
|
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
|
# TODO - WASM compile for embedding directly in HTML
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Color(metaclass=abc.ABCMeta):
|
|||||||
This can be used to convert any color format into another color format.
|
This can be used to convert any color format into another color format.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def to_html_color(self) -> str:
|
def to_html_color(self) -> str:
|
||||||
"""
|
"""
|
||||||
Convert this color to an HTML color.
|
Convert this color to an HTML color.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from .color import Color, HSLColor
|
|||||||
|
|
||||||
|
|
||||||
HSLRange = range | float | int | list[float | int]
|
HSLRange = range | float | int | list[float | int]
|
||||||
Palette = Sequence[str]
|
Palette = Sequence[Color]
|
||||||
|
|
||||||
|
|
||||||
def quantize(r: range, steps: int = 16) -> list[float]:
|
def quantize(r: range, steps: int = 16) -> list[float]:
|
||||||
|
|||||||
Reference in New Issue
Block a user