Skip to content

Commit

Permalink
Cosmetic tweaks after blacken-docs, refs #1718
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 24, 2022
1 parent 289e4cf commit 7463b05
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/plugin_hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ And here's an example which adds a ``sql_first(sql_query)`` function which execu
or database
or next(iter(datasette.databases.keys()))
)
return (await datasette.execute(dbname, sql)).rows[
0
][0]
result = await datasette.execute(dbname, sql)
return result.rows[0][0]
return {"sql_first": sql_first}
Expand Down Expand Up @@ -422,8 +421,8 @@ If the value matches that pattern, the plugin returns an HTML link element:
if not isinstance(value, str):
return None
stripped = value.strip()
if not stripped.startswith("{") and stripped.endswith(
"}"
if not (
stripped.startswith("{") and stripped.endswith("}")
):
return None
try:
Expand Down

0 comments on commit 7463b05

Please sign in to comment.