Why does vscode pylint miss obvious errors?

删除回忆录丶 提交于 2019-12-24 10:59:46

问题


I have a python file open in Visual Studio Code with an obvious error (using an undefined variable) but the pylint issues listed under 'Problems' show only a long list of minor convention issues.

Running pylint manually on it (separately from vscode) spots the error fine. The error is not explicitly excluded by any vscode pylint-related configs as far as I can see.


回答1:


Eventually I discovered this was due to the following default setting in vscode:

"python.linting.maxNumberOfProblems": 100

Editing this config to a higher number (e.g. 1000) made the error show up.

Evidently this limit is applied blindly to the pylint output in the order the problems are found, so if enough minor issues precede an error then the error will be hidden - not ideal.



来源:https://stackoverflow.com/questions/51861276/why-does-vscode-pylint-miss-obvious-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!