Skip to content

Commit c986ff3

Browse files
committed
Use import-path from Hyrule.
1 parent 69e32ee commit c986ff3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

simalq/quest_definition/__init__.hy

+3-4
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ quest definitions from other files in this directory."
170170
(setv builtin-quests (dfor
171171
; Every module in this directory should have the members `name` and
172172
; `quest-fn`.
173-
[finder m _] (hy.I.pkgutil.walk-packages __path__)
174-
:setv spec (.find-spec finder m)
175-
:setv m (hy.I.importlib/util.module-from-spec spec)
176-
:do (.loader.exec-module spec m)
173+
p (.iterdir (hy.I.pathlib.Path (get __path__ 0)))
174+
:if (not-in p.name ["__init__.hy" "__pycache__"])
175+
:setv m (hy.I.hyrule.import-path p)
177176
m.name m.quest-fn))

0 commit comments

Comments
 (0)