] > Re: [Python-projects] Allow suppressing class docstrings (Logilab.org)

Email Re: [Python-projects] Allow suppressing class docstrings

from
subject
Re: [Python-projects] Allow suppressing class docstrings
date
2004/02/19 11:50
On Thursday 19 February à 12:21, Edvard Majakari wrote:
> Sylvain Thénault <Sylvain.Thenault@logilab.fr> writes:

> Hi,

> > I've checked in a fix in the CVS, making the no-docstring-rgx apply on
> > classes too. If you want to get it working for you, just change line 265
> > of pylint/checkers/base.py to :
> >
> >         if self.config.no_docstring_rgx.match(node.name) is None:
> >             self.check_docstring('class', node)

> For some reason this doesn't seem to be enough. I tested by doing the
> change, and running then pylint domlib.py with the following entry in the
> ~/.pylintrc file:

> no-docstring-rgx=Error

> Yet I got the following:

> $ pylint domlib.py|grep Err
> W:  9:xmlParseError: Missing docstring
> W:  9:xmlParseError: Missing docstring
> W:  9:xmlParseError: More than one statement on a single line
> W: 10:xmlValidityError: Missing docstring
> W: 10:xmlValidityError: Missing docstring
> W: 10:xmlValidityError: More than one statement on a single line
> W: 11:xmlWellFormednessError: Missing docstring
> W: 11:xmlWellFormednessError: Missing docstring
> W: 11:xmlWellFormednessError: More than one statement on a single line
> W: 12:xmlPathError: Missing docstring
> W: 12:xmlPathError: Missing docstring
> W: 12:xmlPathError: More than one statement on a single line

> (all those classes are derived from Exception and contain only one
> statement: pass)

pylint try to check function / classes name using the regexp's match
method. Try to set 

no-docstring-rgx=.*Error

and that should work.
-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


is a reply to