我已经将vscode配置为使用pylint。
工作区设置:
"python.pythonPath": "/home/name/python-venv/machine learning/bin/python3",
"python.linting.pylintPath": "/home/name/python-venv/machine-learning/bin/pylint",这些路径链接到虚拟python环境。当我从命令提示符(ctrl+P)运行Python:时,输出-> Python窗口是:
##########Linting Output - pylint##########
No config file found, using default configuration
-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 2.31/10, +7.69)它不会发现任何错误的文件,即使它应该。当我从终端(不管有没有活动虚拟环境)运行这个命令时,我得到以下输出:
No config file found, using default configuration
************* Module test
C: 1, 0: Missing module docstring (missing-docstring)
C: 2, 0: Constant name "hello" doesn't conform to UPPER_CASE naming
style (invalid-name)
C: 3, 0: Constant name "sess" doesn't conform to UPPER_CASE naming
style (invalid-name)
-------------------------------------------------------------------
Your code has been rated at 2.50/10 (previous run: 10.00/10, -7.50)有人能告诉我它的行为是这样的吗?
发布于 2018-04-12 12:11:37
通过手动生成pylintrc来解决这个问题
pylint --generate-rcfile > ~/.pylintrc现在一切都如期而至
https://stackoverflow.com/questions/49795638
复制相似问题