diff --git a/.ruff-excludes.toml b/.ruff-excludes.toml index 6be7eea6daf..89ac08b7306 100644 --- a/.ruff-excludes.toml +++ b/.ruff-excludes.toml @@ -443,7 +443,6 @@ ] "./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [ "B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except - "B905", # https://docs.astral.sh/ruff/rules/zip-without-explicit-strict "E713", # https://docs.astral.sh/ruff/rules/not-in-test "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports "SIM102", # https://docs.astral.sh/ruff/rules/collapsible-if diff --git a/scripts/dts/python-devicetree/src/devicetree/edtlib.py b/scripts/dts/python-devicetree/src/devicetree/edtlib.py index 76824096e9f..b2c718b4d9f 100644 --- a/scripts/dts/python-devicetree/src/devicetree/edtlib.py +++ b/scripts/dts/python-devicetree/src/devicetree/edtlib.py @@ -1878,7 +1878,7 @@ class Node: f"{controller._node!r} - {len(cell_names)} " f"instead of {len(data_list)}") - return dict(zip(cell_names, data_list)) + return dict(zip(cell_names, data_list, strict=False)) class EDT: @@ -2840,7 +2840,7 @@ def _add_names(node: dtlib_Node, names_ident: str, objs: Any) -> None: f"in {node.dt.filename} has {len(names)} strings, " f"expected {len(objs)} strings") - for obj, name in zip(objs, names): + for obj, name in zip(objs, names, strict=False): if obj is None: continue obj.name = name @@ -3116,7 +3116,7 @@ def _and(b1: bytes, b2: bytes) -> bytes: # Pad on the left, to equal length maxlen = max(len(b1), len(b2)) return bytes(x & y for x, y in zip(b1.rjust(maxlen, b'\xff'), - b2.rjust(maxlen, b'\xff'))) + b2.rjust(maxlen, b'\xff'), strict=False)) def _or(b1: bytes, b2: bytes) -> bytes: @@ -3126,7 +3126,7 @@ def _or(b1: bytes, b2: bytes) -> bytes: # Pad on the left, to equal length maxlen = max(len(b1), len(b2)) return bytes(x | y for x, y in zip(b1.rjust(maxlen, b'\x00'), - b2.rjust(maxlen, b'\x00'))) + b2.rjust(maxlen, b'\x00'), strict=False)) def _not(b: bytes) -> bytes: