Skip to content

Commit ba245d6

Browse files
committed
fix: Disable clazy check as it is missing cmake dependencies.
1 parent 7075deb commit ba245d6

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.restyled.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
restylers:
33
- pyment:
44
enabled: false
5+
- clazy:
6+
enabled: false
57
- "*"

tools/translate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from functools import cache as memoize
1212
from typing import Any
1313
from typing import Optional
14+
from xml.dom.minicompat import EmptyNodeList
1415

1516
import requests
1617
from lib import stage
@@ -374,9 +375,12 @@ def _translate_todo_list(
374375
if not translated:
375376
continue
376377
# Clear the translation node of any existing text.
377-
translation.childNodes.clear()
378+
if not isinstance(translation.childNodes, EmptyNodeList):
379+
translation.childNodes.clear()
378380
# Add the translation to the translation node.
379-
translation.appendChild(dom.createTextNode(translated))
381+
translation.appendChild( # type: ignore[misc]
382+
dom.createTextNode(translated)
383+
)
380384
# Add a <translatorcomment> node to the message to indicate
381385
# that the translation was automated.
382386
if not message.getElementsByTagName("translatorcomment"):

0 commit comments

Comments
 (0)