pylint naming conventions?

E

Esmail

Hi,

as someone who is still learning a lot about Python I am
making use of all the tools that can help me, such as
pyflakes, pychecker and pylint.

I am confused by pylint's naming conventions, I don't think
the are in tune with Python's style recommendations (PEP 8?)

Anyone else think this? Is there an easy way to get this in
compliance? Or lacking this just turn this off (I'd rather not
turn it off if it's easy to get in tune with the standards).

Or am I wrong about my assertion with regard to the naming
conventions?

Thanks,
Esmail

ps: if anyone else wants to toss in some other recommendations
for useful tools feel free to do so!
 
E

Esmail

Ben said:
It's hard to know, without examples. Can you give some output of pylint
that you think doesn't agree with PEP 8?

Sure, I will next time I have a nice self-contained example. Perhaps not that
many people are using pylint? I was expecting a bunch of messages either
contradicting my observation or agreeing with it :) .. but perhaps this
indicates that there's no issue.

I'll try to come up with a nice short code example in the next few days
to demonstrate what I think the problem is and post it, thanks for the
suggestion.

Esmail
 
D

David Stanek

Sure, I will next time I have a nice self-contained example. Perhaps not
that
many people are using pylint? I was expecting a bunch of messages either
contradicting my observation or agreeing with it :) .. but perhaps this
indicates that there's no issue.

It is my understanding that it does check for PEP8 names. Even if it doesn't
it is really easy to change. If you run 'pylint --generate-rcfile' (i think)
it will output the configuration that it is using. You can then save this
off and customize it.
I'll try to come up with a nice short code example in the next few days
to demonstrate what I think the problem is and post it, thanks for the
suggestion.

If you didn't have an example handy what prompted you to start this thread?
 
E

Esmail

Hi David,

David said:
It is my understanding that it does check for PEP8 names. Even if it doesn't
it is really easy to change. If you run 'pylint --generate-rcfile' (i think)
it will output the configuration that it is using. You can then save this
off and customize it.

Thanks, I'll see if I can customize it this way. I looked at it once briefly.
If you didn't have an example handy what prompted you to start this thread?

:)

I have had number of examples, but they are rather long, so I think it will be
better if I can provide a short example with the (rather lengthy pylint)
output that shows the problem.

I thought lots of people are using pylint and I would hear one way or
the other about the name checks (ie people agreeing or telling me I'm
way off :) .. in which case perhaps my recollection/reading of PEP 8
is not accurate.

Esmail
 
E

Esmail

Ben said:
My understanding of Esmail's original message was that, like many of us
on first running ‘pylint’ against an existing code base, the output is
astonishingly verbose and tedious to read. By the above I presume he's
being a good forum member and trying to find a minimal example that
shows the problem clearly :)

Yes, that is my intention .. because the code I was checking was rather
long, combined with the long pylint output it would make for a rather
big posting.

I'm going to go back and re-read PEP 8 and see if I perhaps don't
recall the right guidelines since no one else here seems to have had
the same observation.

Esmail
 
R

R. David Murray

Esmail said:
Yes, that is my intention .. because the code I was checking was rather
long, combined with the long pylint output it would make for a rather
big posting.

I'm going to go back and re-read PEP 8 and see if I perhaps don't
recall the right guidelines since no one else here seems to have had
the same observation.

Well, I for one looked at that long pylint output when I first tried it,
and switched to another tool :)

(pyflakes...but I don't think it does PEP 8)
 
E

Esmail

R. David Murray said:
Well, I for one looked at that long pylint output when I first tried it,
and switched to another tool :)

(pyflakes...but I don't think it does PEP 8)

:)

Ok, so I'm not the only one who thinks the output is rather lengthy.

I've since dug into the docs and searched on the web and found that

--reports=n

on the command line will truncate the various tables output at the end.

Esmail
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top