【编辑器使用】

在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设置:

解决pylint报错tab缩进解决pylint报错tab缩进

sublime text3设置:

 

解决pylint报错tab缩进解决pylint报错tab缩进

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

 

相关文章:

  • 2021-11-06
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-01-23
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-01-23
相关资源
相似解决方案