Skip to content

Commit

Permalink
feat(core/nodes): add basic repr for nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
aravinda0 committed Dec 21, 2023
1 parent 20b2321 commit 68743e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qtile_bonsai/core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ def get_first_ancestor(self, of_type: type[NodeType]) -> NodeType:
node = node.parent
raise ValueError(f"No node of type {of_type} in ancestor chain")

def __repr__(self):
return f"{self.abbrv()}:{self.id}"

@classmethod
def next_id(cls):
cls._id_seq += 1
Expand Down

0 comments on commit 68743e6

Please sign in to comment.