gpt4 book ai didi

python - Pylint 加载插件在 VS 代码中失败

转载 作者:行者123 更新时间:2023-12-04 15:48:08 25 4
gpt4 key购买 nike

这是我的配置:

"python.linting.pylintArgs": [
"--load-plugins",
"pylint-quotes"
],

我用 pip 和 pip3 安装了 pylint-quotes,但我仍然收到错误:

Traceback (most recent call last):
File "/usr/local/bin/pylint", line 11, in <module>
sys.exit(run_pylint())
File "/usr/local/lib/python2.7/site-packages/pylint/__init__.py", line 16, in run_pylint
Run(sys.argv[1:])
File "/usr/local/lib/python2.7/site-packages/pylint/lint.py", line 1274, in __init__
linter.load_plugin_modules(self._plugins)
File "/usr/local/lib/python2.7/site-packages/pylint/lint.py", line 500, in load_plugin_modules
module = modutils.load_module_from_name(modname)
File "/usr/local/lib/python2.7/site-packages/astroid/modutils.py", line 190, in load_module_from_name
return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
File "/usr/local/lib/python2.7/site-packages/astroid/modutils.py", line 232, in load_module_from_modpath
mp_file, mp_filename, mp_desc = imp.find_module(part, path)
ImportError: No module named pylint-quotes

我正在使用 mac。我应该在某处指定模块路径吗?

最佳答案

插件名称是pylint_quotes

"python.linting.pylintArgs": [
"--load-plugins",
"pylint_quotes"
],

这应该有效。

关于python - Pylint 加载插件在 VS 代码中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54922752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com