[Python-projects] PyLint: option parsing bug

Maarten ter Huurne maarten.ter.huurne at philips.com
Mon Mar 5 21:41:04 CET 2007


When specifying options to PyLint in the wrong order, an IndexError will 
be raised:
$ pylint --version
No config file found, using default configuration
pylint 0.13.1,
astng 0.17.0, common 0.21.2
Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)]
$ pylint -rn dummy.py --rpython-mode
Traceback (most recent call last):
  File "/usr/bin/pylint", line 4, in ?
  File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 778, in 
    preprocess_options(args, {'rpython-mode': self.cb_rpython_mode,
  File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 758, in 
    search_for[option](option, args[i + 1])
IndexError: list index out of range

If I specify the options in the right order ("pylint --rpython-mode -rn 
dummy.py") it works fine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20070305/89c6e4d4/attachment.html 

More information about the Python-Projects mailing list