from
Sylvain Thénault <sylvain.thenault at logilab dot fr>
to
Edvard Majakari <edvard.majakari at staselog dot com>
subject
Re: [Python-projects] Allow suppressing class docstrings
date
On Thursday 19 February à 13:04, Edvard Majakari wrote:2004/02/19 12:18
> Sylvain Thénault <Sylvain.Thenault@logilab.fr> writes:
>
> > pylint try to check function / classes name using the regexp's match
> > method. Try to set
> >
> > no-docstring-rgx=.*Error
> >
> > and that should work.
>
> Still no go: tried that, and got the following:
>
> W: 10:xmlValidityError: Missing docstring
> W: 10:xmlValidityError: More than one statement on a single line
> W: 11:xmlWellFormednessError: Missing docstring
> W: 11:xmlWellFormednessError: More than one statement on a single line
> W: 12:xmlPathError: Missing docstring
> W: 12:xmlPathError: More than one statement on a single lin
>
> In the module I have
>
> class xmlParseError(Exception): pass
> class xmlValidityError(Exception): pass
> class xmlWellFormednessError(Exception): pass
> class xmlPathError(Exception): pass
>
> and the string I used in ~/.pylintrc was
>
> no-docstring-rgx=.*Error
hum, I guess you're doing something wrong (maybe you've not applied the
patch correctly ? I join the base.py module to this mail) :
syt@musca:syt$ cat toto.py
"""test no docstring rgx
"""
class NoDocstringError: pass
class MyClassWithoutDocstring:
a = 1
syt@musca:syt$ pylint --no-docstring-rgx=".*Error" --report=n toto.py
No config file found, using default configuration
************* Module toto
W: 0: Black listed name "toto"
W: 0: Missing required attribute "__revision__"
W: 3:NoDocstringError: Class has no __init__ method
W: 3:NoDocstringError: More than one statement on a single line
W: 5:MyClassWithoutDocstring: Class has no __init__ method
W: 5:MyClassWithoutDocstring: Missing docstring
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org

