From d4318cbd4699d251cf5c85d12894ec9c9e40fb05 Mon Sep 17 00:00:00 2001 From: Max Halford Date: Mon, 30 Oct 2023 17:55:12 +0100 Subject: [PATCH] ruff --- lea/clients/__init__.py | 2 -- lea/clients/duckdb.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lea/clients/__init__.py b/lea/clients/__init__.py index 1b6c02d..88e600f 100644 --- a/lea/clients/__init__.py +++ b/lea/clients/__init__.py @@ -4,8 +4,6 @@ import json import os -from .base import Client - def make_client(production: bool): warehouse = os.environ["LEA_WAREHOUSE"] diff --git a/lea/clients/duckdb.py b/lea/clients/duckdb.py index da67082..4e531d4 100644 --- a/lea/clients/duckdb.py +++ b/lea/clients/duckdb.py @@ -1,7 +1,7 @@ from __future__ import annotations -import pathlib import os +import pathlib import duckdb import pandas as pd @@ -69,7 +69,7 @@ def list_existing_view_names(self) -> list[tuple[str, str]]: ] def get_tables(self): - query = f""" + query = """ SELECT schema_name || '.' || table_name AS view_name, estimated_size AS n_rows, -- TODO: Figure out how to get the exact number @@ -79,7 +79,7 @@ def get_tables(self): return self.con.sql(query).df() def get_columns(self) -> pd.DataFrame: - query = f""" + query = """ SELECT table_schema || '.' || table_name AS view_name, column_name AS column,