-
-
Notifications
You must be signed in to change notification settings - Fork 524
Open
Labels
Description
I'm confused by this difference between Script and Interpreter when it comes to from x import * imports:
>>> jedi.__version__
'0.19.2'
>>> jedi.Script("from json import *\ndum").complete(2,3)
[<Completion: dump>, <Completion: dumps>]
>>> jedi.Interpreter("from json import *\ndum",[]).complete(2,3)
[]
>>> jedi.Interpreter("from json import dump\ndum",[]).complete(2,3)
[<Completion: dump>]I was trying to use Interpreter because I need to supply a custom namespace that contains a global function I'm injecting into the Python environment (it would not appear in the code). Is there a way to make Interpreter correctly understand * imports, or a different way to inject globals into Script instead?
Reactions are currently unavailable