我刚接触Visual Studio代码,我不能让pylint停止抛出"unable to import“错误,也不能让自动完成来识别我的导入,例如:
from collective.transmogrifier.interfaces import ISection
from collective.transmogrifier.interfaces import ISectionBlueprint
from zope.annotation.interfaces import IAnnotations
from zope.interface import classProvides
from zope.interface import implements我以前使用过PyCharm,对于任何plone/buildout项目,我所需要的就是将"parts/omelette“目录标记为源代码,它工作得很好。
在vscode中,我尝试像这样添加工作区设置:
"python.autoComplete.extraPaths": [
"parts/omelette"
],或者甚至复制我的整个bin/实例蛋形路径并将它们添加到自动补全额外路径中,但都没有成功。
我相信Plone社区中的一些人以前已经尝试过vscode了!我一定是做错了什么。
发布于 2019-07-12 01:13:49
我希望这个建造食谱能满足你的目的。collective.recipe.vscode
如果你遇到任何问题,请告诉我。
https://stackoverflow.com/questions/56992765
复制相似问题