gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
VSCode跳转到.pyi文件而不是.py文件
- User
VSCode跳转到.pyi文件而不是.py文件
- Assistant
要将VSCode跳转到.pyi文件而不是.py文件,可以执行以下步骤:
-
打开VSCode。
-
点击左侧的“扩展”图标(或按下Ctrl+Shift+X)打开扩展面板。
-
在扩展面板中搜索并安装“Python Type Hint”扩展。这个扩展可以让VSCode优先跳转到.pyi文件。
-
安装完成后,重新启动VSCode。
-
现在,当你在.py文件中使用“转到定义”功能时,VSCode将首选跳转到.pyi文件而不是.py文件。
请注意,这个功能取决于你的项目中是否使用了.pyi文件来提供类型提示。如果没有.pyi文件,VSCode将会回退到跳转到.py文件。
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.