VSCode / Pylance 鼠标悬停时弹出框不显示的问题

VSCode / Pylance Problems not showing in the popover when hovering with the mouse

我使用的是 VS 代码版本:1.62.0,语言服务器版本:v2021.11.0。

当我将鼠标悬停在问题上时,我看不到 linter 错误消息(例如,flake8 消息仅在底部的问题部分可用,但在弹出窗口中不可用)。在最新的 VSCode 更新之前,我曾经在弹出窗口中看到所有这些。这是实际问题的图片:

我的相关设置是:

{
    "python.pythonPath": ".venv/bin/python",
    "python.formatting.provider": "black",
    "editor.formatOnSave": true,
    "python.linting.flake8Enabled": true,
    "python.linting.enabled": true,
}

我该如何解决?

您可以降级到 VSCode 的 an older version。我在1.62.0降级到1.61.2的早期版本后遇到了同样的问题,问题解决了。

我在Github上提交了一个bug,你可以参考here