Run black

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-06-03 12:23:08 -07:00
parent c17326f4e7
commit d61da024c9
4 changed files with 43 additions and 42 deletions

View File

@@ -2,5 +2,5 @@
from .cli import cli_main
if __name__ == '__main__':
if __name__ == "__main__":
cli_main()

View File

@@ -14,7 +14,6 @@ from .writer import ANSIWriter, SVGWriter, Writer
# TODO - option to add a caption based on the filename (for SVG)
# TODO - load palettes from a file
# TODO - PNG output
# TODO - fix Matricizer.choose_dimensions - either get rid of it or use it
def cli_main() -> None:

View File

@@ -26,6 +26,7 @@ class ANSIWriter(Writer):
"""
ANSI terminal writer. This will output a 24-bit true color string.
"""
def write(self, matrix: ColorMatrix) -> str:
"""
Write the color matrix to an ANSI string.
@@ -55,6 +56,7 @@ class SVGWriter(Writer):
"""
SVG string writer.
"""
def __init__(self, square_size: int) -> None:
"""
Create a new SVG writer that uses the given square size.

View File

@@ -1,42 +1,42 @@
<svg width="256" height="160" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="32" height="32" fill="hsl(30.00,100.00%,6.67%)" />
<rect x="32" y="0" width="32" height="32" fill="hsl(30.00,100.00%,36.67%)" />
<rect x="64" y="0" width="32" height="32" fill="hsl(30.00,100.00%,10.00%)" />
<rect x="96" y="0" width="32" height="32" fill="hsl(30.00,100.00%,0.00%)" />
<rect x="128" y="0" width="32" height="32" fill="hsl(30.00,100.00%,0.00%)" />
<rect x="160" y="0" width="32" height="32" fill="hsl(30.00,100.00%,23.33%)" />
<rect x="192" y="0" width="32" height="32" fill="hsl(30.00,100.00%,0.00%)" />
<rect x="224" y="0" width="32" height="32" fill="hsl(30.00,100.00%,26.67%)" />
<rect x="0" y="32" width="32" height="32" fill="hsl(30.00,100.00%,16.67%)" />
<rect x="32" y="32" width="32" height="32" fill="hsl(30.00,100.00%,3.33%)" />
<rect x="64" y="32" width="32" height="32" fill="hsl(30.00,100.00%,30.00%)" />
<rect x="96" y="32" width="32" height="32" fill="hsl(30.00,100.00%,36.67%)" />
<rect x="128" y="32" width="32" height="32" fill="hsl(30.00,100.00%,10.00%)" />
<rect x="160" y="32" width="32" height="32" fill="hsl(30.00,100.00%,36.67%)" />
<rect x="192" y="32" width="32" height="32" fill="hsl(30.00,100.00%,33.33%)" />
<rect x="224" y="32" width="32" height="32" fill="hsl(30.00,100.00%,3.33%)" />
<rect x="0" y="64" width="32" height="32" fill="hsl(30.00,100.00%,26.67%)" />
<rect x="32" y="64" width="32" height="32" fill="hsl(30.00,100.00%,20.00%)" />
<rect x="64" y="64" width="32" height="32" fill="hsl(30.00,100.00%,43.33%)" />
<rect x="96" y="64" width="32" height="32" fill="hsl(30.00,100.00%,6.67%)" />
<rect x="128" y="64" width="32" height="32" fill="hsl(30.00,100.00%,3.33%)" />
<rect x="160" y="64" width="32" height="32" fill="hsl(30.00,100.00%,13.33%)" />
<rect x="192" y="64" width="32" height="32" fill="hsl(30.00,100.00%,3.33%)" />
<rect x="224" y="64" width="32" height="32" fill="hsl(30.00,100.00%,50.00%)" />
<rect x="0" y="96" width="32" height="32" fill="hsl(30.00,100.00%,10.00%)" />
<rect x="32" y="96" width="32" height="32" fill="hsl(30.00,100.00%,23.33%)" />
<rect x="64" y="96" width="32" height="32" fill="hsl(30.00,100.00%,0.00%)" />
<rect x="96" y="96" width="32" height="32" fill="hsl(30.00,100.00%,23.33%)" />
<rect x="128" y="96" width="32" height="32" fill="hsl(30.00,100.00%,43.33%)" />
<rect x="160" y="96" width="32" height="32" fill="hsl(30.00,100.00%,13.33%)" />
<rect x="192" y="96" width="32" height="32" fill="hsl(30.00,100.00%,16.67%)" />
<rect x="224" y="96" width="32" height="32" fill="hsl(30.00,100.00%,6.67%)" />
<rect x="0" y="128" width="32" height="32" fill="hsl(30.00,100.00%,3.33%)" />
<rect x="32" y="128" width="32" height="32" fill="hsl(30.00,100.00%,50.00%)" />
<rect x="64" y="128" width="32" height="32" fill="hsl(30.00,100.00%,16.67%)" />
<rect x="96" y="128" width="32" height="32" fill="hsl(30.00,100.00%,30.00%)" />
<rect x="128" y="128" width="32" height="32" fill="hsl(30.00,100.00%,10.00%)" />
<rect x="160" y="128" width="32" height="32" fill="hsl(30.00,100.00%,16.67%)" />
<rect x="192" y="128" width="32" height="32" fill="hsl(30.00,100.00%,13.33%)" />
<rect x="224" y="128" width="32" height="32" fill="hsl(30.00,100.00%,36.67%)" />
<rect x="0" y="0" width="32" height="32" fill="hsl(120.00,100.00%,40.00%)" />
<rect x="32" y="0" width="32" height="32" fill="hsl(120.00,100.00%,3.33%)" />
<rect x="64" y="0" width="32" height="32" fill="hsl(120.00,100.00%,23.33%)" />
<rect x="96" y="0" width="32" height="32" fill="hsl(120.00,100.00%,10.00%)" />
<rect x="128" y="0" width="32" height="32" fill="hsl(120.00,100.00%,6.67%)" />
<rect x="160" y="0" width="32" height="32" fill="hsl(120.00,100.00%,20.00%)" />
<rect x="192" y="0" width="32" height="32" fill="hsl(120.00,100.00%,50.00%)" />
<rect x="224" y="0" width="32" height="32" fill="hsl(120.00,100.00%,13.33%)" />
<rect x="0" y="32" width="32" height="32" fill="hsl(120.00,100.00%,46.67%)" />
<rect x="32" y="32" width="32" height="32" fill="hsl(120.00,100.00%,23.33%)" />
<rect x="64" y="32" width="32" height="32" fill="hsl(120.00,100.00%,43.33%)" />
<rect x="96" y="32" width="32" height="32" fill="hsl(120.00,100.00%,20.00%)" />
<rect x="128" y="32" width="32" height="32" fill="hsl(120.00,100.00%,30.00%)" />
<rect x="160" y="32" width="32" height="32" fill="hsl(120.00,100.00%,20.00%)" />
<rect x="192" y="32" width="32" height="32" fill="hsl(120.00,100.00%,46.67%)" />
<rect x="224" y="32" width="32" height="32" fill="hsl(120.00,100.00%,16.67%)" />
<rect x="0" y="64" width="32" height="32" fill="hsl(120.00,100.00%,13.33%)" />
<rect x="32" y="64" width="32" height="32" fill="hsl(120.00,100.00%,20.00%)" />
<rect x="64" y="64" width="32" height="32" fill="hsl(120.00,100.00%,16.67%)" />
<rect x="96" y="64" width="32" height="32" fill="hsl(120.00,100.00%,46.67%)" />
<rect x="128" y="64" width="32" height="32" fill="hsl(120.00,100.00%,43.33%)" />
<rect x="160" y="64" width="32" height="32" fill="hsl(120.00,100.00%,36.67%)" />
<rect x="192" y="64" width="32" height="32" fill="hsl(120.00,100.00%,40.00%)" />
<rect x="224" y="64" width="32" height="32" fill="hsl(120.00,100.00%,40.00%)" />
<rect x="0" y="96" width="32" height="32" fill="hsl(120.00,100.00%,33.33%)" />
<rect x="32" y="96" width="32" height="32" fill="hsl(120.00,100.00%,16.67%)" />
<rect x="64" y="96" width="32" height="32" fill="hsl(120.00,100.00%,0.00%)" />
<rect x="96" y="96" width="32" height="32" fill="hsl(120.00,100.00%,23.33%)" />
<rect x="128" y="96" width="32" height="32" fill="hsl(120.00,100.00%,26.67%)" />
<rect x="160" y="96" width="32" height="32" fill="hsl(120.00,100.00%,16.67%)" />
<rect x="192" y="96" width="32" height="32" fill="hsl(120.00,100.00%,30.00%)" />
<rect x="224" y="96" width="32" height="32" fill="hsl(120.00,100.00%,40.00%)" />
<rect x="0" y="128" width="32" height="32" fill="hsl(120.00,100.00%,33.33%)" />
<rect x="32" y="128" width="32" height="32" fill="hsl(120.00,100.00%,40.00%)" />
<rect x="64" y="128" width="32" height="32" fill="hsl(120.00,100.00%,16.67%)" />
<rect x="96" y="128" width="32" height="32" fill="hsl(120.00,100.00%,30.00%)" />
<rect x="128" y="128" width="32" height="32" fill="hsl(120.00,100.00%,50.00%)" />
<rect x="160" y="128" width="32" height="32" fill="hsl(120.00,100.00%,6.67%)" />
<rect x="192" y="128" width="32" height="32" fill="hsl(120.00,100.00%,23.33%)" />
<rect x="224" y="128" width="32" height="32" fill="hsl(120.00,100.00%,23.33%)" />
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB