解决pylint报错tab缩进

【编辑器使用】

在VSCode下编写python程序,使用pylint辅助修正代码规范,出现无限报错:

file: 'file:///c%3A/Users/dell/Desktop/Java/ex2/FactorialSum.py'
severity: '警告'
message: 'W0312:Found indentation with tabs instead of spaces'
at: '9,1'
source: 'pylint'

大体意思是应该使用spaces来缩进,而不是tabs。

解决方法:

VSCode和Sublime Text3中都有对于缩进的设置

vscode设置:

sublime text3设置:

将相应的缩进修改为spaces即可。

原文地址:https://www.cnblogs.com/tofengz/p/7772881.html