From 5617a955ba76d06606633c03325a09904dfc23f0 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Sun, 21 Jan 2024 18:15:58 +0100 Subject: [PATCH] standardize --- .../document_stores/pgvector/document_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py b/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py index afcbfd83f..05a199ced 100644 --- a/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py +++ b/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py @@ -167,7 +167,7 @@ def delete_table(self): Deletes the table used to store Haystack documents. """ - delete_sql = SQL("DROP TABLE IF EXISTS {}").format(Identifier(self.table_name)) + delete_sql = SQL("DROP TABLE IF EXISTS {table_name}").format(table_name=Identifier(self.table_name)) self._execute_sql(delete_sql, error_msg="Could not delete table in PgvectorDocumentStore") @@ -235,7 +235,7 @@ def count_documents(self) -> int: Returns how many documents are present in the document store. """ - sql_count = SQL("SELECT COUNT(*) FROM {}").format(Identifier(self.table_name)) + sql_count = SQL("SELECT COUNT(*) FROM {table_name}").format(table_name=Identifier(self.table_name)) count = self._execute_sql(sql_count, error_msg="Could not count documents in PgvectorDocumentStore").fetchone()[ 0