From 19ad08fa6e9f7fa92b97b0fb0a1736b0d6746d11 Mon Sep 17 00:00:00 2001 From: veenstrajelmer <60435591+veenstrajelmer@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:55:24 +0200 Subject: [PATCH] add filter argument to pooch retrieve to avoid raised deprecationwarning --- hydromt/data_catalog/data_catalog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hydromt/data_catalog/data_catalog.py b/hydromt/data_catalog/data_catalog.py index 14dce077b..afee7d6d0 100644 --- a/hydromt/data_catalog/data_catalog.py +++ b/hydromt/data_catalog/data_catalog.py @@ -633,7 +633,7 @@ def _cache_archive( if Path(archive_uri).suffix == ".zip": kwargs.update(processor=pooch.Unzip(extract_dir=root)) elif Path(archive_uri).suffix == ".gz": - kwargs.update(processor=pooch.Untar(extract_dir=root)) + kwargs.update(processor=pooch.Untar(extract_dir=root, filter='data')) if Path(archive_uri).exists(): # check if arhive is a local file kwargs.update(donwloader=_copy_file) pooch.retrieve( @@ -641,7 +641,6 @@ def _cache_archive( known_hash=sha256, path=str(root), fname=Path(archive_uri).name, - filter='data', **kwargs, ) return root