Skip to content

Commit 0d83c69

Browse files
committed
pkgutil
1 parent 5164ad2 commit 0d83c69

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

helloworld/greet/greeting.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44
from __future__ import annotations
55

6+
import importlib
67
import json
78
import random
89

9-
import pkg_resources
10-
1110
from helloworld.translator.translator import LanguageTranslator
1211

1312

@@ -19,7 +18,7 @@ def __init__(
1918
translations
2019
if translations is not None
2120
else json.loads(
22-
pkg_resources.resource_string(__name__, "translations.json")
21+
importlib.resources.read_text(__name__, "translations.json")
2322
)
2423
)
2524
self._translator = LanguageTranslator(self._translations)

0 commit comments

Comments
 (0)