From 405900cbf4de2ac2f05312f4bd361a6b6c0bb34b Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 7 Nov 2022 17:54:55 -0800 Subject: [PATCH] In progressbars.normalize, return DoNothing instead of None. So caller doesn't need to do none checks as much. --- voussoirkit/progressbars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voussoirkit/progressbars.py b/voussoirkit/progressbars.py index d61af4c..b9f5ee4 100644 --- a/voussoirkit/progressbars.py +++ b/voussoirkit/progressbars.py @@ -284,7 +284,7 @@ def do_nothing(*args, **kwargs): def normalize(progressbar, total=None, *, topic=None) -> typing.Union[Progress, None]: if progressbar is None: - return None + return DoNothing() elif isinstance(progressbar, Progress): progressbar.set_total(total=total)