Skip to content

Commit 988a1ef

Browse files
committed
chore: migrate to importlib
1 parent c456911 commit 988a1ef

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

code_annotations/contrib/config/__init__.py

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

6-
import pkg_resources
6+
import importlib_resources
7+
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")
716

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-
)

0 commit comments

Comments
 (0)