diff --git a/.gitignore b/.gitignore index 33019c7..91b78f1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ config.log *.pyc *_wrap.cc *Lib.py +_build* # Built by sconsUtils version.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cbb8b8b..7590d4e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black # It is recommended to specify the latest version of Python @@ -21,6 +21,6 @@ repos: name: isort (python) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.5.2 + rev: v0.5.7 hooks: - id: ruff diff --git a/python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py b/python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py index 5413578..f1fd2c7 100644 --- a/python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py +++ b/python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py @@ -27,10 +27,17 @@ import tempfile from collections import defaultdict -from lsst.daf.butler import Butler, Config, DatasetAssociation, DatasetId, DatasetRef, SkyPixDimension +from lsst.daf.butler import ( + Butler, + CollectionType, + Config, + DatasetAssociation, + DatasetId, + DatasetRef, + SkyPixDimension, +) from lsst.daf.butler.datastores.fileDatastore import FileDatastore from lsst.daf.butler.direct_butler import DirectButler -from lsst.daf.butler.registry import CollectionType from lsst.daf.butler.registry.databases.sqlite import SqliteDatabase from lsst.daf.butler.registry.sql_registry import SqlRegistry from lsst.daf.butler.transfers import RepoExportContext @@ -269,9 +276,7 @@ def transfer_non_datasets(source_butler: DirectButler, dest_butler: DirectButler # export/import. BackendClass = get_class_of(source_butler._config["repo_transfer_formats", "yaml", "export"]) backend = BackendClass(yamlBuffer) - exporter = RepoExportContext( - source_butler._registry, source_butler._datastore, backend, directory=None, transfer=None - ) + exporter = RepoExportContext(source_butler, backend, directory=None, transfer=None) # Export all the collections. for c in source_butler.registry.queryCollections(..., flattenChains=True, includeChains=True):