From 9b233f49e5b90c90f7c45f4217fee8b8335f880b Mon Sep 17 00:00:00 2001 From: DSK Date: Sun, 3 Oct 2021 12:47:44 +0530 Subject: [PATCH] black formatting --- examples/columns2.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/columns2.py b/examples/columns2.py index 4e97eeba..24642c0a 100644 --- a/examples/columns2.py +++ b/examples/columns2.py @@ -16,13 +16,13 @@ from rich import print def display_calendar(year=None): - + today = datetime.today() year = int(year or today.year) cal = calendar.Calendar() tables = [] - for month in range(1,13): + for month in range(1, 13): table = Table(title=f"""{calendar.month_name[month]} {year}""", style="green") @@ -34,11 +34,11 @@ def display_calendar(year=None): days = [] for day in weekdays: today_tuple = today.day, today.month, today.year - - if day and (day, month, year) == today_tuple : - _day = "[bold underline red]%s[/]" % day + + if day and (day, month, year) == today_tuple: + _day = "[bold underline red]%s[/]" % day else: - _day = "%s" % ('' if day == 0 else day) + _day = "%s" % ("" if day == 0 else day) days.append(_day) table.add_row(*days) @@ -48,9 +48,9 @@ def display_calendar(year=None): print(columns) -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Rich calendar') - parser.add_argument('year', metavar='year', type=int, default=None) +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Rich calendar") + parser.add_argument("year", metavar="year", type=int, default=None) args = parser.parse_args() display_calendar(args.year)