Skip to content

Commit

Permalink
fix: sort interfaces by path
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGajeed76 committed Nov 18, 2024
1 parent 7aaf69b commit 116b1b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def main():
references = create_interface_references(interfaces)
references.extend(create_folder_references(interfaces, interface_folder))

references.sort()

app = InterfaceViewer("TF Utils", references)
app.run()
sys.exit(app.return_code or 0)
Expand Down
3 changes: 3 additions & 0 deletions src/lib/interface_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def __repr__(self):
- call_back: {self.call_back}
"""

def __lt__(self, other):
return str(self.path) < str(other.path)


class InterfaceViewer(App):
path = InterfacePath("root")
Expand Down

0 comments on commit 116b1b0

Please sign in to comment.