From 9e9c24d8c0ac3d6353f2d29a28788a923d29541e Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Fri, 10 Jan 2025 03:01:25 +0100 Subject: [PATCH] Drop lxml, it's not needed --- utils/material_icons.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/material_icons.py b/utils/material_icons.py index 0b4963ac..b57219d2 100644 --- a/utils/material_icons.py +++ b/utils/material_icons.py @@ -23,9 +23,9 @@ from __future__ import annotations import subprocess from pathlib import Path +from xml.etree import ElementTree as ET -from lxml import etree - +ET.register_namespace("", "http://www.w3.org/2000/svg") MATERIAL_REPO = "https://github.com/google/material-design-icons.git" ICON_MAP = { "alert_error": "error", @@ -136,11 +136,11 @@ ICON_MAP = { def _fixXml(svg: str) -> str: """Clean up the SVG XML and add needed fields.""" - xSvg = etree.fromstring(svg) # type: ignore + xSvg = ET.fromstring(svg) xSvg.set("fill", "#000000") xSvg.set("height", "128") xSvg.set("width", "128") - return etree.tostring(xSvg).decode() + return ET.tostring(xSvg).decode() def processMaterialIcons(workDir: Path, iconsDir: Path, jobs: dict) -> None: