与python合成没有警告和错误箭头

时间:2021-07-21 17:27:57

I have following vimrc, but I do not get arrows for warnings and error from syntastic与python合成没有警告和错误箭头

我有跟随vimrc,但我没有获得警告的箭头和来自syntastic的错误

like on the picture below 与python合成没有警告和错误箭头

如下图所示

Further more I am not able to use the ruler with set ruler. Why I do not get a warning that variable "a" is not used?

此外,我无法使用带有标尺的标尺。为什么我没有收到变量“a”未被使用的警告?

What did I do wrong?

我做错了什么?

Thank you in advance.

先谢谢你。

1 个解决方案

#1


1  

Syntastic is checking your code for compliance with PEP8.. This is a recommendation usually followed by the Python community around formatting your code.

Syntastic正在检查您的代码是否符合PEP8。这是一个建议,通常是Python社区围绕格式化代码。

  • The first error is because you did import os but then you don't actually call any methods from os in your code since that line is commented out. You shouldn't import modules you don't use.
  • 第一个错误是因为你确实导入了os,但是你实际上并没有在代码中调用os中的任何方法,因为该行被注释掉了。您不应导入不使用的模块。
  • The second is because PEP8 specifies that you should have 2 blank lines between the imports and the start of your code.
  • 第二个是因为PEP8指定在导入和代码开头之间应该有2个空行。
  • The third is because PEP8 also says there should be no trailing whitespace.
  • 第三是因为PEP8也说没有尾随空格。

As far as the ruler goes, I'm not exactly sure as to what you're referring.

就统治者而言,我并不完全确定你所指的是什么。

#1


1  

Syntastic is checking your code for compliance with PEP8.. This is a recommendation usually followed by the Python community around formatting your code.

Syntastic正在检查您的代码是否符合PEP8。这是一个建议,通常是Python社区围绕格式化代码。

  • The first error is because you did import os but then you don't actually call any methods from os in your code since that line is commented out. You shouldn't import modules you don't use.
  • 第一个错误是因为你确实导入了os,但是你实际上并没有在代码中调用os中的任何方法,因为该行被注释掉了。您不应导入不使用的模块。
  • The second is because PEP8 specifies that you should have 2 blank lines between the imports and the start of your code.
  • 第二个是因为PEP8指定在导入和代码开头之间应该有2个空行。
  • The third is because PEP8 also says there should be no trailing whitespace.
  • 第三是因为PEP8也说没有尾随空格。

As far as the ruler goes, I'm not exactly sure as to what you're referring.

就统治者而言,我并不完全确定你所指的是什么。