Skip to content

Commit 33f0a32

Browse files
authored
Merge pull request #135 from edly-io/maq/114
#114: Migrate to importlib
2 parents 680ab1f + 47adcbf commit 33f0a32

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

code_annotations/contrib/config/__init__.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
"""
44
import os
55

6-
import pkg_resources
6+
import importlib_resources
77

8-
FEATURE_TOGGLE_ANNOTATIONS_CONFIG_PATH = pkg_resources.resource_filename(
9-
"code_annotations",
10-
os.path.join("contrib", "config", "feature_toggle_annotations.yaml"),
11-
)
12-
SETTING_ANNOTATIONS_CONFIG_PATH = pkg_resources.resource_filename(
13-
"code_annotations",
14-
os.path.join("contrib", "config", "setting_annotations.yaml"),
15-
)
16-
OPENEDX_EVENTS_ANNOTATIONS_CONFIG_PATH = pkg_resources.resource_filename(
17-
"code_annotations",
18-
os.path.join("contrib", "config", "openedx_events_annotations.yaml"),
19-
)
8+
FEATURE_TOGGLE_ANNOTATIONS_CONFIG_PATH = importlib_resources.files(
9+
"code_annotations") / os.path.join("contrib", "config", "feature_toggle_annotations.yaml")
10+
11+
SETTING_ANNOTATIONS_CONFIG_PATH = importlib_resources.files(
12+
"code_annotations") / os.path.join("contrib", "config", "setting_annotations.yaml")
13+
14+
OPENEDX_EVENTS_ANNOTATIONS_CONFIG_PATH = importlib_resources.files(
15+
"code_annotations") / os.path.join("contrib", "config", "openedx_events_annotations.yaml")

0 commit comments

Comments
 (0)