style: edtlib: Use the more readable not-equal operator
Replace 'not xx == xx' with 'xx != xx' to fix the Ruff SIM201 warning. Signed-off-by: James Roy <rruuaanng@outlook.com>
This commit is contained in:
parent
b543c26548
commit
826ddaed97
@ -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" = [
|
||||
|
||||
@ -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}' "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user