From ca4471426a08c25bf3f0e92f955a2b077036bb06 Mon Sep 17 00:00:00 2001 From: DSK Date: Sun, 3 Oct 2021 12:55:24 +0530 Subject: [PATCH] cleanup: removed default arg for cli --- examples/columns2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/columns2.py b/examples/columns2.py index 24642c0a..d04cf970 100644 --- a/examples/columns2.py +++ b/examples/columns2.py @@ -15,10 +15,10 @@ from rich.columns import Columns from rich import print -def display_calendar(year=None): +def display_calendar(year): today = datetime.today() - year = int(year or today.year) + year = int(year) cal = calendar.Calendar() tables = [] @@ -50,7 +50,7 @@ def display_calendar(year=None): if __name__ == "__main__": parser = argparse.ArgumentParser(description="Rich calendar") - parser.add_argument("year", metavar="year", type=int, default=None) + parser.add_argument("year", metavar="year", type=int) args = parser.parse_args() display_calendar(args.year)