Skip to content

Commit

Permalink
Correct list print and display format
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Oct 12, 2023
1 parent f95e55e commit 5617283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auto_editor/lib/data_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __len__(self) -> int:
return len(self.val)

def __getitem__(self, key: int | slice) -> Any:
if isinstance(key, slice):
if isinstance(key, slice) or type(self.val[key]) is tuple:
return Quoted(self.val[key])

return self.val[key]
Expand Down Expand Up @@ -182,7 +182,7 @@ def display_str(val: object) -> str:
if type(val) is Fraction:
return f"{val.numerator}/{val.denominator}"

if type(val) is Quoted:
if type(val) is Quoted or type(val) is tuple:
if not val:
return "()"
result = StringIO()
Expand Down

0 comments on commit 5617283

Please sign in to comment.