We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4870be2 commit 036345cCopy full SHA for 036345c
lib/pythonx.ex
@@ -281,7 +281,7 @@ defmodule Pythonx do
281
defmacro sigil_PY({:<<>>, _meta, [code]}, []) when is_binary(code) do
282
%{referenced: referenced, defined: defined} = Pythonx.AST.scan_globals(code)
283
284
- versioned_vars = __CALLER__.versioned_vars
+ caller = __CALLER__
285
286
globals_entries =
287
for name <- referenced,
@@ -290,7 +290,7 @@ defmodule Pythonx do
290
# This way, if an undefined variable is referenced in the
291
# Python code, it results in an informative Python error,
292
# rather than Elixir compile error.
293
- Map.has_key?(versioned_vars, {name_atom, nil}) do
+ Macro.Env.has_var?(caller, {name_atom, nil}) do
294
{name, {name_atom, [], nil}}
295
end
296
0 commit comments