Closed mdforti closed 2 years ago
This is not enough to reproduce your issue. You probably need to send your source file.
exaple.py:
class greeter:
def __init__(self):
self.greet_phrase = "Hello World"
pass
def greet(self):
print(self.greet_phrase)
noautocomplete.py
from importlib.machinery import SourceFileLoader
greeter = SourceFileLoader('greeter', 'example.py').load_module().greeter
G=greeter()
G.greet()
yesautocomplete.py:
from example import greeter
G = greeter()
G.greet()
a little context: I use SourceFileLoader to import modules that I am developing or changing or that are not yet installed in environment.
SourceFileLoader
and other dynamic things like changing a module's dict or using setattr
are not supported. Just set the sys path properly.
ok, thats clear now. Thank you !
Issue
Steps to reproduce
editing python script import module and possibly classes using importlib.machinery.SourceFileLoader instead of normal import start new object try to autocomplete property or method from new instance ompni completion wont find pattern.
I don't know if this is a bug or a missing feature, but it would be great to have it working at some point.
Thank you all for the help and the great tool.