[Python-projects] Why does pylint enforce __revision__ (W0103) instead of __version__ ?

Sylvain Thénault Sylvain.Thenault at logilab.fr
Mon Nov 15 09:34:33 CET 2004


On Saturday 13 November à 14:06, Pierre Rouleau wrote:
> Hi all,

Hi
 
> Why is pylint generating warning W0103 (Missing required attribute 
> "__revision__") when a module already declares __version__.
> 
> My understanding of common practice is that __version__ is widely used 
> and even suggested by Guido in PEP-0008 
> (http://www.python.org/peps/pep-0008.html).  pychecker is aware of 
> __version__ and complains about __revision__ being un unused variable.
> I routinely run pychecker, pylint and epydoc to check my python modules 
> and it just adds to the warning noise.
 
__revision__ is historically used at Logilab, and pylint's default
configuration is the one used there. Anyway you can easily customize
this in the configuration file.

<hint>
# generate a sample config file 
$ pylint --generate-rcfile > ~/.pylintrc
</hint>

-- 
Sylvain Thénault                               LOGILAB, Paris (France).

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



More information about the Python-Projects mailing list