Fix arguments.

This commit is contained in:
Sergey Vartanov 2022-02-23 23:56:19 +03:00
parent 32cbd4023f
commit 968addff4b
2 changed files with 5 additions and 6 deletions

View file

@ -108,15 +108,15 @@ class IconCollection:
shape: Shape = extractor.get_shape(shape_id) shape: Shape = extractor.get_shape(shape_id)
if shape.is_part: if shape.is_part:
continue continue
icon: Icon = Icon([ShapeSpecification(shape)]) icon: Icon = Icon([ShapeSpecification(shape, color)])
icon.recolor(color) icon.recolor(color, white=background_color)
icons.append(icon) icons.append(icon)
if add_all: if add_all:
for shape_id in extractor.shapes.keys(): for shape_id in extractor.shapes.keys():
shape: Shape = extractor.get_shape(shape_id) shape: Shape = extractor.get_shape(shape_id)
icon: Icon = Icon([ShapeSpecification(shape)]) icon: Icon = Icon([ShapeSpecification(shape, color)])
icon.recolor(color) icon.recolor(color, white=background_color)
icons.append(icon) icons.append(icon)
return cls(icons) return cls(icons)

View file

@ -34,8 +34,7 @@ class Workspace:
MAPCSS_ICONS_DIRECTORY_NAME: str = "icons" MAPCSS_ICONS_DIRECTORY_NAME: str = "icons"
def __init__(self, output_path: Path) -> None: def __init__(self, output_path: Path) -> None:
self.output_path: Path = output_path self.output_path: Path = check_and_create(output_path)
check_and_create(output_path)
self._icons_by_id_path: Path = output_path / "icons_by_id" self._icons_by_id_path: Path = output_path / "icons_by_id"
self._icons_by_name_path: Path = output_path / "icons_by_name" self._icons_by_name_path: Path = output_path / "icons_by_name"