一切默认配置都很正常,系统库可以正常补全。不过对于项目中的类有一些问题:
我现在有一个类T在文件t.py中,有一个类J在文件j.py中,J有方法do(t)接受T类型的参数。
然后我在main.py中这样写:
if __name__ == '__main__':
j = J()
t = T()
j.do(t)
在main.py中按.时是可以弹出j和t的成员的,但是在j.py的do函数中无法补全t的成员。在~/.codeintel/codeintel.log中有如下错误
Done 'Python' CodeIntel! Full CodeIntel took 1ms
Doing CodeIntel for 'Python' (hold on)...
eval 't' at
J.py#172 <Trigger 'python-complete-object-members' at 7170>
start scope is (<blob 'J'>, ['J', 'do'])
find 't ...' starting at (<blob 'j'>, ['J', 'do']):
is 't' accessible on (<blob 'j'>, ['J', 'do'])? yes: <argument 't'>
evaluating 't' at
J.py#172: no type-inference info for <argument 't'>
done eval: eval error
Done 'Python' CodeIntel! Full CodeIntel took 10ms
+ Warning: evaluating 't' at
J.py#172: no type-inference info for <argument 't'>
请问有遇到类似问题的同学么,怎么解决好?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/55485
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.