Skip to content

Commit

Permalink
Properly indent sub-groups in RadioSettingGroup.__str__
Browse files Browse the repository at this point in the history
Previously, sub-groups would all have headers/footers left aligned
and all options would start with a single tab, making it hard to
understand a settings list with nested groups.

This adds a tab for each level of nesting.
  • Loading branch information
W8BSD authored and kk7ds committed Jun 26, 2023
1 parent 3a9e9ee commit 3e71582
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chirp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ def set_doc(self, doc):
def __str__(self):
string = "group '%s': {\n" % self._name
for element in sorted(self._elements.values()):
string += "\t" + str(element) + "\n"
for line in str(element).split("\n"):
string += "\t" + line + "\n"
string += "}"
return string

Expand Down

0 comments on commit 3e71582

Please sign in to comment.