mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Applied Black, refs #1789
This commit is contained in:
parent
1d64c9a8da
commit
fd1086c686
2 changed files with 3 additions and 2 deletions
|
|
@ -559,8 +559,8 @@ class Datasette:
|
||||||
if self.sqlite_extensions:
|
if self.sqlite_extensions:
|
||||||
conn.enable_load_extension(True)
|
conn.enable_load_extension(True)
|
||||||
for extension in self.sqlite_extensions:
|
for extension in self.sqlite_extensions:
|
||||||
# "extension" is either a string path to the extension
|
# "extension" is either a string path to the extension
|
||||||
# or a 2-item tuple that specifies which entrypoint to load.
|
# or a 2-item tuple that specifies which entrypoint to load.
|
||||||
if isinstance(extension, tuple):
|
if isinstance(extension, tuple):
|
||||||
path, entrypoint = extension
|
path, entrypoint = extension
|
||||||
conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])
|
conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])
|
||||||
|
|
|
||||||
|
|
@ -833,6 +833,7 @@ class StaticMount(click.ParamType):
|
||||||
self.fail(f"{value} is not a valid directory path", param, ctx)
|
self.fail(f"{value} is not a valid directory path", param, ctx)
|
||||||
return path, dirpath
|
return path, dirpath
|
||||||
|
|
||||||
|
|
||||||
# The --load-extension parameter can optionally include a specific entrypoint.
|
# The --load-extension parameter can optionally include a specific entrypoint.
|
||||||
# This is done by appending ":entrypoint_name" after supplying the path to the extension
|
# This is done by appending ":entrypoint_name" after supplying the path to the extension
|
||||||
class LoadExtension(click.ParamType):
|
class LoadExtension(click.ParamType):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue