@@ -77,8 +77,8 @@ def __init__(self, engine=None, **data) -> None:
7777 self ._engine = engine
7878 self ._cache_dir : Path = Path (CACHEPATH ) / "ducklake"
7979 self ._cache_dir .mkdir (parents = True , exist_ok = True )
80- self ._catalog_local : Path = self ._cache_dir / "catalog.db "
81- self ._catalog_remote : str = "public/catalog.db "
80+ self ._catalog_local : Path = self ._cache_dir / "catalog.duckdb "
81+ self ._catalog_remote : str = "public/catalog.duckdb "
8282
8383 @property
8484 def name (self ) -> str :
@@ -197,7 +197,8 @@ def _setup_engine(self, local_path: Path | None = None):
197197 Parameters
198198 ----------
199199 local_path : Path, optional
200- Path to the catalog database file. Defaults to the discovery catalog.
200+ Path to the catalog database file.
201+ Defaults to the discovery catalog.
201202 """
202203 if local_path is None :
203204 local_path = self ._catalog_local
@@ -210,7 +211,8 @@ def _setup_engine(self, local_path: Path | None = None):
210211 conn .exec_driver_sql ("INSTALL ducklake; LOAD ducklake;" )
211212
212213 has_pysus = conn .exec_driver_sql (
213- "SELECT 1 FROM information_schema.schemata WHERE schema_name = 'pysus'"
214+ "SELECT 1 FROM information_schema.schemata"
215+ " WHERE schema_name = 'pysus'"
214216 ).fetchone ()
215217
216218 if has_pysus :
@@ -326,7 +328,9 @@ async def _download(
326328 else :
327329 raise e
328330
329- async def _download_catalog (self , local_path : Path , remote_path : str ) -> None :
331+ async def _download_catalog (
332+ self , local_path : Path , remote_path : str
333+ ) -> None :
330334 """Download a catalog database from remote storage with retries.
331335
332336 Parameters
@@ -380,7 +384,9 @@ def _get_s3_client(self):
380384 "s3" ,
381385 endpoint_url = f"https://{ self .endpoint } " ,
382386 aws_access_key_id = self .credentials .access_key .get_secret_value (),
383- aws_secret_access_key = (self .credentials .secret_key .get_secret_value ()),
387+ aws_secret_access_key = (
388+ self .credentials .secret_key .get_secret_value ()
389+ ),
384390 region_name = self .region ,
385391 config = Config (signature_version = "s3v4" ),
386392 )
@@ -400,7 +406,10 @@ async def _upload_catalog(self) -> None:
400406 if not ds ._catalog_local .exists ():
401407 continue
402408
403- def _upload (local = str (ds ._catalog_local ), name = ds ._catalog_name ):
409+ _local = str (ds ._catalog_local )
410+ _name = ds ._catalog_name
411+
412+ def _upload (local = _local , name = _name ):
404413 self ._s3_client .upload_file (
405414 local ,
406415 self .bucket ,
0 commit comments