擅长:python、mysql、java
<p>从Pylint v.0.25.3开始,您可以使用符号名来禁用警告<a href="https://docs.pylint.org/en/latest/faq.html#do-i-have-to-remember-all-these-numbers" rel="noreferrer">instead of having to remember all those code numbers</a>。E、 g.:</p>
<pre><code># pylint: disable=locally-disabled, multiple-statements, fixme, line-too-long
</code></pre>
<p>这种样式比隐藏的错误代码更有指导意义,而且更实用,因为较新版本的Pylint只输出符号名,而不输出错误代码。</p>
<p>符号名和代码之间的对应关系可以找到<a href="http://pylint-messages.wikidot.com/all-codes" rel="noreferrer">here</a>。</p>
<p>禁用注释可以插入到它自己的行中,对同一块中后面的所有内容应用禁用。或者,可以将其插入到要应用它的行的末尾。</p>
<p>如果pylint输出“<code>Locally disabling</code>”消息,您可以通过将disable<code>locally-disabled</code><em>包含在前面的示例中来除去它们。</p>