Skip to content

Commit

Permalink
Drop lxml, it's not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Jan 10, 2025
1 parent c3fc1d4 commit 9e9c24d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/material_icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
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",
Expand Down Expand Up @@ -136,11 +136,11 @@

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:
Expand Down

0 comments on commit 9e9c24d

Please sign in to comment.