Skip to content

Commit

Permalink
fix: check __main__ first for module discovery (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
eonu committed Dec 27, 2023
1 parent 30ff1de commit 54839e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feud/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def build(
# use current module if no runner provided
if obj is None:
frame = inspect.stack()[1]
obj = inspect.getmodule(frame[0]) or sys.modules.get("__main__")
obj = sys.modules.get("__main__", inspect.getmodule(frame[0]))

if obj is None:
msg = (
Expand Down

0 comments on commit 54839e0

Please sign in to comment.