Skip to content

Commit

Permalink
Simplify references to functions in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
breuleux committed Apr 27, 2022
1 parent 05e7d92 commit 237ad4f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jurigged/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ def _getcode(ref):
if ref.startswith("/"):
_, module, *hierarchy = ref.split("/")
return codefind.find_code(*hierarchy, module=module)
elif ":" in ref:
module, hierarchy_s = ref.split(":")
hierarchy = hierarchy_s.split(".")
return codefind.find_code(*hierarchy, module=module)
else:
if "/" in ref:
hierarchy = ref.split("/")
else:
hierarchy = ref.split(".")
hierarchy = ref.split(".")
return codefind.find_code(*hierarchy, filename=filename)

for ref in opts.loop or []:
Expand Down

0 comments on commit 237ad4f

Please sign in to comment.