Began implementation of sqlite-utils convert, refs #251

This commit is contained in:
Simon Willison 2021-07-31 21:33:00 -07:00
commit 6964d67ce1
3 changed files with 551 additions and 0 deletions

View file

@ -254,3 +254,17 @@ class ValueTracker:
not_these.append(name)
for key in not_these:
del self.couldbe[key]
class NullProgressBar:
def update(self, value):
pass
@contextlib.contextmanager
def progressbar(silent=False, **kwargs):
if silent:
yield NullProgressBar()
else:
with click.progressbar(**kwargs) as bar:
yield bar