FAQ
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!

Search Discussions

  • Ben Finney at Jun 5, 2009 at 1:12 pm

    Esmail <ebonak at hotmail.com> writes:

    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?
    It's hard to know, without examples. Can you give some output of pylint
    that you think doesn't agree with PEP 8?

    --
    \ ?Are you thinking what I'm thinking, Pinky?? ?Uh... yeah, |
    `\ Brain, but where are we going to find rubber pants our size?? |
    _o__) ?_Pinky and The Brain_ |
    Ben Finney
  • Esmail at Jun 7, 2009 at 1:23 pm

    Ben Finney wrote:
    Esmail <ebonak at hotmail.com> writes:
    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?
    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
  • David Stanek at Jun 8, 2009 at 5:08 am

    On Sun, Jun 7, 2009 at 9:23 AM, Esmailwrote:
    Ben Finney wrote:
    Esmail <ebonak at hotmail.com> writes:
    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?
    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.
    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?
  • Esmail at Jun 8, 2009 at 11:30 am
    Hi David,

    David Stanek wrote:
    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.
    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?
    :-)

    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
  • Ben Finney at Jun 8, 2009 at 5:34 am

    David Stanek <dstanek at dstanek.com> writes:

    On Sun, Jun 7, 2009 at 9:23 AM, Esmailwrote:
    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?
    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 :-)

    --
    \ ?Kill myself? Killing myself is the last thing I'd ever do.? |
    `\ ?Homer, _The Simpsons_ |
    _o__) |
    Ben Finney
  • Esmail at Jun 8, 2009 at 11:32 am

    Ben Finney wrote:

    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. David Murray at Jun 8, 2009 at 5:41 pm

    Esmail wrote:
    Ben Finney wrote:
    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.
    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)

    --
    R. David Murray http://www.bitdance.com
    IT Consulting System Administration Python Programming
  • Esmail at Jun 9, 2009 at 5:50 pm

    R. David Murray wrote:
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 5, '09 at 12:50p
activeJun 9, '09 at 5:50p
posts9
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase