【问题标题】:vscode intellisense too slow working with PyQt4vscode intellisense 使用 PyQt4 太慢了
【发布时间】:2018-10-22 06:00:07
【问题描述】:

如果您使用的是 PyQt4 类,则在您使用带有 python 扩展名的 Visual Studio 代码编写时弹出的 Intellisense 建议需要太多时间(例如 20 秒)才会出现。我尝试在项目内部和外部使用不同的文件,结果相同。 即使在导入from PyQt4 import QtGui 的 40 行 .py 中 并且有一个从QtGui.QTableWidget 继承的简单类,建议需要永远,如果你按 ctrl+space 更糟糕,它根本不会加载。

注释导入并删除 PyQt4 类的继承,使 Intellisense 再次立即工作。

我不确定这是否证明https://github.com/Microsoft/vscode-python 中的问题是合理的

也许我做错了什么?

为了完成,这里是我的用户设置:

{
    "python.linting.enabled": true,
    "editor.formatOnSave": true,
    "python.linting.pylintArgs": [
        "--disable=R,C",
        "--extension-pkg-whitelist=PyQt4"
    ],
    "git.confirmSync": false,
    "git.autofetch": true,
    "csv-preview.separator": ";",
    "workbench.startupEditor": "newUntitledFile",
    "python.formatting.autopep8Args": [
        "--max-line-length=100"
    ]
}

更新:拥有相同的项目,Intellisense 在 debian 下的 VS 代码中运行得更快。 (4-5 秒而不是 20+)

【问题讨论】:

    标签: python pyqt visual-studio-code intellisense


    【解决方案1】:

    Jedi 在 PyQt 方面的速度并不快。这是一个已知问题,我们正在努力在不久的将来将分析引擎从 Visual Studio 引入 VS Code(关注我们的博客 https://aka.ms/pythonblog 以了解发布公告何时可用)。

    【讨论】:

      猜你喜欢
      • 2022-08-19
      • 2020-10-10
      • 2013-03-10
      • 2014-06-07
      • 2016-05-31
      • 2011-07-07
      • 2015-08-23
      • 2012-07-05
      • 2016-01-08
      相关资源
      最近更新 更多