From 5936eda57d7b17bf4c5cf3eec672e4f9c06408c4 Mon Sep 17 00:00:00 2001 From: kedhammar Date: Mon, 19 Aug 2024 08:31:11 +0000 Subject: [PATCH] modernize importlib usage --- anglerfish/demux/adaptor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anglerfish/demux/adaptor.py b/anglerfish/demux/adaptor.py index 68e5c1f..ac33de8 100644 --- a/anglerfish/demux/adaptor.py +++ b/anglerfish/demux/adaptor.py @@ -1,4 +1,4 @@ -import importlib +import importlib.resources as resources import os import re @@ -247,7 +247,7 @@ def load_adaptors(raw: bool = False) -> list[Adaptor] | dict: """ # Load adaptors from config file - adaptors_config_path = importlib.resources.files("anglerfish.config").joinpath( + adaptors_config_path = resources.files("anglerfish.config").joinpath( "adaptors.yaml" ) assert isinstance(adaptors_config_path, os.PathLike)