我知道如何增加包索引深度以改进 VSCode 中 Intellisense 中的其他包,但我不知道如何增加 VSCode 中我自己的项目的 Intellisense 深度。
为了改进其他软件包,Intellisense。我转到当前项目的 settings.json 文件并将其添加为:
"python.analysis.packageIndexDepths": [
{
"name": "third_party_package_name_1", // The name of the third party package that I intend to improve its performance by increasing the depth of the index
"depth": 5 // index depth for improving intellisense
},{
"name": "third_party_package_name_1",
"depth": 5
}
]
我尝试写我的项目文件夹名称而不是 package_name,但它不起作用。但是当我写第三方包的名称时,它工作得很好。
如果您正在尝试优化 IntelliSense 的质量。可以配置vscode文件
settings.json
文件。添加 "python.analysis.extraPaths":["yourpath"]
以添加位置。然后将 "python.analysis.typeCheckingMode"
设置为 strict
。尝试看看这是否可以解决问题。