pylint, was Re: pygame - importing GL - very bad...
Terry Reedy
tjreedy at udel.edu
Thu Jan 3 11:52:33 EST 2013
On 1/3/2013 9:19 AM, Mike C. Fletcher wrote:
> On 13-01-02 09:48 PM, Terry Reedy wrote:
> ...
>> 2) self.lightDone: Invalid name "lightDone" (should match
>>> [a-z_][a-z0-9_]{2,30}$)
>>>
>>> So I can now understand that pylint doesn't like my naming convention
>>> with a capital letter in the middle of the variable name, like:
>>> "lightDone" = a boolean value. I suppose pylint wants me to use (a
>>> little longer method) an underscore to separate words in long variable
>>> names...
>>
>> That is more conventional in the Python community (and is in pep 8, I
>> believe) but still a choice.
> That seems like a improper error message from the tool. "Invalid name"
> does *not* properly describe that situation. The name is *not*
> "Invalid" in any sense of the word, and a "checker" that tells you it is
> is creating needless false-positives. An error checker should be saying
> something like:
>
> "self.lightDone: Does not match PEP8 recommended style"
>
> making it clear that this is *not* an error, it is a *style* related
> *warning*.
I quite agree. Wanting 3 chars for attribute names is not even PEP-8
style but pylint-author style. I was really surprised at that. In that
case, 'Does not match pylint recommended style.' or even 'configured
styles'. I have not used pylint or pychecker as of yet.
--
Terry Jan Reedy
More information about the Python-list
mailing list