简体   繁体   English

所有Python文件行都在Sublime Text 2中突出显示

[英]All lines of Python file are highlighted in Sublime Text 2

Every time I save my code in Sublime Text 2, all of the lines end up highlighted as seen below. 每次我在Sublime Text 2中保存代码时,所有行都会突出显示,如下所示。 It's pretty annoying, and I would love to disable it, but I'm not sure what triggered it in the first place or what to Google. 这很烦人,我很想禁用它,但我不确定是什么原因引发了它或谷歌是什么。 Any ideas? 有任何想法吗?

Sublime截图

The cause is SublimeLinter plug-in and its PEP-8 filter 原因是SublimeLinter插件及其PEP-8过滤器

https://github.com/SublimeLinter/SublimeLinter https://github.com/SublimeLinter/SublimeLinter

Your code does not conform PEP-8 style guide: 您的代码不符合PEP-8风格指南:

http://www.python.org/dev/peps/pep-0008/ http://www.python.org/dev/peps/pep-0008/

Writing code that matches the PEP-8 style guide is generally a good idea as it has been well-vetted by the community as being a generally productive and efficient coding style. 编写与PEP-8风格指南相匹配的代码通常是一个好主意,因为它已经被社区认可为通常高效和高效的编码风格。 You may find that following it allows others to comprehend your code better. 您可能会发现跟随它可以让其他人更好地理解您的代码。 Of course, any code that parses and runs correctly might be 'good enough' for your purposes. 当然,任何解析和正确运行的代码都可能“足够好”以满足您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM