Skip to content

Commit 447e5dd

Browse files
authored
Replace deprecated pkg_resources - #11 from tavallaie/master
Replace deprecated pkg_resources with importlib.resources
2 parents f369a01 + 49cd0d1 commit 447e5dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

perth/perth_net/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pkg_resources import resource_filename
2-
PREPACKAGED_MODELS_DIR = resource_filename(__name__, "pretrained")
1+
from importlib.resources import files
32

4-
from .perth_net_implicit.perth_watermarker import PerthImplicitWatermarker
3+
PREPACKAGED_MODELS_DIR = files(__name__).joinpath("pretrained")
4+
from .perth_net_implicit.perth_watermarker import PerthImplicitWatermarker # noqa: E402, F401

0 commit comments

Comments
 (0)