Skip to content

Commit 8a2cde9

Browse files
rruuaannghenrikbrixandersen
authored andcommitted
style: edtlib: Use from to chain the exception
Use the from keyword to chain exceptions in order to fix the Ruff B904 warning. Signed-off-by: James Roy <[email protected]>
1 parent 826ddae commit 8a2cde9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.ruff-excludes.toml

-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@
439439
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
440440
]
441441
"./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [
442-
"B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except
443442
"SIM118", # https://docs.astral.sh/ruff/rules/in-dict-keys
444443
"UP007", # https://docs.astral.sh/ruff/rules/non-pep604-annotation
445444
]

scripts/dts/python-devicetree/src/devicetree/edtlib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2123,7 +2123,7 @@ def scc_order(self) -> list[list[Node]]:
21232123
try:
21242124
return self._graph.scc_order()
21252125
except Exception as e:
2126-
raise EDTError(e)
2126+
raise EDTError(e) from None
21272127

21282128
def _process_properties_r(self, root_node: Node, props_node: Node) -> None:
21292129
"""

0 commit comments

Comments
 (0)