Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanp32 committed Dec 13, 2023
1 parent f4a5c9c commit a594b52
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions uwudu/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ def display(self, todo_list):
self.table.clear_rows()
pending_count = 0

max_widths, pending_count = self.calculate_max_widths_and_pending_todos(
todo_list
)

if len(todo_list) > 0:
max_widths, pending_count = self.calculate_max_widths_and_pending_todos(
todo_list
)

for idx, todo in enumerate(todo_list, start=1):
todo_data = todo.split(" │ ")
Expand Down Expand Up @@ -62,7 +63,7 @@ def display(self, todo_list):
click.echo(self.table)

def calculate_max_widths_and_pending_todos(self, todo_list):
max_widths = [0] * len(todo_list[0].split(" │ "))
max_widths = [0] * len(self.table.field_names)
count = 0

for todo in todo_list:
Expand Down

0 comments on commit a594b52

Please sign in to comment.