首页 > 其他 > 详细

解决pylint报错tab缩进

时间:2017-11-10 22:56:44      阅读:1130      评论:0      收藏:0      [点我收藏+]

【编辑器使用】

在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即可。

 

解决pylint报错tab缩进

原文:http://www.cnblogs.com/tofengz/p/7772881.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!