From 59df12a23f2802199b4fe52e2377b3339081c37d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 19 Mar 2022 19:51:25 -0700 Subject: [PATCH] Simplify worms.get_tables with select_column. --- voussoirkit/worms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/voussoirkit/worms.py b/voussoirkit/worms.py index 591f1f0..ba1122f 100644 --- a/voussoirkit/worms.py +++ b/voussoirkit/worms.py @@ -266,8 +266,7 @@ class Database(metaclass=abc.ABCMeta): Return the set of all table names in the database. ''' query = 'SELECT name FROM sqlite_master WHERE type = "table"' - table_rows = self.select(query) - tables = set(name for (name,) in table_rows) + tables = set(self.select_column(query)) return tables def insert(self, table, data) -> None: