mirror of
https://github.com/simonw/datasette.git
synced 2026-06-05 00:26:57 +02:00
Apply black and blacken-docs formatting
https://claude.ai/code/session_01SvPEPqHgURTWESRp28pTC3
This commit is contained in:
parent
77bbfb5f7e
commit
9fe10cd1aa
5 changed files with 61 additions and 30 deletions
|
|
@ -944,9 +944,7 @@ Returns a dictionary mapping column names to ``(column_type_name, config)`` tupl
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
ct_map = await datasette.get_column_types(
|
||||
"mydb", "mytable"
|
||||
)
|
||||
ct_map = await datasette.get_column_types("mydb", "mytable")
|
||||
# {"email_col": ("email", None), "site": ("url", None)}
|
||||
|
||||
.. _datasette_set_column_type:
|
||||
|
|
@ -970,8 +968,11 @@ Assigns a column type to a column. Overwrites any existing assignment for that c
|
|||
.. code-block:: python
|
||||
|
||||
await datasette.set_column_type(
|
||||
"mydb", "mytable", "location", "point",
|
||||
config={"srid": 4326}
|
||||
"mydb",
|
||||
"mytable",
|
||||
"location",
|
||||
"point",
|
||||
config={"srid": 4326},
|
||||
)
|
||||
|
||||
.. _datasette_remove_column_type:
|
||||
|
|
|
|||
|
|
@ -1013,8 +1013,14 @@ Return a list of :ref:`ColumnType <column_types>` instances to register custom c
|
|||
|
||||
class ColorColumnType(ColumnType):
|
||||
async def render_cell(
|
||||
self, value, column, table, database,
|
||||
datasette, request, config
|
||||
self,
|
||||
value,
|
||||
column,
|
||||
table,
|
||||
database,
|
||||
datasette,
|
||||
request,
|
||||
config,
|
||||
):
|
||||
if value:
|
||||
return markupsafe.Markup(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue