Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/dts_utils/dts.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ def get_mappable(self) -> list[Node]:
nodes = []
for n in self._dt.node_iter():
node = Node(n)
if node.reg and node.reg[0] != 0 and node.reg[1] > 0:
if (
node.reg
and isinstance(node.reg, list)
and len(node.reg) >= 2
and node.reg[0] != 0
and node.reg[1] > 0
):
nodes.append(node)
return nodes

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ select = C, D, E, F, W, B, B9, DOC
# As doc lint is a new feature, this is widely incomplete.
# We should ignore D1xx (missing docstring) temporarilly.
# Once everything is documented, re-enable this error.
ignore = D1, E203, E704
ignore = D1, E203, E704, W503
max-line-length = 100
exclude = .git, .github, __pycache__, build, dist, .eggs, .tox, venv, venv*, .venv, .venv*, reports, .mypy_cache, doc
# pydoclint (flake8) plugin opt --style
Expand Down
Loading