Skip to content

Commit 0cebef6

Browse files
committed
fix: remove warning on condition
1 parent 1fd87dc commit 0cebef6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fonts/generate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def generate_css(opts: Namespace) -> bool:
211211
Et.register_namespace("", SVG_NS["svg"])
212212
svg_font: Et.ElementTree = Et.parse(str(font_pth))
213213
font_el: Optional[Et.Element] = svg_font.find(".//svg:defs/svg:font", SVG_NS)
214-
if not font_el:
214+
if font_el is None:
215215
log.error("Could not find a font element in %s", font_pth.resolve())
216216
return False
217217

@@ -482,7 +482,7 @@ def __read_svg_font_file(
482482
) -> Optional[tuple[str, str, str, list[Et.Element]]]:
483483
font_xml: Et.ElementTree = Et.parse(fontfile)
484484
font_el: Optional[Et.Element] = font_xml.find("svg:defs/svg:font", SVG_NS)
485-
if not font_el:
485+
if font_el is None:
486486
log.error("Could not find a font definition in %s.", fontfile)
487487
return None
488488

0 commit comments

Comments
 (0)