pylint, was Re: pygame - importing GL - very bad...

Chris Angelico rosuav at gmail.com
Wed Jan 2 09:32:57 EST 2013


On Wed, Jan 2, 2013 at 11:07 PM, Peter Otten <__peter__ at web.de> wrote:
> someone wrote:
>> Another thing is that I don't understand this warning:
>>
>> Invalid name "original_format" (should match (([A-Z_][A-Z0-9_]*)|
>>  > (__.*__))$)
>>
>> I get it everywhere... I don't understand how it wants me to label my
>> variables... Maybe I should disable this warning to get rid of it...
>
> pylint wants global names to be uppercase (what PEP 8 recommends for
> constants) or "special" (two leading and two trailing underscores):
>
> THATS_OK = 42
> __thats_ok_too__ = object()
> but_thats_not = "spam"

Okay, I have to ask... why? Does it have an exception for names of classes?

I don't like linters that enforce too much style. Catch things that
might be mis-coded (like C's classic "if (x = 1)"), but don't complain
about my names. They're MY business.

ChrisA



More information about the Python-list mailing list