In progressbars.normalize, return DoNothing instead of None.
So caller doesn't need to do none checks as much.
This commit is contained in:
parent
f522ffd54b
commit
405900cbf4
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue