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

Ian Kelly ian.g.kelly at gmail.com
Wed Jan 2 21:55:07 EST 2013


On Wed, Jan 2, 2013 at 7:24 PM, someone <newsboost at gmail.com> wrote:
> 1) class somethingWork: Invalid name "somethingWork" (should match
> [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose it
> wants my class name to start with a capital letter ?

Yes, PEP-8 recommends CamelCase for class names.

> 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...

Also yes.

> 3) self.rx / rself.ry / self.rz: Invalid name "rx" (should match
> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
> underscore ?

It wants the name to be at least 3 characters long.



More information about the Python-list mailing list