diff --git a/.ruff-excludes.toml b/.ruff-excludes.toml index e12e0bc822f..e215a5b0db6 100644 --- a/.ruff-excludes.toml +++ b/.ruff-excludes.toml @@ -436,7 +436,6 @@ "UP035", # https://docs.astral.sh/ruff/rules/deprecated-import ] "./scripts/dts/python-devicetree/src/devicetree/dtlib.py" = [ - "SIM201", # https://docs.astral.sh/ruff/rules/negate-equal-op "UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation ] "./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [ diff --git a/scripts/dts/python-devicetree/src/devicetree/dtlib.py b/scripts/dts/python-devicetree/src/devicetree/dtlib.py index 85605d44a87..38f74f338d2 100644 --- a/scripts/dts/python-devicetree/src/devicetree/dtlib.py +++ b/scripts/dts/python-devicetree/src/devicetree/dtlib.py @@ -110,7 +110,7 @@ class Node: if name.count("@") > 1: dt._parse_error("multiple '@' in node name") - if not name == "/": + if name != "/": for char in name: if char not in _nodename_chars: dt._parse_error(f"{self.path}: bad character '{char}' "