Python Spyder 4:Autocomplete建议使用错误自定义模块中的函数
使用Spyder4和Python3.7,我将两个简单模块导入主模块Python Spyder 4:Autocomplete建议使用错误自定义模块中的函数,python,import,module,autocomplete,spyder,Python,Import,Module,Autocomplete,Spyder,使用Spyder4和Python3.7,我将两个简单模块导入主模块 import module1 import module2 y = module1.func1(10) z = module2.func2(10) 对于模块1: def func1(x): return 1+x 和模块2: def func2(x): return x+2 假设我想再次从module1调用func1。键入module1.后,我的IDE的自动完成提示func1和func2,请参阅。但是,fu
import module1
import module2
y = module1.func1(10)
z = module2.func2(10)
对于模块1:
def func1(x):
return 1+x
和模块2:
def func2(x):
return x+2
假设我想再次从module1调用func1。键入module1.
后,我的IDE的自动完成提示func1和func2,请参阅。但是,func2没有意义,因为它不在module1中,而是在module2中。选择func2实际上会导致AttributeError
如何从autocomplete中停用此类误导性建议?您可以尝试重建virtualenv…或启动新的代码分析。您应该改用PyCharm;-)您可以尝试重建virtualenv…或启动新的代码分析。您应该改用PyCharm;-)