From 4eac65af43d548d1a6e97252c96f685157f9e58b Mon Sep 17 00:00:00 2001 From: Sam Vente Date: Fri, 14 Jun 2024 08:27:39 +0200 Subject: [PATCH 1/2] fix path deprecation warning --- xugrid/data/sample_data.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xugrid/data/sample_data.py b/xugrid/data/sample_data.py index 76dd5805e..1216f35e0 100644 --- a/xugrid/data/sample_data.py +++ b/xugrid/data/sample_data.py @@ -13,8 +13,7 @@ version_dev="main", env="XUGRID_DATA_DIR", ) -with importlib.resources.files("xugrid.data") as path: - REGISTRY.load_registry(path / "registry.txt") +REGISTRY.load_registry(importlib.resources.files("xugrid.data")/ "registry.txt") def xoxo(): From d5064ff2031c2ac6713bd26102870c8cba870cb4 Mon Sep 17 00:00:00 2001 From: Sam Vente Date: Fri, 14 Jun 2024 08:30:52 +0200 Subject: [PATCH 2/2] lint --- xugrid/data/sample_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xugrid/data/sample_data.py b/xugrid/data/sample_data.py index 1216f35e0..8a9d23c47 100644 --- a/xugrid/data/sample_data.py +++ b/xugrid/data/sample_data.py @@ -13,7 +13,7 @@ version_dev="main", env="XUGRID_DATA_DIR", ) -REGISTRY.load_registry(importlib.resources.files("xugrid.data")/ "registry.txt") +REGISTRY.load_registry(importlib.resources.files("xugrid.data") / "registry.txt") def xoxo():