Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pylint and the 'missing docstring' warning

12 views
Skip to first unread message

Jean-Michel Pichavant

unread,
Jan 26, 2010, 8:43:07 AM1/26/10
to Python List
Hello,

Does anyone using pylint knows a way to make pylint ignore these
'missing docstring' warnings when the base class version of the method
actually defines the docstring ?
'Cause my doc builder (epydoc) handle it properly and propagate
docstrings if asked to. Too bad pylint is complaining about it.
I don't want to deactivate this warning.

Any hint would be apreciated

JM

John Posner

unread,
Jan 26, 2010, 8:56:50 AM1/26/10
to

Look for this setting in the pylint configuration file:

# not require a docstring
no-docstring-rgx=__.*__

-John


Jean-Michel Pichavant

unread,
Jan 26, 2010, 9:22:33 AM1/26/10
to John Posner, pytho...@python.org
If I'm no wrong this just disables docstring checks for methods matching
__.*__
I'd like to disable it for any method which base class version already
defines the docstring.

JM

John Posner

unread,
Jan 26, 2010, 11:19:04 AM1/26/10
to Jean-Michel Pichavant

I'm a Pylint newbie myself. The only (half-baked) idea I can come up
with is to use a naming convention for such derived classes. For
example, if all such class names ended with "_d" (ugh!), you could
modify the configuration setting like this:

no-docstring-rgx=(__.*__|.*_d)

-John

Jean-Michel Pichavant

unread,
Jan 26, 2010, 12:20:42 PM1/26/10
to Python List
That would work but I definitely don't want to do that.

JM

0 new messages