mirror of
https://github.com/simonw/datasette.git
synced 2026-06-07 01:27:00 +02:00
Use None as a default arg (#901)
Thanks, @fcatus! * Use None as a default arg * Black formatting fix Co-authored-by: Simon Willison <swillison@gmail.com>
This commit is contained in:
parent
d71b0c0cb9
commit
2d7fa8b905
2 changed files with 8 additions and 2 deletions
|
|
@ -626,7 +626,11 @@ def module_from_path(path, name):
|
|||
return mod
|
||||
|
||||
|
||||
async def resolve_table_and_format(table_and_format, table_exists, allowed_formats=[]):
|
||||
async def resolve_table_and_format(
|
||||
table_and_format, table_exists, allowed_formats=None
|
||||
):
|
||||
if allowed_formats is None:
|
||||
allowed_formats = []
|
||||
if "." in table_and_format:
|
||||
# Check if a table exists with this exact name
|
||||
it_exists = await table_exists(table_and_format)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue