<p>由@jrtapsell指出</p>
<h2><strong>要添加更多信息:</strong></h2>
<p>在命名约定方面,为每种类型定义了一个正则表达式。</p>
<p>您可能会注意到一个名称的长度可以从2到30个字符以及它的regex。</p>
<pre class="lang-none prettyprint-override"><code> +-------------------+---------------+-------------------------------------------+
| Type | Option | Default regular expression |
+-------------------+---------------+-------------------------------------------+
| Argument | argument-rgx | [a-z_][a-z0-9_]{2,30}$ |
| Attribute | attr-rgx | [a-z_][a-z0-9_]{2,30}$ |
| Class | class-rgx | [A-Z_][a-zA-Z0-9]+$ |
| Constant | const-rgx | (([A-Z_][A-Z0-9_]*)|(__.*__))$ |
| Function | function-rgx | [a-z_][a-z0-9_]{2,30}$ |
| Method | method-rgx | [a-z_][a-z0-9_]{2,30}$ |
| Module | module-rgx | (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
| Variable | variable-rgx | [a-z_][a-z0-9_]{2,30}$ |
| Variable, inline1 | inlinevar-rgx | [A-Za-z_][A-Za-z0-9_]*$ |
+-------------------+---------------+-------------------------------------------+
</code></pre>
<p>来源:<a href="http://pylint-messages.wikidot.com/messages:c0103" rel="nofollow noreferrer">http://pylint-messages.wikidot.com/messages:c0103</a></p>