From eb61845141ce811a126b2cacd9cd9a76809cab32 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 17 Nov 2019 22:24:55 -0800 Subject: [PATCH] Format with black --- datasette/views/table.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/datasette/views/table.py b/datasette/views/table.py index 494b6f29..b0ea54d2 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -92,7 +92,6 @@ class RowTableShared(DataView): fks.append(expandable_fk) return fks - async def expandable_columns(self, request, database, table): # Returns list of (fk_dict, label_column-or-None) pairs for that table expandables = [] @@ -103,7 +102,14 @@ class RowTableShared(DataView): return expandables async def display_columns_and_rows( - self, request, database, table, description, rows, link_column=False, truncate_cells=0 + self, + request, + database, + table, + description, + rows, + link_column=False, + truncate_cells=0, ): "Returns columns, rows for specified table - including fancy foreign key treatment" db = self.ds.databases[database] @@ -637,7 +643,13 @@ class TableView(RowTableShared): values = [row[column_index] for row in rows] # Expand them expanded_labels.update( - await self.ds.expand_foreign_keys(database, table, column, values, fks=[p[0] for p in expandable_columns]) + await self.ds.expand_foreign_keys( + database, + table, + column, + values, + fks=[p[0] for p in expandable_columns], + ) ) if expanded_labels: # Rewrite the rows