We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5164ad2 commit 0d83c69Copy full SHA for 0d83c69
helloworld/greet/greeting.py
@@ -3,11 +3,10 @@
3
4
from __future__ import annotations
5
6
+import importlib
7
import json
8
import random
9
-import pkg_resources
10
-
11
from helloworld.translator.translator import LanguageTranslator
12
13
@@ -19,7 +18,7 @@ def __init__(
19
18
translations
20
if translations is not None
21
else json.loads(
22
- pkg_resources.resource_string(__name__, "translations.json")
+ importlib.resources.read_text(__name__, "translations.json")
23
)
24
25
self._translator = LanguageTranslator(self._translations)
0 commit comments