pylint and the 'missing docstring' warning

  • Thread starter Jean-Michel Pichavant
  • Start date
J

Jean-Michel Pichavant

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
 
J

John Posner

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.

Look for this setting in the pylint configuration file:

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

-John
 
J

Jean-Michel Pichavant

John said:
Look for this setting in the pylint configuration file:

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

-John
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
 
J

John Posner

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.

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
 
J

Jean-Michel Pichavant

John said:
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
That would work but I definitely don't want to do that.

JM
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top