mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Fixed a complaint from ruff check
This commit is contained in:
parent
8c739558f7
commit
63dc7ab1a5
1 changed files with 9 additions and 4 deletions
|
|
@ -2891,11 +2891,16 @@ def convert(
|
|||
raise click.ClickException(str(e))
|
||||
if dry_run:
|
||||
# Pull first 20 values for first column and preview them
|
||||
preview = lambda v: fn(v) if v else v # noqa: E731
|
||||
if multi:
|
||||
preview = (
|
||||
lambda v: json.dumps(fn(v), default=repr) if v else v
|
||||
) # noqa: E731
|
||||
|
||||
def preview(v):
|
||||
return json.dumps(fn(v), default=repr) if v else v
|
||||
|
||||
else:
|
||||
|
||||
def preview(v):
|
||||
return fn(v) if v else v
|
||||
|
||||
db.conn.create_function("preview_transform", 1, preview)
|
||||
sql = """
|
||||
select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue