Skip to content

Commit 87007af

Browse files
committed
Pass package path to importlib call, not module path
1 parent dd5ab87 commit 87007af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

service/jargon/resources.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
from importlib.resources import files
2121

22-
DEFAULT_DATA = files(__name__).joinpath('defaults.yaml').open('r', encoding='utf8').read()
23-
DEFAULT_HEADER = files(__name__).joinpath('header.yaml').open('r', encoding='utf8').read()
22+
PACKAGE_NAME = __name__.rsplit(".", maxsplit=1)[0]
2423

24+
DEFAULT_DATA = files(PACKAGE_NAME).joinpath('defaults.yaml').open('r', encoding='utf8').read()
25+
DEFAULT_HEADER = files(PACKAGE_NAME).joinpath('header.yaml').open('r', encoding='utf8').read()

0 commit comments

Comments
 (0)