Skip to content

Commit 036345c

Browse files
committed
Up
1 parent 4870be2 commit 036345c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pythonx.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ defmodule Pythonx do
281281
defmacro sigil_PY({:<<>>, _meta, [code]}, []) when is_binary(code) do
282282
%{referenced: referenced, defined: defined} = Pythonx.AST.scan_globals(code)
283283

284-
versioned_vars = __CALLER__.versioned_vars
284+
caller = __CALLER__
285285

286286
globals_entries =
287287
for name <- referenced,
@@ -290,7 +290,7 @@ defmodule Pythonx do
290290
# This way, if an undefined variable is referenced in the
291291
# Python code, it results in an informative Python error,
292292
# rather than Elixir compile error.
293-
Map.has_key?(versioned_vars, {name_atom, nil}) do
293+
Macro.Env.has_var?(caller, {name_atom, nil}) do
294294
{name, {name_atom, [], nil}}
295295
end
296296

0 commit comments

Comments
 (0)