.. -*- coding: utf-8 -*- Project pylint ============== :creation date: 2006/09/26 :homepage: http://www.pylint.org/ analyzes Python source code looking for bugs and signs of poor quality **Pylint development is now under the umbrella of the Python Code Quality Authority at** https://github.com/PyCQA/pylint/ Pylint was hosted on logilab.org from its creation in 2001 until it moved to Bitbucket_ some time around 2013. The tickets did not get ported to Bitbucket nor GitHub. To help preserve history, they will be kept here for some time. All further development will be done elsewhere. Follow the white pebbles. .. _Bitbucket: https://bitbucket.org/logilab/pylint/ Version 1.0.0 ------------- :publication date: 2013/08/06 :expected date: n/a Version 0.28.0 -------------- :expected date: n/a Ticket #123259 Pylint emits E0105 for yield expressions inside lambdas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Since Python 2.5, this is valid code: LAMBDA_WITH_YIELD = lambda: (yield) However, pylint only accepts functions as frames for lambdas. Ticket #81378 Suggested rule: Loop has else clause but no break. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending The for..else... and while...else... constructs are known to be confusing. (For example, see this article and its comments: http://nedbatchelder.com/blog/201110/forelse.html) That has lead one person (a commenter on that article) to develop a stand-alone tool to detect when someone has included an else clause without having a corresponding break statement. Such a clause is not illegal, but suggests the developer may be confused. It is equivalent to the same code simply being after the loop. NB: It won't catch all such confusions, but it is a start. Comments :: On 2013/04/25 15:15 - oddthinking wrote : The current state is "validation pending". I am not familiar with the Logilab process, that that sounds like you are waiting for the originator of the request(i.e. me) to check it. Is that correct, or does it mean something different? > On 2013/04/25 15:28 - sthenault wrote : > that means that the feature should be tested with the officialy released > version. > > Though if you look at the number of tickets in the validation pending state, > you'll see that we don't take that much the time to do so. > > So... Nevermind. Ticket #124662 crash when symbos are included in output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Ticket #124660 external dependencies report includes internal dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending at least with the latest release (try to "pylint logilab.astng" for instance) Ticket #123285 Pragmas for warnings applying to lines should be interpreted as is ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending As is, no warning will be raised for the first line in the following program: <<>>END This is because pragmas are extended to the beginning of the block if they occur before the first line containing actual code statements. This should not happen for warnings applying to physical source code lines rather than AST nodes. Ticket #123892 UnicodeEncodeError: 'latin-1' codec can't encode character ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending I have a Portuguese word in my file which results on error when i run Pylint ( 0.27.0 ) on it. C: 78,1:Event: Comma not followed by a space description = tinymce_models.HTMLField(_(u"Descri\E7\E3o"),blank=True, null=True) Where in the actual line in the file is as: description = tinymce_models.HTMLField(_(u"Descrição"),blank=True, null=True) The actual error has been pasted here: http://pastebin.com/yk1dC93y Please let me know how to resolve this issue Comments :: On 2013/04/12 14:07 - sthenault wrote : what's the *error* you get? Do you mean it crashes, or taht you see '\E7' instead of 'ç'? Also, what's the encoding of the python source code and of your environment ? > On 2013/04/12 14:16 - sthenault wrote : > ok, seen the UnicodeEncode crash in the pastebin. The pb is very likely that > your latin-1 environment can't display line where a convention violation has > been detected, making pylint choke. The patch below should fix the pb::: > > diff --git a/reporters/__init__.py b/reporters/__init__.py > --- a/reporters/__init__.py > +++ b/reporters/__init__.py > @@ -80,11 +80,11 @@ class BaseReporter: > encoding = (getattr(self.out, 'encoding', None) or > locale.getdefaultlocale()[1] or > sys.getdefaultencoding()) > - return string.encode(encoding) > + return string.encode(encoding, 'replace') > self.encode = encode Ticket #123233 Warn about duplicate argument names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Detection of duplicate argument names is handled after the actual parsing (pass 2 syntax errors) and thus does not lead to a syntax error in pylint. Pylint should have a separate warning for them. Ticket #74013 WARN on questionable use of str.strip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending A common mistake I see is when people use some_string.strip('foobar') thinking the substring 'foobar' will be stripped from some_string. They probably mean to use replace('foobar', '') or something similar. Detecting this improper usage reliably is nearly impossible, but I find in many cases the word (or words) chosen contain duplicate letters (as in 'foobar'). In any case, redundant letters are pointless and are worthy of a warning. Hopefully the ultimate effect is that the user discovers his mis-understanding of the method and goes on with his life forever reformed. Ticket #122793 logging checker dies on a particular ast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending With: logilab-astng==0.24.2 logilab-common==0.59.0 pylint==0.27.0 Starting with 0.27.0, pylint dies on my codebase with this traceback: Traceback (most recent call last): File "/home/mike/.virtualenvs/piston/bin/pylint", line 9, in load_entry_point('pylint==0.27.0', 'console_scripts', 'pylint')() File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint Run(sys.argv[1:]) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/lint.py", line 991, in __init__ linter.check(args) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/lint.py", line 587, in check self.check_astng_module(astng, walker, rawcheckers) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/lint.py", line 666, in check_astng_module walker.walk(astng) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/utils.py", line 600, in walk self.walk(child) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/utils.py", line 600, in walk self.walk(child) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/utils.py", line 597, in walk cb(astng) File "/home/mike/.virtualenvs/piston/lib/python2.7/site-packages/pylint/checkers/logging.py", line 88, in visit_callfunc and [ancestor for ancestor in inferred._proxied.ancestors() if ( AttributeError: 'Function' object has no attribute 'ancestors' I reduced the code, and ended up with this snippet to reproduce: def gen(): yield i = gen() i.next() Comments :: On 2013/03/16 06:55 - novas0x2a wrote : Also, sorry, this is with python 2.7.3, in case that matters. On 2013/03/26 18:03 - andres.riancho wrote : I'm also able to reproduce this bug. Any idea on when it's going to be fixed? > On 2013/03/27 07:33 - sthenault wrote : > I'll try to do a bug fix release in the next few days On 2013/04/16 15:59 - andres.riancho wrote : thanks for fixing! Version 0.27.0 -------------- :expected date: n/a Ticket #110840 Add new messages for reporting of suppressed messages and useless suppression pragma ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Ticket #110853 crash when __init__ method created by assignment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending Ticket #105327 disable all checkers from the command line (to selectively re-enable a few checks) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending To run just the similarities checkers it is necessary to use --disable=I,E,W,R,C,F --enable=similarities which is non obvious nor convenient. A nicer alternative would be --disable=all --enable=similarities Comments :: On 2012/09/17 08:18 - vanish wrote : work in progress on https://bitbucket.org/agurney/pylint Ticket #115580 erroneous W0212 (access to protected member) on super call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Ticket #120657 give [deprecated-lambda] when a map/filter of a lambda could be a comprehension ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Ticket #113231 logging checker only looks at root logger, not other logger instances ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending logging.critical('test %s' % 1) gives rise to W1201, as expected import logging logger = logging.getLogger(__name__) logger.critical('test %s' % 1) using getLogger as recommended by the logging documentation, doesn't, but should. Comments :: On 2012/12/06 17:51 - LeaChim wrote : Patch available here: https://bitbucket.org/leachimuk/pylint/commits/744ebc66967d40dded1674efbc2ca887a5a971ce > On 2013/02/22 16:40 - sthenault wrote : > integrated, thx Ticket #20693 merge Ian Eure's python-pylint.el ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending http://atomized.org/2010/02/pep8-pylint-in-emacs/ Ticket #110839 pylint-gui: bind F5 to run button ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending would make things easier at low cost Ticket #110838 pylint-gui crash when include-ids is activated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Ticket #120635 pylint.reporters uses 'cmp' function which has been dropped in py3k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Ticket #112550 test_gtk_import fails test_regr.NonRegrTC in 0.26.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Comments :: On 2012/11/22 17:01 - idella4 wrote : test_gtk_import (test_regr.NonRegrTC) ... FAIL FAIL: test_gtk_import (test_regr.NonRegrTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/usr/lib64/python2.7/site-packages/logilab/common/testlib.py", line 646, in _proceed testfunc(*args, **kwargs) ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__red$ ------------------------ local variables ------------------------- File "/mnt/gen2/TmpDir/portage/dev-python/pylint-0.26.0/work/pylint-0.26.0-2.7/test/test_regr.py", line 87, in test_gtk_import self.assertEqual(got, '') ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__red$ ------------------------ local variables ------------------------- got: 'R: 7:FooButton: Badly implemented Container, implements __len__ but not __delitem__, __getitem__, __setitem__' gtk: self: self._TestCase__exc_info: self._TestCase__testMethodName: 'test_gtk_import' self._cleanups: [] self._current_test_descr: None self._options_: : 'assertMultiLineEqual', : 'assertListEqual', :$ ------------------------------------------------------------------ File "/usr/lib64/python2.7/unittest/case.py", line 511, in assertEqual assertion_func(first, second, msg=msg) ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__red$ self._type_equality_funcs: {: 'assertMultiLineEqual', : 'assertListEqual', :$ standardMsg: "'R: 7:FooButton: Badly implemented Container, implements __len__ but not __delitem__, __getitem__, __setitem__$ ------------------------------------------------------------------ AssertionError: 'R: 7:FooButton: Badly implemented Container, implements __len__ but not __delitem__, __getitem__, __setitem__' $ Hope this maps it sufficiently. See also https://bugs.gentoo.org/show_bug.cgi?id=442578 Ticket #111799 W1401 check complains incorrectly about \0, but not \o ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending The new (in 0.26.0) check for W1401 ("Anomalous backslash in string") has this definition in it, to enumerate the backslash escapes that are meaningful in Python string literals: ESCAPE_CHARACTERS = 'abfnrtvox\n\r\t\\\'\"' This is not quite right, though. I think the mistake comes from a confusing table in the Python reference at http://docs.python.org/2/reference/lexical_analysis.html#literals . In the escape sequence "\ooo" shown in that table, all of the "o" letters stand for octal digits- there is no "\o" escape in Python. The W1401 check should complain about any "\o" instances in non-raw strings, like it does for \d, etc. And by the same token, "\0" IS a proper (and common) escape sequence in Python, which W1401 erroneously complains about. (See Footnote 3 after that Python reference escape sequences table; it is supported and ok for there to be only one octal digit in the escape sequence. Ticket #112728 Warn about non-string objects in __all__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Python accepts non-string objects in __all__ as long as modules are only imported via 'import X'. If __all__ is inspected due to a from import and non-string objects are found, an exception is raised. Pylint should be able to detect problems like this. Example: def foo(): pass __all__ = [foo] Expected: E????: Invalid object in __all__: foo Ticket #22277 Fragile reimport warning false positives ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending The following examples demonstrate the problem: == bad.py == from package import util as local_util import someother import util == Reimport 'util' (imported line 3) == == good.py == from package import util as localutil import someother import util == No (relevant) errors == Basically, the problem comes down to the non-deterministic dict order and the use of context.values() in the get_first_import() function. Changing context.values() => context.asList() fixes this problem. Comments :: On 2013/02/26 22:37 - sthenault wrote : Fixed by :eid:`112667` Ticket #110213 "No such message id W0704" when using Python 3.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending I tried installing to a fresh 3.3 virtualenv. It seems to install okay, but when I run Pylint, it gives an error. I'm using Arch Linux. Install output and error message: ~/Code/pylint-test > virtualenv-3.3 env New python executable in env/bin/python Installing distribute........................................done. Installing pip................done. ~/Code/pylint-test > source env/bin/activate (env) ~/Code/pylint-test > pip install pylint Downloading/unpacking pylint Downloading pylint-0.26.0.tar.gz (222kB): 222kB downloaded Running setup.py egg_info for package pylint warning: no files found matching '*.html' under directory 'doc' warning: no files found matching '*.txt2' under directory 'test' warning: no files found matching 'noext' Downloading/unpacking logilab-common>=0.53.0 (from pylint) Downloading logilab-common-0.58.1.tar.gz (196kB): 196kB downloaded Running setup.py egg_info for package logilab-common package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*.py' under directory 'test/input' warning: no files found matching '*' under directory 'doc/html' Downloading/unpacking logilab-astng>=0.21.1 (from pylint) Downloading logilab-astng-0.24.1.tar.gz (106kB): 106kB downloaded Running setup.py egg_info for package logilab-astng package init file './test/__init__.py' not found (or not a regular file) Installing collected packages: pylint, logilab-common, logilab-astng Running setup.py install for pylint Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma changing mode of build/scripts-3.3/pylint from 644 to 755 changing mode of build/scripts-3.3/pylint-gui from 644 to 755 changing mode of build/scripts-3.3/symilar from 644 to 755 changing mode of build/scripts-3.3/epylint from 644 to 755 changing mode of build/scripts-3.3/pyreverse from 644 to 755 warning: no files found matching '*.html' under directory 'doc' warning: no files found matching '*.txt2' under directory 'test' warning: no files found matching 'noext' changing mode of /home/jmabey/Code/pylint-test/env/bin/epylint to 755 changing mode of /home/jmabey/Code/pylint-test/env/bin/pylint-gui to 755 changing mode of /home/jmabey/Code/pylint-test/env/bin/pyreverse to 755 changing mode of /home/jmabey/Code/pylint-test/env/bin/pylint to 755 changing mode of /home/jmabey/Code/pylint-test/env/bin/symilar to 755 Installing pylint script to /home/jmabey/Code/pylint-test/env/bin Installing pyreverse script to /home/jmabey/Code/pylint-test/env/bin Installing epylint script to /home/jmabey/Code/pylint-test/env/bin Installing pylint-gui script to /home/jmabey/Code/pylint-test/env/bin Installing symilar script to /home/jmabey/Code/pylint-test/env/bin Running setup.py install for logilab-common package init file './test/__init__.py' not found (or not a regular file) Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma package init file './test/__init__.py' not found (or not a regular file) changing mode of build/scripts-3.3/pytest from 644 to 755 deleting logilab_common.egg-info/requires.txt package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*.py' under directory 'test/input' warning: no files found matching '*' under directory 'doc/html' Installing /home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab_common-0.58.1-py3.3-nspkg.pth changing mode of /home/jmabey/Code/pylint-test/env/bin/pytest to 755 package init file './test/__init__.py' not found (or not a regular file) Running setup.py install for logilab-astng package init file './test/__init__.py' not found (or not a regular file) Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma package init file './test/__init__.py' not found (or not a regular file) File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/nonregr.py", line 35 print v.get('yo') ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/noendingnewline.py", line 42 print 'a' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/all.py", line 27 def func(): print 'yo' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/module.py", line 22 print '!!!' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/notall.py", line 27 def func(): print 'yo' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/module2.py", line 73 assert `1` ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/appl/myConnection.py", line 26 print 'MyConnection init' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/data/SSL1/Connection1.py", line 33 print 'init Connection' ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/regrtest_data/package/absimport.py", line 22 print import_package_subpackage_module ^ SyntaxError: invalid syntax File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab/astng/test/regrtest_data/absimp/string.py", line 3 print string ^ SyntaxError: invalid syntax package init file './test/__init__.py' not found (or not a regular file) Installing /home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/logilab_astng-0.24.1-py3.3-nspkg.pth package init file './test/__init__.py' not found (or not a regular file) Successfully installed pylint logilab-common logilab-astng Cleaning up... (env) ~/Code/pylint-test > pylint Problem importing module raw_metrics.py: No module named 'raw_metrics' Problem importing module classes.py: No module named 'classes' Problem importing module misc.py: No module named 'misc' Problem importing module utils.py: No module named 'utils' Problem importing module base.py: No module named 'base' Problem importing module similar.py: No module named 'similar' Problem importing module imports.py: No module named 'imports' Problem importing module exceptions.py: No module named 'exceptions' Problem importing module design_analysis.py: No module named 'design_analysis' Problem importing module variables.py: No module named 'variables' Problem importing module format.py: No module named 'format' Problem importing module newstyle.py: No module named 'newstyle' Problem importing module string_format.py: No module named 'string_format' Problem importing module typecheck.py: No module named 'typecheck' Traceback (most recent call last): File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/pylint/utils.py", line 254, in check_message_id return self._messages[msgid] KeyError: 'W0704' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/jmabey/Code/pylint-test/env/bin/pylint", line 9, in load_entry_point('pylint==0.26.0', 'console_scripts', 'pylint')() File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/pylint/__init__.py", line 21, in run_pylint Run(sys.argv[1:]) File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/pylint/lint.py", line 890, in __init__ linter.disable('W0704') File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/pylint/utils.py", line 192, in disable msg = self.check_message_id(msgid) File "/home/jmabey/Code/pylint-test/env/lib/python3.3/site-packages/pylint/utils.py", line 256, in check_message_id raise UnknownMessage('No such message id %s' % msgid) pylint.utils.UnknownMessage: No such message id W0704 (env) ~/Code/pylint-test > python --version Python 3.3.0 Comments :: On 2012/11/28 16:25 - anon wrote : same here with fedora18 On 2012/12/02 18:19 - anon wrote : On Windows 8 ... I get ... did "easy_install" for pylint and logilab dependencies ...\src>pylint track.py Problem importing module base.py: No module named 'base' Problem importing module classes.py: No module named 'classes' Problem importing module design_analysis.py: No module named 'design_analysis' Problem importing module exceptions.py: No module named 'exceptions' Problem importing module format.py: No module named 'format' Problem importing module imports.py: No module named 'imports' Problem importing module misc.py: No module named 'misc' Problem importing module newstyle.py: No module named 'newstyle' Problem importing module raw_metrics.py: No module named 'raw_metrics' Problem importing module similar.py: No module named 'similar' Problem importing module string_format.py: No module named 'string_format' Problem importing module typecheck.py: No module named 'typecheck' Problem importing module utils.py: No module named 'utils' Problem importing module variables.py: No module named 'variables' Traceback (most recent call last): File "C:\Python33\lib\site-packages\pylint\utils.py", line 254, in check_message_id return self._messages[msgid] KeyError: 'W0704' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python33\Scripts\pylint-script.py", line 9, in load_entry_point('pylint==0.26.0', 'console_scripts', 'pylint')() File "C:\Python33\lib\site-packages\pylint\__init__.py", line 21, in run_pylint Run(sys.argv[1:]) File "C:\Python33\lib\site-packages\pylint\lint.py", line 890, in __init__ linter.disable('W0704') File "C:\Python33\lib\site-packages\pylint\utils.py", line 192, in disable msg = self.check_message_id(msgid) File "C:\Python33\lib\site-packages\pylint\utils.py", line 256, in check_message_id raise UnknownMessage('No such message id %s' % msgid) pylint.utils.UnknownMessage: No such message id W0704 ...\src> On 2012/12/10 15:49 - anon wrote : I hit the same snag on Fedora 18 using virtualenvwrapper's mkvirtualenv to create the venv, workon venv, then pip install pylint. On 2012/12/21 11:57 - anon wrote : Same here with ArchLinux (3.6.10-1-ARCH x86_64) and Python 3.3.0. On 2013/01/10 17:38 - ToBeReplaced wrote : pylint-0.26.0 seems incompatible with CPython-3.3.0. The function `package_load` in pylint/checkers/__init__.py will not correctly load the checker modules, which is what is causing the bug in this thread. I hacked the file on my local copy to see if I could get it running, but I ran into a number of other issues before the rabbit hole got too deep. First, the TreeRebuilder(3k) in logilab-astng-0.24.1 does not implement methods for some of the nodes it needs. It is missing methods for `visit_try` and `visit_yieldfrom`. Patching those with dummies got me to an issue visit_with, where I had to give up. On 2013/01/13 14:05 - anon wrote : I had the same problem with visit_try , visit_yieldfrom, and visit_with using Eclipse and pylint 0.26.0;python 3.3; astng 0.24.1; common 0.58.3. visit_yieldfrom and visit_with were resolved by manually downloading astng 0.24.1 from the python website and manually installing. Did the same with common. This version of 0.24.1 contains visit_with and visit_yieldfrom methods. I had tried using pip before. I also made a visit_try method in TreeBuilder and copied the visit_tryelse method body from TreeBuilder and that resolved that(not a good fix but one that made it start working). I also was getting the no module named* errors. I replaced this line in pylint.checkers package_load to fix(not ideal I think): #module = __import__(basename, globs, globs, None) import importlib module = importlib.import_module("pylint.checkers." + basename) I also loaded the src for common, astng, pylint and fixed some imports that eclipse said weren't working. Not sure if I needed to do this it was an early fix attempt. But try it if the above still doesn't fix it. Also there's a cmp method pylint.reporters __init__ diff_string that doesn't work with 3.# python. I found this workaround on some site: def cmp(a, b): return (a > b) - (a < b) Not sure if I really need this since I'm not sure I use reporters with eclipse since I turn off reports with --reports=n. Maybe reporters doesn't have anything to do with reports. Worth trying it out if the above doesn't fix it. On 2013/01/13 14:09 - anon wrote : I meant TreeRebuilder in astng rebuilder.py in the above post. On 2013/01/15 02:55 - anon wrote : Actually visit_yieldfrom isn't in astng. Though it just gives an error message and pylint still works I guess. Also the visit_try fix doesn't really fix anything it just allows pylint to not error out. I don't think try blocks will get processed correctly. On 2013/01/25 05:47 - anon wrote : I was able to get visit_try to work with 3.3. Although it's not ideal it does pass the unit tests involved with testing try blocks. Even so, the unit tests didn't pick out every situation so you might have to add more fixes to different newnode attributes than the ones listed below. In astng rebuilder add: .. sourcecode:: python from _ast import Try In astng rebuilder TreeRebuilder class add: .. sourcecode:: python def try_fix(self , newnode, node, attr=""): newNodeBlock = [] for child in getattr(node, attr): if isinstance(child, Try): newNodeBlock.extend(self.visit(child, newnode)) else: newNodeBlock.append(self.visit(child, newnode)) setattr(newnode, attr, newNodeBlock) In astng rebuilder TreeRebuilder class add: .. sourcecode:: python def visit_try(self, node, parent): newnodes = [] if node.finalbody: newnodes.append(self.visit_tryfinally(node, parent)) newnodes.append(self.visit_tryexcept(node, parent)) return newnodes Now in astng rebuilder replace every instance of: .. sourcecode:: python newnode.body = [self.visit(child, newnode) for child in node.body] replace with: .. sourcecode:: python self.try_fix(newnode, node, 'body') .. sourcecode:: python newnode.handlers = [self.visit(child, newnode) for child in node.handlers] replace with: .. sourcecode:: python self.try_fix(newnode, node, 'handlers') .. sourcecode:: python newnode.orelse = [self.visit(child, newnode) for child in node.orelse] replace with: .. sourcecode:: python self.try_fix(newnode, node, 'orelse') On 2013/01/25 06:04 - anon wrote : Another fix to astng rebuilder for python 3 only: In astng rebuilder TreeRebuilder visit_with function change all: node.context_expr replace with: node.items[0].context_expr On 2013/02/22 15:18 - sthenault wrote : Please stop adding python3.3 related bugs as comment in this thread, rather add new tickets. I've added the following tickets extracted from this thread: * http://www.logilab.org/ticket/120635 * http://www.logilab.org/ticket/120646 You will also find patches attached there, and I would be glad if you could test them. Version 0.26.0 -------------- :publication date: 2012/10/08 :expected date: n/a Ticket #76910 pip install errors/warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending I get these errors in console when I install pylint on python 2.7 with pip. Installation succeeds though. It looks like these are test cases and the they are designed to through errors and warnings, in which case could these be wrapped in setup.py not to spew the text on the console? SyntaxError: ('unknown encoding: IBO-8859-1', ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_unknown_encoding.py', 0, 0, None)) SyntaxError: ("'return' with argument inside generator",) SyntaxError: ("default 'except:' must be last", ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_w0705.py', 28, None, '__revision__ += 1\n')) SyntaxError: ('invalid syntax', ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_syntax_error.py', 1, 9, 'def toto\n')) /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:4: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (1 == 1, 2 == 2), "no error" /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:5: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (1 == 1, 2 == 2) #this should generate a warning /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:7: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (1 == 1, ), "no error" /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:8: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (1 == 1, ) /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:9: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (1 == 1, 2 == 2, 3 == 5), "no error" /usr/lib64/python2.7/site-packages/pylint/test/input/func_assert_2uple.py:11: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (True,'error msg') #this should generate a warning SyntaxError: ("'continue' not properly in loop", ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_continue_not_in_loop.py', 8, None, 'continue\n')) SyntaxError: ("'return' outside function", ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_return_outside_func.py', 3, None, 'return\n')) Sorry: IndentationError: ('expected an indented block', ('/usr/lib64/python2.7/site-packages/pylint/test/input/syntax_error.py', 2, 5, "print 'hop'\n")) SyntaxError: ("'yield' outside function", ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_yield_outside_func.py', 3, None, 'yield 1\n')) SyntaxError: ('keyword argument repeated', ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_keyword_repeat.py', 8, None, 'function_default_arg(two=5, two=7)\n')) SyntaxError: ('from __future__ imports must occur at the beginning of the file', ('/usr/lib64/python2.7/site-packages/pylint/test/input/func_3k_removed_stuff_py_30.py', 4, None, 'from __future__ import generators\n')) Ticket #100707 Add check for "except Foo or Bar" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: validation pending I've seen a pattern used where someone wants to catch either of two exceptions, so they will write except Foo or Bar as e: when they mean except (Foo, Bar) as e I have a patch which adds support for this check, and will attempt to attach once created. Ticket #106534 add --ignore-imports to code duplication (R0801) / symilar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending The same imports often appear at the top of source files, especially with frameworks. This enhancement (patch forthcoming) excludes imports in a manner similar to the way comments and docstrings are optionally excluded. Unlike docstrings and comments the default was set to False so as to not modify default behavior. This addressed an old request found in #6905 though via a different mechanism than the original requester suggested. Ticket #104420 check for protocol completness and avoid false R0903 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending see http://lists.logilab.org/pipermail/python-projects/2012-February/003169.html Ticket #103949 create a console_scripts entry point to be used by easy_install, buildout and pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending the scripts kwargs for setup.py:setup() doesn't create an executable script when using distribute to install pylint. Please create console_scripts entry point Comments :: On 2012/08/23 17:55 - guyr wrote : It should be something like this: in lint.py: def console_script(): import sys return Run([sys.argv[1:]) in setup.py, add to setup call: entry_points = dict(console_scripts = ["pylint = pylint.lint:console_script"]), On 2012/10/08 15:04 - guyr wrote : couldn't find how to verify the ticket, so i'll just comment -- ticket is verified. thanks! Ticket #105337 Custom report output-format ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Allowing output-format to be a fully-qualified Python class name, such as "mypackage.mymodule.CustomReporter" so that a custom class can be used to format reports. Comments :: On 2012/09/19 18:03 - anon wrote : https://bitbucket.org/kevinjqiu/pylint/changesets/tip/branch(%22custom-reporter%22) > On 2012/09/20 06:39 - sthenault wrote : > patch integrated, thanks Ticket #103656 False positive W0231 for missing object.__init__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending In some cases, pylint raise W0231 (__init__ method from base class %r is not called) when base class for __init__ is object. FE:: class NoInit(object): """No __init__ defined""" class Init(NoInit): """Don't complain for not calling the super __init__""" def __init__(self, arg): self.arg = arg Confirmed on Mac OS X, with last pylint/logilab-astng versions. Proposed patch attached. From http://lists.logilab.org/pipermail/python-projects/2012-August/003225.html Comments :: On 2012/12/17 09:48 - anon wrote : The same bug appears in my code. Env: pylint 0.25.1, astng 0.23.1, common 0.58.0 Python 2.7.3 (default, Sep 9 2012, 17:41:34) [GCC 4.7.1] Ticket #4014 Metaclass method should have "mcs" as first argument ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending [Maarten ter Huurne] > > When running PyLint on a metaclass I wrote, I get the following warning: > > C0203:123:_SomeMeta.__iter__: Metaclass method should have "mcs" as first > argument > > I wonder what the rationale behind this naming convention is. The first > argument to a normal metaclass method is the class it operates on. > Therefore, I had named the first argument "cls", just like the first > argument of classmethods on ordinary classes. Naming it "mcs" would lead me > to think that the metaclass itself is passed as the first argument, but > that is not the case. I agree with you and I think it's a bug. 'mcs' is the argument name we generally use as the first __new__() parameter. IMHO, the check only makes sense in this particular case. Ticket #4685 Problem with Pylint's handling on __all__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: validation pending :: """Test Pylint's use of __all__. * NonExistant is not defined in this module, and it is listed in __all__. An error is expected. * This module imports path and republished it in __all__. No errors are expected. """ from os import path __all__ = [ 'Dummy', 'NonExistant', 'path',] class Dummy: """A class defined in this module.""" Ticket #72022 py3k installation problem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: validation pending Track why "python3.2 setup.py install" doesn't work as expected:: byte-compiling /usr/local/lib/python3.2/dist-packages/pylint/test/input/func_unknown_encoding.py to func_unknown_encoding.pyc Traceback (most recent call last): File "/usr/lib/python3.2/tokenize.py", line 304, in find_cookie codec = lookup(encoding) LookupError: unknown encoding: IBO-8859-1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "setup.py", line 189, in install() File "setup.py", line 185, in install **kwargs File "/usr/lib/python3.2/distutils/core.py", line 150, in setup dist.run_commands() File "/usr/lib/python3.2/distutils/dist.py", line 919, in run_commands self.run_command(cmd) File "/usr/lib/python3.2/distutils/dist.py", line 938, in run_command cmd_obj.run() File "/usr/lib/python3.2/distutils/command/install.py", line 621, in run self.run_command(cmd_name) File "/usr/lib/python3.2/distutils/cmd.py", line 315, in run_command self.distribution.run_command(command) File "/usr/lib/python3.2/distutils/dist.py", line 938, in run_command cmd_obj.run() File "setup.py", line 131, in run install_lib.install_lib.run(self) File "/usr/lib/python3.2/distutils/command/install_lib.py", line 98, in run self.byte_compile(outfiles) File "/usr/lib/python3.2/distutils/command/install_lib.py", line 135, in byte_compile dry_run=self.dry_run) File "/usr/lib/python3.2/distutils/util.py", line 549, in byte_compile compile(file, cfile, dfile) File "/usr/lib/python3.2/py_compile.py", line 111, in compile with tokenize.open(file) as f: File "/usr/lib/python3.2/tokenize.py", line 344, in open encoding, lines = detect_encoding(buffer.readline) File "/usr/lib/python3.2/tokenize.py", line 324, in detect_encoding encoding = find_cookie(first) File "/usr/lib/python3.2/tokenize.py", line 307, in find_cookie raise SyntaxError("unknown encoding: " + encoding) SyntaxError: unknown encoding: IBO-8859-1 (reported by Piotr Dobrogost on python-projects@lists.logilab.org) Comments :: On 2011/11/18 04:45 - anon wrote : I suppose the order must be the following: python setup.py build python setup.py install --no-compile But in my case the second command still fails with the same error. I'm using Python 3.2 on Windows 7. > On 2011/11/18 10:32 - Unknown author wrote : > `build` step is implicitly invoked by the `install` command due to distutils > trickery. > Try the following commands. It seems to work for others:: > > $ NO_SETUPTOOLS=1 python3.2 setup.py install --no-compile > $ easy_install-3.2 logilab-common > $ easy_install-3.2 logilab-astng On 2012/05/23 18:02 - pzelnip wrote : This is not a resolution for those who use Python virtual environments and want to just "pip install pylint" On 2012/05/23 18:12 - pzelnip wrote : It would appear the problem is with the test/input/func_unknown_encoding.py file which contains the offending "IBO" encoding. Removing this file, and then pip installing from source works perfectly. Ticket #104572 symbolic warning names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Martin Pool on python-projects Some people on my work project have complained that pylint suppressions are hard in code review, because they don't remember the meaning of all of the numbers. It seems to me that it would be nice if it was possible to use short symbolic names instead, similar to gcc warnings, like Wunused-imports or Wunreachable. Obviously there would still be times when you want a comment or discussion of _why_ the warning is suppressed or whether there is a better alternative, but sometimes just knowing the meaning would be enough. Ticket #63424 unable to disable duplication report ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending "pylint --disable=R0801 package" Always prints out the Duplication report but the --disable should suppress it. I think checkers/similar.py:242 should be RP0801 rather than R0801 Comments :: On 2012/03/08 16:51 - anon wrote : I am experiencing the same problem. On 2013/02/20 03:47 - anon wrote : I am experiencing this too. Ticket #100654 "use l as long integer identifier" grammatical error implies opposite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending The warning issued by pylint when you use an "l" as a long integer identifier commands you to use "l", which is wrong. It should either say "uses l..." or "use L". Ticket #104571 warn about backslash escape ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Martin Pool on python-projects: We were recently debugging some code like this: re.compile('\\\\/') This is legal Python (equivalent to r'\\/') but possibly buggy. It would be safer and clearer to say r'\\/' if that's what you want - and the 're' manual highly recommends you should use raw strings here. In Python (unlike C, Perl, Python REs and most unix tools) backslashes followed by a non-special character in a string literal are passed through as backslashes, which in my small survey surprised many people. Ticket #82417 Install fails with SyntaxError: unknown encoding: IBO-8859-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: validation pending byte-compiling build/bdist.linux-x86_64/egg/pylint/test/input/func_unknown_encoding.py to func_unknown_encoding.pyc Traceback (most recent call last): File "/hostname/sig/local/lib/python3.2/tokenize.py", line 304, in find_cookie codec = lookup(encoding) LookupError: unknown encoding: IBO-8859-1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "setup.py", line 187, in install() File "setup.py", line 183, in install **kwargs File "/hostname/sig/local/lib/python3.2/distutils/core.py", line 148, in setup dist.run_commands() File "/hostname/sig/local/lib/python3.2/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/hostname/sig/local/lib/python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/home/joiner/.local/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/home/joiner/.local/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg/setuptools/command/install.py", line 93, in do_egg_install self.run_command('bdist_egg') File "/hostname/sig/local/lib/python3.2/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/hostname/sig/local/lib/python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/home/joiner/.local/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg/setuptools/command/bdist_egg.py", line 179, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/joiner/.local/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg/setuptools/command/bdist_egg.py", line 166, in call_command self.run_command(cmdname) File "/hostname/sig/local/lib/python3.2/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/hostname/sig/local/lib/python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "setup.py", line 129, in run install_lib.install_lib.run(self) File "/home/joiner/.local/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg/setuptools/command/install_lib.py", line 24, in run self.byte_compile(outfiles) File "/hostname/sig/local/lib/python3.2/distutils/command/install_lib.py", line 133, in byte_compile dry_run=self.dry_run) File "/hostname/sig/local/lib/python3.2/distutils/util.py", line 547, in byte_compile compile(file, cfile, dfile) File "/hostname/sig/local/lib/python3.2/py_compile.py", line 111, in compile with tokenize.open(file) as f: File "/hostname/sig/local/lib/python3.2/tokenize.py", line 344, in open encoding, lines = detect_encoding(buffer.readline) File "/hostname/sig/local/lib/python3.2/tokenize.py", line 324, in detect_encoding encoding = find_cookie(first) File "/hostname/sig/local/lib/python3.2/tokenize.py", line 307, in find_cookie raise SyntaxError("unknown encoding: " + encoding) SyntaxError: unknown encoding: IBO-8859-1 Comments :: On 2011/11/07 03:33 - anacrolix wrote : This occurs for the latest version out, 0.25.1, *and* the tip from hg. Also please fix ur bug tracking system, it's absolutely awful. The sign up process was a pain, and the controls all stuff up on Chrome. > On 2011/11/07 10:23 - Unknown author wrote : > agreed, pylint should not crash in that case. I assume you've seen the problem > (it is spelled "ISO" and not "IBO") On 2011/11/07 10:28 - Unknown author wrote : The problem comes from the installation step. An identical ticket was already opened for the same problem :eid:`72022`. Solution: you must not compile files at installation time... :: NO_SETUPTOOLS=1 python3.2 setup.py install --no-compile On 2011/11/07 11:38 - anacrolix wrote : This actually makes no difference. On 2011/11/07 11:41 - anacrolix wrote : I can't work out how to attach a file in the tracker, here's the full output: matt@stanley:~/src/pylint$ python3.2 setup.py install --user --no-compile running install running bdist_egg running egg_info creating pylint.egg-info writing requirements to pylint.egg-info/requires.txt writing pylint.egg-info/PKG-INFO writing top-level names to pylint.egg-info/top_level.txt writing dependency_links to pylint.egg-info/dependency_links.txt writing manifest file 'pylint.egg-info/SOURCES.txt' package init file './test/__init__.py' not found (or not a regular file) reading manifest file 'pylint.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.html' under directory 'doc' warning: no files found matching '*.txt2' under directory 'test' warning: no files found matching 'noext' writing manifest file 'pylint.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py package init file './test/__init__.py' not found (or not a regular file) package init file './test/__init__.py' not found (or not a regular file) creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/pylint creating build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/test_regr.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/unittest_lint.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/test_func_sample_config.py -> build/bdist.linux-x86_64/egg/pylint/test creating build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_overriden_method_varargs.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_e1101_but_getattr.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_module___dict__.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_base_stmt_without_effect.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_nonregr___file___global.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_import_syntax_error.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/w0801_same.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0903.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0403.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_globals.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_i0012.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0001_py30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_i0011.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_newstyle_super.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_class_members.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0401.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_too_many_returns_yields.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_class_attributes.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_encoding.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_base_useless_pass.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_classes_meth_signature.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0205.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0902.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_no_warning_docstring.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_indirect_interface.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_access_attr_before_def_false_positive.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_empty_module.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func___name___access.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0101.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0204.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_yield_assign_py25.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_too_many_locals_arguments.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_variables_unused_name_from_wilcard_import.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_unused_overridden_argument.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0011.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_staticmethod_as_decorator_py24.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_builtin_module_test.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_method_without_self_but_self_assignment.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0012.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_with_without_as_py25.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0904.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_classes_meth_could_be_a_function.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_nonregr.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0231.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0206.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0233.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_decorator_scope.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_names_imported_from_module.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_method_could_be_function.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_dangerous_default.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/syntax_error.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0111.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_operators.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/indirect3.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0202.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_format.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_newstyle_property.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0406.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_backtick_deprecated_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0112.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_base_init_vars.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0801.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_raise_return_self.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_continue_not_in_loop.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0203.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_w0232.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_typecheck_getattr.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_factory_method.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_i0010.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_typecheck_non_callable_call.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_interfaces.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_yield_outside_func.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_keyword_repeat.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_undefined_var.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0331_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0622.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0601.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_mcs_attr_access.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_external_classmethod_crash.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_newstyle_exceptions.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0923.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0152.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_nested_classes.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_static_method.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_f0001.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_i0013.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_genexpr_var_scope_py24.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0103.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_object_as_class_attribute.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0102.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_defining-attr-methods_order.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_nameerror_on_string_substitution.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0205.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_block_disable_msg.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_defined_and_used_on_same_line.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_9215_lambda_arg_as_decorator.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0302.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_use_for_or_listcomp_var.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0108.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_socket_member.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_docstring.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0133.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_function_as_method.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_exceptions_raise_type_error.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_return_outside_func.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_fixme.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/__init__.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0701_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_classes_protected_member_access.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/indirect2.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0705.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0921.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_return_yield_mix.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_except_pass.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_exception.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0109.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_dotted_ancestor.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/indirect1.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_arguments.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0611.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_bad_assigment_to_exception_var.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0703.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_unreachable.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_newstyle___slots__.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e12xx.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0404.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0312.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0402.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_init_vars.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0612.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_overloaded_operator.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0613.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_attrs_definition_order.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e0214.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_dict_keys.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_f0401.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w1201.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0702.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0110.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_class_decorators_py26.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0623.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_e13xx.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_genexp_in_class_scope.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_new_style_class_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_scope_regrtest.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_break_or_return_in_try_finally.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_syntax_error.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror___init___return_from_inner_function.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0704.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_unknown_encoding.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_long_utf8_line.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0104.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_e1101_13784.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0151.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_e1101_9588_base_attr_aug_assign.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_assert_2uple.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0901.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0122_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_toolonglines.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_method_missing_self.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0105.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_typecheck_callfunc_assigment.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_inner_classes.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_class_access_protected_members.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0405.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0332_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_reqattrs.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0223.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror___future___import.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/ignore_except_pass_by_default.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_lambda_use_before_assign.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_indent.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_3k_removed_stuff_py_30.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_r0922.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_noerror_yield_return_mix.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/func_w0101.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/input/w0401_cycle.py -> build/bdist.linux-x86_64/egg/pylint/test/input copying build/lib/pylint/test/test_similar.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/smoketest.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/test_import_graph.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/test_format.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/utils.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/test_func.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/unittest_checkers_utils.py -> build/bdist.linux-x86_64/egg/pylint/test copying build/lib/pylint/test/unittest_pyreverse_writer.py -> build/bdist.linux-x86_64/egg/pylint/test creating build/bdist.linux-x86_64/egg/pylint/test/data copying build/lib/pylint/test/data/clientmodule_test.py -> build/bdist.linux-x86_64/egg/pylint/test/data copying build/lib/pylint/test/data/__init__.py -> build/bdist.linux-x86_64/egg/pylint/test/data copying build/lib/pylint/test/data/suppliermodule_test.py -> build/bdist.linux-x86_64/egg/pylint/test/data copying build/lib/pylint/test/unittest_pyreverse_diadefs.py -> build/bdist.linux-x86_64/egg/pylint/test creating build/bdist.linux-x86_64/egg/pylint/reporters copying build/lib/pylint/reporters/html.py -> build/bdist.linux-x86_64/egg/pylint/reporters copying build/lib/pylint/reporters/text.py -> build/bdist.linux-x86_64/egg/pylint/reporters copying build/lib/pylint/reporters/guireporter.py -> build/bdist.linux-x86_64/egg/pylint/reporters copying build/lib/pylint/reporters/__init__.py -> build/bdist.linux-x86_64/egg/pylint/reporters copying build/lib/pylint/lint.py -> build/bdist.linux-x86_64/egg/pylint creating build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/diagrams.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/diadefslib.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/utils.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/__init__.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/writer.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/pyreverse/main.py -> build/bdist.linux-x86_64/egg/pylint/pyreverse copying build/lib/pylint/epylint.py -> build/bdist.linux-x86_64/egg/pylint copying build/lib/pylint/__pkginfo__.py -> build/bdist.linux-x86_64/egg/pylint copying build/lib/pylint/utils.py -> build/bdist.linux-x86_64/egg/pylint copying build/lib/pylint/__init__.py -> build/bdist.linux-x86_64/egg/pylint creating build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/base.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/raw_metrics.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/string_format.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/format.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/newstyle.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/logging.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/exceptions.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/utils.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/misc.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/__init__.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/classes.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/variables.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/imports.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/typecheck.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/similar.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/checkers/design_analysis.py -> build/bdist.linux-x86_64/egg/pylint/checkers copying build/lib/pylint/interfaces.py -> build/bdist.linux-x86_64/egg/pylint copying build/lib/pylint/config.py -> build/bdist.linux-x86_64/egg/pylint copying build/lib/pylint/gui.py -> build/bdist.linux-x86_64/egg/pylint Creating missing __init__.py for pylint.test creating build/bdist.linux-x86_64/egg/EGG-INFO installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts running install_scripts running build_scripts creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.2/pyreverse -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.2/epylint -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.2/pylint -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.2/pylint-gui -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-3.2/symilar -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/pyreverse to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/epylint to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/pylint to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/pylint-gui to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/symilar to 775 copying pylint.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying pylint.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pylint.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pylint.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pylint.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/pylint-0.25.0-py3.2.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing pylint-0.25.0-py3.2.egg removing '/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg' (and everything under it) creating /home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg Extracting pylint-0.25.0-py3.2.egg to /home/matt/.local/lib/python3.2/site-packages File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_e0001_py30.py", line 12 raise 'exception', 'message' ^ SyntaxError: invalid syntax Sorry: IndentationError: expected an indented block (syntax_error.py, line 2) File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_continue_not_in_loop.py", line 8 continue ^ SyntaxError: 'continue' not properly in loop File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_yield_outside_func.py", line 3 yield 1 ^ SyntaxError: 'yield' outside function File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_keyword_repeat.py", line 8 function_default_arg(two=5, two=7) ^ SyntaxError: keyword argument repeated File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_return_outside_func.py", line 3 return ^ SyntaxError: 'return' outside function File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_w0701_py_30.py", line 12 raise 'exception', 'message' ^ SyntaxError: invalid syntax File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_w0705.py", line 28 __revision__ += 1 ^ SyntaxError: default 'except:' must be last File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_return_yield_mix.py", line 8 yield 2 SyntaxError: 'return' with argument inside generator File "/home/matt/.local/lib/python3.2/site-packages/pylint-0.25.0-py3.2.egg/pylint/test/input/func_syntax_error.py", line 1 def toto ^ SyntaxError: invalid syntax Traceback (most recent call last): File "/usr/lib/python3.2/tokenize.py", line 304, in find_cookie codec = lookup(encoding) LookupError: unknown encoding: IBO-8859-1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "setup.py", line 187, in install() File "setup.py", line 183, in install **kwargs File "/usr/lib/python3.2/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 101, in do_egg_install cmd.run() File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 364, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 584, in easy_install return self.install_item(None, spec, tmpdir, deps, True) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 634, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 788, in install_eggs return [self.install_egg(dist_filename, tmpdir)] File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 862, in install_egg (os.path.basename(egg_path),os.path.dirname(destination))) File "/usr/lib/python3.2/distutils/cmd.py", line 336, in execute util.execute(func, args, msg, dry_run=self.dry_run) File "/usr/lib/python3.2/distutils/util.py", line 393, in execute func(*args) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1168, in unpack_and_compile self.byte_compile(to_compile) File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1184, in byte_compile byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run) File "/usr/lib/python3.2/distutils/util.py", line 547, in byte_compile compile(file, cfile, dfile) File "/usr/lib/python3.2/py_compile.py", line 111, in compile with tokenize.open(file) as f: File "/usr/lib/python3.2/tokenize.py", line 344, in open encoding, lines = detect_encoding(buffer.readline) File "/usr/lib/python3.2/tokenize.py", line 324, in detect_encoding encoding = find_cookie(first) File "/usr/lib/python3.2/tokenize.py", line 307, in find_cookie raise SyntaxError("unknown encoding: " + encoding) SyntaxError: unknown encoding: IBO-8859-1 On 2011/11/07 16:26 - Unknown author wrote : I suspect a non-compatible setuptools behaviour since it tries to compile anyway. Try:: NO_SETUPTOOLS=1 python3.2 setup.py install --no-compile I will update the README.Python3 file On 2011/11/08 04:07 - anacrolix wrote : After installing with `NO_SETUPTOOLS=1 python3.2 setup.py install --no-compile` I get: $ pylint Traceback (most recent call last): File "/home/joiner/.local/bin/pylint", line 3, in from pylint import lint File "/home/joiner/.local/lib/python3.2/site-packages/pylint/lint.py", line 31, in from pylint.checkers import utils File "/home/joiner/.local/lib/python3.2/site-packages/pylint/checkers/__init__.py", line 44, in from logilab.astng.utils import ASTWalker ImportError: No module named logilab.astng.utils > On 2011/11/08 08:46 - Unknown author wrote : > Are you sure to have installed logilab.astng with python3.2 setup.py command ? On 2011/11/08 21:23 - anacrolix wrote : Thanks for the help so far guys. I'll be verifying this when I goto work today. (8am here). On 2011/11/11 03:53 - anacrolix wrote : That fixed the problem. $ NO_SETUPTOOLS=1 python3.2 setup.py install --no-compile $ easy_install-3.2 logilab-common $ easy_install-3.2 logilab-astng Was enough to get it going on Python 3.2. On 2012/08/03 07:30 - anon wrote : This is still an issue in the new pylint version 0.25.2. Not being able to use pip is a _huge_ pain for Python 3 users, is there any chance of getting this fixed? Any way I can help? > On 2012/08/03 10:21 - lothiraldan wrote : > It's already fixed (cf > http://hg-lab.logilab.org/review/pylint/rev/5be0841479b9), it's currently in > review process, it will be in next release hopefully. Version 0.25.2 -------------- :publication date: 2012/07/18 :expected date: n/a Ticket #93591 False positive for W0623 emitted for unpackable exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending pylint will always emit a W0623 for code like this: try: ... except IOError as (a, b): pass The message shown is "W0623: XX: Redefining name 'tuple' from builtins in exception handler" Ticket #89786 E0202, False Positive with properties ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: open First of all, the 'discussion' can be found on [stackoverflow.com](http://stackoverflow.com/questions/9631666/pylint-e0202 -false-positive-or-is-this-piece-of-code-wrong) The following code will reproduce the problem (on python 2.7) with pylint 0.25.1 """example module""" class Example(object): """example class""" @property def aProperty(self): """get""" print "using getter" return self._myPropertyValue @aProperty.setter def aProperty(self, value): """set""" print "using setter" self._myPropertyValue = value def secondPublicMethodToIgnorePylintWarning(self): """dummy""" return self.aProperty def __init__(self): """init""" self._myPropertyValue = None self.aProperty = "ThisStatementWillRaise E0202" anExample = Example() print anExample.aProperty anExample.aProperty = "Second binding" print anExample.aProperty Output: using setter using getter ThisStatementWillRaise E0202 using setter using getter Second binding Pylint says however: E0202: 7,4:Example.aProperty: An attribute affected in test1 line 26 hide this method E0202: 13,4:Example.aProperty: An attribute affected in test1 line 26 hide this method Ticket #92911 emit W0102 when set are used as default value for an argument ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Ticket #87024 epylint: ensure it uses the same python/pylint version ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending see patch provided by Derek Harlant on the mailing-list Ticket #18772 no prototype consistency check for mangled methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending W: 66:MovingObject.__init: Arguments number differs from overridden method A warning like this is obviously wrong, since __init is private, and can never override something. Comments :: On 2012/05/31 20:15 - lothiraldan wrote : Cannot reproduce bug with __init__ but can reproduce with other privates methods (__private__) methods. > On 2012/06/02 17:20 - lothiraldan wrote : > Sorry, I confused __init__ and __init. Please ignore my previous comment. Ticket #89092 @property.setter raises an E0202 when attribute is set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending See the attached python test case. Pylint output for the attached file: ************* Module test E: 12,4:Test.myattr: An attribute affected in test line 21 hide this method E: 17,4:Test.myattr: An attribute affected in test line 21 hide this method Ticket #92584 pylint-gui throws exception ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending pylint-gui throws an exception when running a file or package. Ubuntu bug + patch: https://bugs.launchpad.net/ubuntu/+source/pylint/+bug/989252 Ticket #89838 pypy compatibility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending In pypy, the __builtins__ object is always a module. This is considered to be an implementation detail, and it's generally recommended to only use the 'builtins' object. pylint$ hg diff diff -r c6cbb867a882 checkers/utils.py --- a/checkers/utils.py Thu Feb 23 09:26:58 2012 +0100 +++ b/checkers/utils.py Mon Mar 12 16:07:42 2012 -0700 @@ -96,7 +96,7 @@ """return true if the given node does nothing but 'pass'""" return len(body) == 1 and isinstance(body[0], astng.Pass) -builtins = __builtins__.copy() +builtins = vars(builtins).copy() SPECIAL_BUILTINS = ('__builtins__',) # '__path__', '__file__') def is_builtin(name): # was is_native_builtin In pypy, object.__delattr__ is a member, but has no co_filename. logilab/astng$ hg diff diff -r 0272006bdfbe raw_building.py --- a/raw_building.py Thu Jan 19 17:02:39 2012 +0100 +++ b/raw_building.py Mon Mar 12 15:19:36 2012 -0700 @@ -240,10 +240,14 @@ member = member.im_func if isfunction(member): # verify this is not an imported function - if member.func_code.co_filename != getattr(self._module, '__file__', None): + filename = getattr(member.func_code, 'co_filename', None) + if filename is None: + assert isinstance(member, object) + object_build_methoddescriptor(node, member, name) + elif filename != getattr(self._module, '__file__', None): attach_dummy_node(node, name, member) - continue - object_build_function(node, member, name) + else: + object_build_function(node, member, name) elif isbuiltin(member): if self.imported_member(node, member, name): #if obj is object: Comments :: On 2012/07/13 17:22 - anon wrote : Looking at the attached patches, you've resolved the first part of this issue (builtins) but not the second (object.__delattr__). Please re-open. On 2012/07/13 17:26 - anon wrote : I see that the second part of this ticket was split into another ticket against astng: http://www.logilab.org/versioncontent/99555 Ticket #88218 PYTHONPATH and import directory resolution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Mailing list emails: http://lists.logilab.org/pipermail/python-projects/2012-February/003160.html http://lists.logilab.org/pipermail/python-projects/2012-February/003161.html http://lists.logilab.org/pipermail/python-projects/2012-February/003162.html Comments :: On 2012/02/02 17:48 - jtolds wrote : http://lists.logilab.org/pipermail/python-projects/2012-February/003163.html Ticket #7394 W0212 (access to protected member) not emited on assigments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending Paul `Satoshi' Hachmann : In the following code, the '_secret' protected member of SomeClass is accessed twice; once to set it and another to print it:: class SomeClass(object): def __init__(self): self._secret = 3 obj = SomeClass() obj._secret = 1 # Doesn't catch this! print "I am accessing", obj._secret # Produces W0212, as expected However, the assignment statement by itself doesn't generate a W0212. Comments :: On 2011/09/26 01:50 - anon wrote : I just stumbled upon this problem as well. This is makes W0212 almost useless. Assigning is a lot worse then reading. Ticket #87192 AttributeError: 'Getattr' object has no attribute 'name' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending This error message occurs when I have a decorator that is a part of an imported module. The error occurs when the decorator includes a module in the name it seems. THe error message comes from line 116 in checkers/base.py. I was able to "fix" the system by adding an additional check in the conditional: if (isinstance(decorator, astng.Getattr) and hasattr(decorator.expr, 'name') and decorator.expr.name == node.name): I'm not sure if this is the *right* way to handle it, but it at least lets me keep using PyLint. Comments :: On 2012/03/06 02:45 - anon wrote : Editing checkers/base.py did not fix this error for me. Traceback (most recent call last): File "/Users/geordan/venv/tps/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/lint.py", line 879, in __init__ linter.check(args) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/lint.py", line 502, in check self.check_astng_module(astng, walker, rawcheckers) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/lint.py", line 574, in check_astng_module walker.walk(astng) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk self.walk(child) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk self.walk(child) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/utils.py", line 528, in walk self.walk(child) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/utils.py", line 525, in walk cb(astng) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/checkers/variables.py", line 369, in visit_excepthandler clobbering, args = clobber_in_except(node.name) File "/Users/geordan/venv/tps/lib/python2.7/site-packages/pylint/checkers/utils.py", line 41, in clobber_in_except return (True, (node.attrname, 'object %r' % (node.expr.name,))) AttributeError: 'Getattr' object has no attribute 'name' This is occuring in pylint 25.1. On 2014/04/21 19:40 - remram wrote : Still occurs with pylint 1.2.0 Traceback (most recent call last): File "pylint/__init__.py", line 21, in run_pylint Run(sys.argv[1:]) File "pylint/lint.py", line 1047, in __init__ linter.check(args) File "pylint/lint.py", line 626, in check self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers) File "pylint/lint.py", line 712, in check_astroid_module walker.walk(astroid) File "pylint/utils.py", line 714, in walk self.walk(child) File "pylint/utils.py", line 714, in walk self.walk(child) File "pylint/utils.py", line 714, in walk self.walk(child) File "pylint/utils.py", line 714, in walk self.walk(child) File "pylint/utils.py", line 711, in walk cb(astroid) File "pylint/checkers/base.py", line 708, in visit_callfunc self._check_reversed(node) File "pylint/checkers/base.py", line 789, in _check_reversed node.args[0].func.name == 'iter'): AttributeError: 'Getattr' object has no attribute 'name' Patch I used: --- a/pylint/checkers/base.py +++ a/pylint/checkers/base.py @@ -785,9 +785,10 @@ if argument is None: # nothing was infered # try to see if we have iter() if (isinstance(node.args[0], astroid.CallFunc) and + hasattr(node.args[0].func, 'name') and node.args[0].func.name == 'iter'): func = node.args[0].func.infer().next() if is_builtin_object(func): self.add_message('bad-reversed-sequence', node=node) return > On 2014/04/22 08:07 - sthenault wrote : > could you please submit this issue on the new bitbucket tracker > (https://bitbucket.org/logilab/pylint/issues) including the minimal snippet of > code demonstrating the pb? Ticket #99139 Compability with different python flavours ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending I would really appreciate if pylint could be run from jython or other python flavours, for this several adjustments are necessary, the first two I encountered are: After trying to run pylint from jython I got an errormessage of the following form: Traceback (most recent call last): File "", line 1, in File "jython2.7a2/Lib/site-packages/pylint/lint.py", line 31, in from pylint.checkers import utils File "jython2.7a2/Lib/site-packages/pylint/checkers/__init__.py", line 44, in from logilab.astng.utils import ASTWalker File "jython2.7a2/Lib/site-packages/logilab/astng/__init__.py", line 58, in from logilab.astng.nodes import * File "jython2.7a2/Lib/site-packages/logilab/astng/nodes.py", line 50, in from logilab.astng.scoped_nodes import Module, GenExpr, Lambda, DictComp, \ File "jython2.7a2/Lib/site-packages/logilab/astng/scoped_nodes.py", line 45, in from logilab.astng.manager import ASTNGManager File "jython2.7a2/Lib/site-packages/logilab/astng/manager.py", line 31, in from logilab.common.modutils import NoSourceFile, is_python_source, \ File "jython2.7a2/Lib/site-packages/logilab/common/modutils.py", line 61, in STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version()) File "jython2.7a2/Lib/posixpath.py", line 62, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith' I could overcome this by changing the behaviour of jython, however I have been led to believe that the error comes from somewhere else inside pylint or its libraries: http://bugs.jython.org/issue1937 Furthermore you use __builtins__ in your code, however this is an implementation detail, as stated here: http://bugs.jython.org/issue1938 you should use __builtin__ instead (notice the missing 's'. File "/jython2.7a2/Lib/site-packages/pylint/checkers/utils.py", line 97, in builtins = __builtins__.copy() NameError: name '__builtins__' is not defined I would really appreciate it, if I could use pylint with jython. Comments :: On 2012/07/02 07:25 - malte.vesper wrote : This partly(!) referrs to this: https://www.logilab.org/ticket/89838 On 2012/07/05 18:57 - bpedman wrote : I would also like to have support for Jython On 2012/07/16 08:09 - malte.vesper wrote : Hi, where can I get the latest and greatest version? I just did a checkout with hg and still run into both issues, are the patches not applied once they have been reviewed or have I messed up somewhere (do I need to uninstall teh old version first, apply the patches manually,...?) Thank you for fixing it anyhow, I hope to see the beauty at work once I figure out where I turned wrong. Is there a way arround applying all patches manually? > On 2012/07/17 08:14 - sthenault wrote : > patches have now been applied (there is one remaining in > logilab.common.modutils but that should'nt hurt jython I think), so please > pull and test ! Ticket #77982 False positive: undefined variable error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Hi, the following snippet generates a false E0602: E: 6,11:dummy_function: Undefined variable 'a' # a decorator for testing purposes def f(func): return func @f([dict(a=a) for a in range(10)]) def dummy_function(): pass It seems pylint has problems if a list comprehension is part of a decorator argument. pylint --version returns pylint 0.24.0, astng 0.22.0, common 0.53.0 Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] Ticket #77968 pylint segfault in python2.7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected Hi, I have a regression running on my server. It seems to be that pylint sometimes crash with segfault, lines from kernel: [2174890.428160] pylint[14970]: segfault at 1726 ip 0000000000001726 sp 00007fffb6874078 error 14 in python2.7[400000+22f000] [2182088.527322] pylint[6765]: segfault at 1726 ip 0000000000001726 sp 00007fffc22e0078 error 14 in python2.7[400000+22f000] [2192886.656138] pylint[19194]: segfault at 1726 ip 0000000000001726 sp 00007ffffd4a3618 error 14 in python2.7[400000+22f000] [2196498.676816] pylint[26474]: segfault at 1726 ip 0000000000001726 sp 00007fff7f94a238 error 14 in python2.7[400000+22f000] [2203695.836235] pylint[30542]: segfault at 1726 ip 0000000000001726 sp 00007fffcc8132b8 error 14 in python2.7[400000+22f000] [2250498.828796] pylint[3241]: segfault at 1726 ip 0000000000001726 sp 00007fff5bf4e1d8 error 14 in python2.7[400000+22f000] [2268489.497039] pylint[7537]: segfault at 1726 ip 0000000000001726 sp 00007fff44b27ac8 error 14 in python2.7[400000+22f000] [2286487.703300] pylint[11858]: segfault at 1726 ip 0000000000001726 sp 00007fffdfa0bbb8 error 14 in python2.7[400000+22f000] [2412510.263410] pylint[18904]: segfault at 1726 ip 0000000000001726 sp 00007fff2be66e78 error 14 in python2.7[400000+22f000] [2419691.700643] pylint[30839]: segfault at 1726 ip 0000000000001726 sp 00007fffc7396158 error 14 in python2.7[400000+22f000] [2423297.170814] pylint[2519]: segfault at 1726 ip 0000000000001726 sp 00007fff0b2ba578 error 14 in python2.7[400000+22f000] [2426887.466466] pylint[13754]: segfault at 1726 ip 0000000000001726 sp 00007fff8ef54948 error 14 in python2.7[400000+22f000] [2434091.654815] pylint[26174]: segfault at 1726 ip 0000000000001726 sp 00007fff5f3a7c18 error 14 in python2.7[400000+22f000] [2441291.224112] pylint[6259]: segfault at 1726 ip 0000000000001726 sp 00007fffee77c248 error 14 in python2.7[400000+22f000] [2452091.756240] pylint[21983]: segfault at 1726 ip 0000000000001726 sp 00007fff8cf939f8 error 14 in python2.7[400000+22f000] [2502504.990433] pylint[3256]: segfault at 1726 ip 0000000000001726 sp 00007fff9fbf3598 error 14 in python2.7[400000+22f000] [2506089.616586] pylint[15548]: segfault at 1726 ip 0000000000001726 sp 00007ffff596bdb8 error 14 in python2.7[400000+22f000] [2513288.445542] pylint[31442]: segfault at 1726 ip 0000000000001726 sp 00007fffe13ac328 error 14 in python2.7[400000+22f000] [2520488.875172] pylint[13511]: segfault at 1726 ip 0000000000001726 sp 00007fff6149a768 error 14 in python2.7[400000+22f000] [2527688.535805] pylint[26016]: segfault at 1726 ip 0000000000001726 sp 00007fff200860d8 error 14 in python2.7[400000+22f000] [2599698.059389] pylint[6259]: segfault at 1726 ip 0000000000001726 sp 00007fff984cf1d8 error 14 in python2.7[400000+22f000] [2603295.837572] pylint[18026]: segfault at 1726 ip 0000000000001726 sp 00007fffb5d42838 error 14 in python2.7[400000+22f000] [2610490.455233] pylint[27278]: segfault at 1726 ip 0000000000001726 sp 00007fffca6f0458 error 14 in python2.7[400000+22f000] Unfortunately our limit was 0, so as soon as I see it again I will provide the core file too... Pylint version: # pylint --version pylint 0.23.0, astng 0.21.1, common 0.55.0 Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] Python version: # python --version Python 2.7.1+ Comments :: On 2011/12/15 11:09 - jcristau wrote : sounds like a python bug rather than pylint to me. is this reproducible? Version 0.25.1 -------------- :publication date: 2011/12/08 :expected date: n/a Ticket #81113 W0702 messages are added to the wrong line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending In code like this: x = 1 try: x = 2 except: print 'It failed. (x = {0})'.format(x) W0702 is added to the first line of the except handler, not the line with the except clause. Ticket #82421 enable python3 build for sid distribution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending will provide `pylint3` Ticket #52020 errors when using python 2.6 properties ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Hi, pylint is generating errors when I am using property decorators (python >= 2.6). Here is an example: E: 50:Cement.psd: method already defined line 41 E: 48:Cement.psd: Method 'psd' has no 'setter' member E: 48:Cement.psd: Method 'psd' has no 'setter' member and the way setter is defined is using the @psd.setter decorator. The bad thing is that I went down from 9.22 to 0.57 switching to these decorators :-( Cheers Ticket #50461 Support new @property as in Python 2.6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending It would be helpful if the following would be understood by pylint without issuing warnings: From http://docs.python.org/library/functions.html:: class C(object): def __init__(self): self._x = None @property def x(self): """I'm the 'x' property.""" return self._x @x.setter def x(self, value): self._x = value @x.deleter def x(self): del self._x Comments :: On 2012/01/12 09:20 - anon wrote : class C(object): def __init__(self): self._x = None @property def x(self): """I'm the 'x' property.""" return self._x @x.setter @dummyDecorator def x(self, value): self._x = value @x.deleter @anotherDummyDecorator def x(self): del self._x If you use a decorator ( Like @dummyDecorator or @anotherDummyDecorator ) between the function name and the properties decorator, the warnings are reissued. > On 2012/01/19 16:39 - sthenault wrote : > please file a ticket for this pb Ticket #51222 using @foo.setter causes E1101 & E0102 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending I noticed pylint doesn't handle well the case of:: @property def foo(self): return self._bar.foo @foo.setter def foo(self, foo_val): self._bar.foo = foo_val Though it's a perfectly valid case syntax since python2.6 It says I defined foo twice, and doesn't understand the ".setter" syntax (Gives E1101 & E0102). Comments :: On 2010/11/23 07:28 - Unknown author wrote : http://stackoverflow.com/questions/3980038/pylint-bug-e1101-e0102-upon-use-of-property-foo-setter/4253707 Version 0.25.0 -------------- :publication date: 2011/10/07 :expected date: n/a Ticket #76920 crash if on eg "pylint --rcfile" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending ie on option that are handled by preprocess_options Ticket #74747 crash occurs when lookup up a special attribute in class scope ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: validation pending eg access to __doc__ during class construction Ticket #74742 make allowed name for first argument of class method configurable ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: validation pending Ticket #74745 make "too general" exception names configurable ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: validation pending Ticket #74087 TypeError: '_Yes' object does not support indexing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Pylint fails on a simple code that imports pyasn1:: $ cat pylinttest.py #!/usr/bin/python from pyasn1.codec.der import decoder :: $ pylint pylinttest ************* Module pylinttest C: 1,0: Missing docstring Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/share/python2.7/site-packages/pylint/lint.py", line 863, in __init__ File "/usr/share/python2.7/site-packages/pylint/lint.py", line 496, in check File "/usr/share/python2.7/site-packages/pylint/lint.py", line 568, in check_astng_module File "/usr/share/python2.7/site-packages/pylint/utils.py", line 528, in walk File "/usr/share/python2.7/site-packages/pylint/utils.py", line 525, in walk File "/usr/share/python2.7/site-packages/pylint/checkers/variables.py", line 465, in visit_from File "/usr/share/python2.7/site-packages/pylint/checkers/variables.py", line 485, in _check_module_attrs TypeError: '_Yes' object does not support indexing Comments :: On 2011/09/03 17:25 - Jajcus wrote : Working patch (probably workaround rather than solution):: diff -dur pylint-0.24.0.orig/checkers/variables.py pylint-0.24.0/checkers/variables.py --- pylint-0.24.0.orig/checkers/variables.py 2011-07-18 16:42:45.000000000 +0200 +++ pylint-0.24.0/checkers/variables.py 2011-09-03 19:09:07.000000000 +0200 @@ -488,6 +488,8 @@ return None except astng.InferenceError: return None + except TypeError: + return None if module_names: # FIXME: other message if name is not the latest part of # module_names ? On 2011/09/07 07:35 - sthenault wrote : don't reproduce with :: pylint 0.24.0, astng 0.22.0, common 0.56.1 Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) whatether pyasn1 is installed or not. Ticket #77237 warning for E0202 may be very misleading ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending eg when the attribute is set by some client code, not in a parent class, we get :: An attribute inherited from Connection hide this method while something like :: An attribute affected in cubicweb.dbapi line 591 hide this method would be much better in general. Ticket #73941 HTML report messages table is badly rendered ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending The last table in HTML report is rendered badly. Headers don't fit contents and *message* text is displayed as the first field of next table row, *col_offset* is missing. For example it may look like (table with 2 messages): +---------------------------+--------+----------+----------+------------+ |type | module | object | line | col_offset | +===========================+========+==========+==========+============+ |message |E | mymodule | myobject | 14 | +---------------------------+--------+----------+----------+------------+ |Undefined variable 'myvar' |C | othermod | otherobj | 12 | +---------------------------+--------+----------+----------+------------+ |Missing docstring | | | | | +---------------------------+--------+----------+----------+------------+ Version 0.24.0 -------------- :publication date: 2011/07/20 :expected date: n/a Ticket #70495 absolute imports fail depending on module path ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending [0] vostro:~/tmp$ pylint src/s3ql/argparse.py ************* Module argparse C0111: 1: Missing docstring W0406: 3: Module import itself W0611: 3: Unused import argparse [20] vostro:~/tmp$ (cd src; pylint s3ql/argparse.py) ************* Module s3ql.argparse C0111: 1: Missing docstring W0611: 3: Unused import argparse [20] vostro:~/tmp$ cat src/s3ql/argparse.py from __future__ import division, print_function, absolute_import import argparse [0] vostro:~/tmp$ cat src/s3ql/__init__.py __all__ = [ 'argparse '] [0] vostro:~/tmp$ pylint --version pylint 0.21.1, astng 0.20.1, common 0.51.1 Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] [0] vostro:~/tmp$ Comments :: On 2011/07/08 08:36 - Jajcus wrote : A simple patch to logilab-astng fixes that: http://www.logilab.org/ticket/70565 On 2011/07/08 09:23 - Jajcus wrote : The 'variables' checker in Pylint relied on the broken behaviour, so, after patching logilab-astng, a patch to Pylint is also needed:: diff -dur pylint-0.23.0.orig/checkers/variables.py pylint-0.23.0/checkers/variables.py --- pylint-0.23.0.orig/checkers/variables.py 2011-01-11 15:55:06.000000000 +0100 +++ pylint-0.23.0/checkers/variables.py 2011-07-08 11:03:13.000000000 +0200 @@ -455,7 +455,8 @@ """check modules attribute accesses""" name_parts = node.modname.split('.') try: - module = node.root().import_module(name_parts[0]) + level = getattr(node, 'level', None) + module = node.root().import_module(name_parts[0], level = level) except ASTNGBuildingException: return except Exception, exc: Ticket #69993 Additional string format checks for logging module. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending Check for missing arguments, too many arguments, or invalid string formats in the logging checker module. E.g. detect the following violations: logging.info('%s%', '') logging.info('%s%s', '') logging.info('%s%a', '', '') logging.info('%s%s', '', '', '') Comments :: On 2011/06/28 12:42 - dca wrote : Some additional information: * checkers/logging.py has been extended with additional checks. These checks are only performed if the logging statement is called without star args or kwargs. The additional checks are: too few arguments, too many arguments, invalid format token in format string, or incomplete format token in format string. * This code uses part of the string_format checker. I didn't like importing one checker from another checker, so I moved the common code into checkers/util.py. Please let me know if you'd prefer this another way. * This patch also includes a number of tests. Please let me know if you need additional test cases added. Thanks! > On 2011/06/28 12:49 - sthenault wrote : > all this sounds great. I'll take a look at it asap. On 2011/07/08 00:02 - dca wrote : Thanks! Just a reminder, the initial patch is incompatible with Python 2.5, please use the second patch attached. Ticket #68057 built-in checkers should use "low" base message ids, reserve some for "local use" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending * Most of the pylint checkers have base message ids (i.e. 02 in E0213) in the low end of the range of possible two-digit base ids, 01-11. The exceptions to this are logging (65) and string_format (99). If possible, these should be renumbered to 12 and 13. (I realize it's arguably too late to rename them without breaking configuration etc.) * A "reserved range" of base ids should be defined for local use without fear of conflicts with future checkers included with pylint. The "high numbers" (e.g 70 through 99) would be an obvious such choice, although this presumes string_format is renamed. I suppose 70-98 would be acceptable if string_format is not renamed. * The reserved range should be documented, and the list in checkers/__init__.py should be updated. Comments :: On 2011/06/06 10:46 - sthenault wrote : message ids are of the form [category (one letter)][checker id (two digits)][message id (two digits)] So the idea was that pylint reserves itself low checker ids (let's say 01 to 30), leaving other to custom checker. Isn't this enough ? On 2011/06/06 20:25 - dfindlay wrote : Yes, but built in checker "string_format" has checker id 99 and "logging" has checker id 65. > On 2011/06/07 05:55 - sthenault wrote : > ha ok. Those checker have been contributed and I hadn't checked their id when > they had been integrated. Let's fix them. Ticket #69738 generated-members need dynamic member name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending In django model instance, many member property are dynamically created base on some condition. such as [many to many relationship](https://docs.djangoproject.com/en/dev/topics/db/models/#extra- fields-on-many-to-many-relationships): If you don't specify a related_name attribute for a field in an abstract base class, the default reverse name will be the name of the child class followed by '_set', just as it normally would be if you'd declared the field directly on the child class. For example, in the above code, if the related_name attribute was omitted, the reverse name for the m2m field would be childa_set in the ChildA case and childb_set for the ChildB field. This cause pylint to report invalid errors, a solution was [proposed here](http://stackoverflow.com/questions/115977/using-pylint-with-django) is to add regular expression based generated-members: [TYPECHECK] generated-members=REQUEST,acl_users,aq_parent,objects,_meta,id,[a-zA-Z]+_set with something like: # somewhere top of the file header in typecheck.py import re # and in visit_getattr() for pattern in self.config.generated_members: if re.match(pattern, node.attrname): return Ticket #37397 glibc detected *** /usr/bin/python: corrupted double-linked list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected For some input files, pylint 0.21.1 hangs with the message Your code has been rated at 7.33/10 (previous run: 7.33/10) *** glibc detected *** /usr/bin/python: corrupted double-linked list: 0x09f064d8 *** Comments :: On 2010/08/01 16:35 - Nikratio wrote : I couldn't find a way to attach a sampel script to this issue, so I put it on http://www.rath.org/pylint_crasher.py > On 2010/08/02 06:52 - Unknown author wrote : > The sample script (by far not minimal) imports matplotlib, which in turn > imports numpy. I'm therefore marking this ticket a duplicate of 23009 On 2010/08/01 20:24 - mkiilerich wrote : A duplicate of http://www.logilab.org/ticket/23009 / http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581058 / http://projects.scipy.org/numpy/ticket/1462 ? Ticket #69220 please add column offset to the reports ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending using the astng patch: http://www.logilab.org/ticket/69217?vid=primary&_cwmsgid=091770639ada4996a455c48aa1eb70b3 please add column offsets to the reports generated by pylint. Comments :: On 2012/01/16 15:18 - anon wrote : Could you add column offset to the "-f parseable" report as well? > On 2012/08/29 13:09 - sthenault wrote : > imo we should not, as this parseable format is what is expected by default by > editor such as emacs, and I don't think they support this extra information Ticket #22273 pylint --ignore option cannot be used multiple times ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending The --ignore option help says it can be used multiple times. Currently only the last option will be used: for example, with "pylint --ignore=tests --ignore=migrations" the tests module will not be ignored. pylint 0.19.0, astng 0.19.3, common 0.49.0 Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] Comments :: On 2010/10/21 20:58 - anon wrote : +1 one for fixing this. Help text is not helpful when it's wrong. Ticket #70493 pylint's --ignore option does not work as documented ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending launchpad Bug 793909 Public bug reported: Binary package hint: pylint The documentation for pylint (man page, --help output) claims that the --ignore option can be used multiple times. This is not so. Only the last --ignore option is used. ProblemType: Bug DistroRelease: Ubuntu 10.04 Package: pylint 0.19.0-1 ProcVersionSignature: Ubuntu 2.6.32-32.62-generic 2.6.32.38+drm33.16 Uname: Linux 2.6.32-32-generic x86_64 Architecture: amd64 Date: Tue Jun 7 10:11:49 2011 InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1) PackageArchitecture: all ProcEnviron: LANGUAGE=en_US:en PATH=(custom, user) SHELL=/bin/zsh SourcePackage: pylint ** Affects: pylint (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug lucid Ticket #69950 Tests failing due to 'column offset' changes in 744 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Automated tests are failing due to changes in changeset 744. E.g. http://www.logilab.org/testexecution/69382 Shows up as ValueError: too many values to unpack. Ticket #23009 corrupted double-linked list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected Just updated to pylint 0.20.0, not i get the following at the end of the report. *** glibc detected *** /opt/python/python-2.6.2/bin/python: corrupted double-linked list: 0x0000000016a87330 *** not sure if this is the falut of pylint ot python Comments :: On 2010/04/21 14:53 - anon wrote : I'm also seeing this with pylint 0.20 (logilab-common 0.49, logilab-astng 0.20) and python 2.5. On 2010/04/22 09:24 - anon wrote : I've found a short test case. Running "pylint test.py" where test.py contains just "import numpy" triggers the bug. On 2010/04/22 12:39 - anon wrote : I've now also found a way to trigger this my mimicking the way pylint imports numpy.core.umath: import sys; sys.path.insert(0, "/usr/lib/python2.6/dist-packages/numpy/core") import umath Ctrl-D On 2010/04/22 12:49 - anon wrote : I also have a work around -- a custom pylint checker module that just imports numpy in its register() function. On 2010/04/24 22:26 - anon wrote : A bug was filed with numpy about this (http://projects.scipy.org/numpy/ticket/1462) but the bug was closed as wontfix and I think I agree with numpy that the solution is for pylint to import modules in a more sane way. On 2010/04/26 08:18 - anon wrote : Probably fixed in Numpy r8364. On 2010/09/20 16:55 - anon wrote : yes it's fixed with Numpy r8364, preparing an upload for Debian (targetting squeeze) Ticket #60828 Imports within functions lead to reimport warning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Running pylint 0.23.0 on a module where a function imports a module, leads to a 'Reimport' warning. An example of such a module: def reimport(): """Test reimport""" import os pylint reacts with the following warning: W: 3:reimport: Reimport 'os' (imported line 1). Comments :: On 2011/05/31 15:42 - anonymoose wrote : So, is there any chance this warning will become a first class citizen and get its own dedicated warning id instead of getting lumped into W0404? Without getting into a debate about the legitimacy of this functionality there are a number of users who are (understandably) confused by this warning initially. It also can't be globally disabled without disabling the standard reimport issue. I kind of understand why the designers decided to lump this warning into the reimport warning, but I wouldn't say it's obvious at first glance. It would be more proper just to get its own ID. Any chance this might see the light of day in the near future? Reference discussion: http://comments.gmane.org/gmane.comp.python.logilab/877 > On 2011/06/01 08:04 - sthenault wrote : > this is a *bug* that should be fixed. Only the time to work on it is missing > on my side. Ticket #4778 install multiple pylint executable for each available python version ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: rejected see debian bug description Comments :: On 2010/11/15 18:01 - sthenault wrote : huum, that still seems a desirable feature to me... > On 2010/11/15 18:08 - Unknown author wrote : > We have now two flavours of pylint but you can change of python version by > invoking as followѕ: > > $ pylint # use shebang /usr/bin/python $ python2.6 /usr/bin/pylint > $ python2.7 /usr/bin/pylint $ pylint3 # use shebang > /usr/bin/python3 $ python3.1 /usr/bin/pylint3 $ python3.2 > /usr/bin/pylint3 Version 0.23.0 -------------- :publication date: 2011/01/13 :expected date: n/a Ticket #52761 py3k / performance : disable unneeded messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved At least the warnings W0122 W0331 W0332 W0333 should be disabled for python3. Also, since the deprecated modules have been removed, the list of deprecated modules should be addapted. Ticket #52023 spurious W0221, W0222 with *args, **kwargs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved W0221 and W0222 report cases when the argument list between a method and its parent have a differing number of elements; however, it has no exception for cases where varargs and/or kwargs are in use. This causes a method as follows: class MyClass(SuperClass): def impl(*args, **kwargs): # ...do stuff here... super(MyClass, self).impl(*args, **kwargs) # ...do stuff here... to potentially throw such a warning. In my local branch of pylint, I have the following patch applied: changeset: 712:da7205e3e376 tag: tip user: Charles Duffy date: Wed Dec 08 10:53:59 2010 -0600 summary: avoid W0221 or W0222 when *args and **kwargs are in use diff -r 5a1dea9de7b2 -r da7205e3e376 checkers/classes.py --- a/checkers/classes.py Wed Dec 08 10:38:22 2010 +0100 +++ b/checkers/classes.py Wed Dec 08 10:53:59 2010 -0600 @@ -493,6 +493,9 @@ # don't care about functions with unknown argument (builtins) if method1.args.args is None or refmethod.args.args is None: return + # if we use *args, **kwargs, skip the below checks + if method1.args.vararg and method1.args.kwarg: + return if len(method1.args.args) != len(refmethod.args.args): self.add_message('W0221', args=class_type, node=method1) elif len(method1.args.defaults) < len(refmethod.args.defaults): Ticket #51251 fix packaging of test directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved Test files should be excluded from standard build to be able to use standard disutils import of py3k:: try: # python3 from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # python2.x from distutils.command.build_py import build_py ... Maybe using `data_files` or `include_dirs` ? And check automatic build by `lgp build -d py3k`. We have to use a specific find command to avoid the test directory to be translated:: find . ! -path "*/test/*py" -name "*py" -exec 2to3-3.1 -wn {} \; Ticket #50464 handle new str/bytes paradigma ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 4.000 :state: resolved Different modifications have to be done in file manipulation, pickle, std io, etc. Also, we have to see how we handle the situation for the similar checker. Ticket #22584 Missing manpages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Hello, there are some executables provided into the pylint package with a missing manpage (and you know how In Debian we love manpages :) ). They are: * epylint * pylint-gui * symilar Additionally: $ /usr/bin/epylint --help Usage: pylint [options] module_or_package (epyling -> pyling) and $ symilar finds copy pasted blocks in a set of files Usage: similar [-d|--duplicates min_duplicated_lines] [--ignore-comments] file1... (symilar -> similar) are kinda confusing and worth clarifying. Thanks, Sandro Comments :: On 2010/12/07 18:07 - eanclin wrote : also, epylint, pylint-gui and symilar should be mentionned in package info Ticket #22701 performance ; no improvement when disabling messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 3.000 :state: resolved When disabling some message categories, we get no performance improvement:: $ time pylint 1> /dev/null pylint/ No config file found, using default configuration real 0m10.443s user 0m9.861s sys 0m0.320s $ time pylint --disable-msg-cat=R,C,W,E pylint/ real 0m10.547s user 0m10.013s sys 0m0.280s However, the suggested 'quick run' (checking only for errors and important warnings) should be faster than the regular run. Would it be a solution to have all checkers store informations about which visit_ method triggers possibly which message? Comments :: On 2010/04/20 06:00 - sthenault wrote : the messages control refactoring of pylint allows that. We still have to split existing checkers as partially done for the basic checker in pylint's default branch. Ticket #50465 python3 : fix all tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 5.000 :state: resolved fix all tests Ticket #6404 real user name in $ pylint --generate-man ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved while generating the documentation with make:: pylint/doc $ make the real user name occurs in man/pylint.1 this could be seen as a bug of:: $ pylint --generate-man or of the doc/makefile Comments :: On 2009/11/23 19:18 - sthenault wrote : and as such a logilab.common bug Ticket #57311 Remove mentions of optik ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved Optik is no longer needed since pylint doesn't support < 2.4. But there are still mentions of it in the README/manual etc. Ticket #51228 script shortcuts on Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved When installing PyLint 0.22.0 via "python setup.py install" on Windows, upon completion, PyLint will have placed the proper pylint.bat and pylint-gui.bat files inside the Python*\Scripts\ path, but not the proper 'pylint' and 'pylint-gui' scripts that do the heavy lifting, resulting in failures. Comments :: On 2010/12/07 23:15 - adrpw wrote : I had this problem as well. More information: it occurs with pylint 0.22.0, and does NOT occur with pylint 0.21.4. I encountered the problem with Python 2.6.2/Windows Vista and Python 2.6.4/Windows XP. I installed pylint using "python setup.py install", once over an older version and once as a fresh install on a different machine. Error from console: C:\Python26\Scripts>pylint-gui.bat python: can't open file 'C:\Python26\Scripts\pylint-gui': [Errno 2] No such file or directory Contents of pylint-gui.bat: @echo off rem Use python to execute the python script having the same name as this batch rem file, but without any extension, located in the same directory as this rem batch file python "%~dpn0" %* Ticket #20062 suspicious error about missing attribute "next" in generator object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved while running pylint on mercurial, the following false positive was found:: ************* Module mercurial.ancestor ... E1101: 68:ancestor: Generator 'generations' has no 'next' member ... http://hg.intevation.org/mercurial/file/e7727a545c48/mercurial/ancestor.py#l66 Comments :: On 2010/05/29 00:16 - mkiilerich wrote : Simple reproducer, distilled from http://svn.effbot.org/public/stuff/sandbox/topdown/tdop-1.py : def gen(): yield 7 print gen().next() Ticket #9542 unrecognized ancestor in two files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved For the creation of the class diagram (-c option), Pyreverse doesn't recognize an ancestor of a class, the ancestor being in another module like in the following situation:: $ rgrep class temp/ temp/module1.py:2:class AbstractClass(object): temp/module2.py:3:class MyClass(AbstractClass): Ticket #52022 warning not triggered when it should ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: resolved :: a = 42 def foo(): return 42 a == foo() I'd expect pylint to also warn in this case:: W: 5: Statement seems to have no effect Comments :: On 2010/12/09 09:20 - eanclin wrote : well, function calls usually have side effects; so do you expect pylint to recognize that some function has no side effect? I would suggest that we add a new warning:: W : Expression "a == foo()" is not assigned to anything It would be easy to implement and would also occur if the function call has indeed an effect. > On 2010/12/09 09:33 - acampeas wrote : > indeed and +1 Ticket #19426 bad first impression... fix it! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved See thread starting at http://lists.logilab.org/pipermail/python-projects/2009-July/001960.html Ticket #19645 support python3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved Being able to run pylint with Python 3 is going to be a must have. Investigate 2to3.py and cross version compatibility practices in order not to have too widely different code base. Comments :: On 2010/08/16 08:57 - sthenault wrote : http://wiki.python.org/moin/PortingPythonToPy3 On 2010/08/20 19:41 - anon wrote : Dan Stromberg, strombrg at gmail dot com: A wiki page about this port has been created at http://wiki.python.org/moin/PyLint-3k Version 0.22.0 -------------- python 3k release :publication date: 2010/11/15 :expected date: n/a Ticket #50463 tarball and debian and packaging for python3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 5.000 :state: resolved generate tarball and debian and packages for python3 (also for lgc and astng) Comments :: On 2010/11/26 11:43 - Unknown author wrote : I'm not sure to understand the ticket clearly.. but if you want both source distribution archives for python2 and python3, I'm pretty sure we don't need that. The source tarball should be kept python2 only. Some reasons: - python2 is the only one based on scm - python3 flavour is *built* on the fly which guarantee compatibility and our chosen approach («Maintain a Python 2 base and use 2to3 to generate Python 3 code» ¹) - python3 users can still run `python3 setup.py build` (humm, yes in case of pylint it's not possible right away due to particular test files but we provide an INSTALL.Python3 file for manual steps) So, my conclusion: If we have different source distributions, we have different projects. If you want different flavours, change the cooking only (aka building steps) ¹ http://wiki.python.org/moin/PortingPythonToPy3k > On 2010/11/26 15:48 - Unknown author wrote : > this raises a question, though. Is it possible to use the source tarball we > distribute on a machine with only python3 installed? Ticket #57615 AttributeError: 'Raise' object has no attribute 'type' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved pylint crashes always with: /usr/lib/python2.6/site-packages/pylint/checkers/similar.py:194: DeprecationWarning: enumerate exists in builtins since py2.3 for line_no, line in enumerate(self._stripped_lines): /usr/lib/python2.6/site-packages/pylint/checkers/variables.py:308: DeprecationWarning: enumerate exists in builtins since py2.3 for i, stmt in enumerate(astmts[1:]): /usr/lib/python2.6/site-packages/pylint/checkers/exceptions.py:135: DeprecationWarning: enumerate exists in builtins since py2.3 for index, handler in enumerate(node.handlers): Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 858, in __init__ linter.check(args) File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 490, in check self.check_astng_module(astng, walker, rawcheckers) File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 565, in check_astng_module walker.walk(astng) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 513, in walk cb(astng) File "/usr/lib/python2.6/site-packages/pylint/checkers/exceptions.py", line 82, in visit_raise if node.type is None: AttributeError: 'Raise' object has no attribute 'type' Versions: python-logilab-astng-0.21.0-16.1 python-logilab-common-0.52.1-22.1 python-pylint-0.21.2-10.1 Build available here: https://build.opensuse.org/project/monitor?project=home%3Afrispete%3APyQt Comments :: On 2011/01/07 16:47 - sthenault wrote : this issue had been fixed in pylint 0.22 > On 2011/01/07 18:46 - frispete wrote : > Unfortunately 0.22.0 is blocked by the issue, I wrote you by mail today . Do > you wish me to add another ticket of it? If yes, for which project? > > Upps, just noticed, I forgot to press the send button.. The issue is in your > inbox now. Version 0.21.4 -------------- :publication date: 2010/10/27 :expected date: n/a Ticket #46772 absolute imports fail depending on module path ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: not validated [0] vostro:~/tmp$ pylint src/s3ql/argparse.py ************* Module argparse C0111: 1: Missing docstring W0406: 3: Module import itself W0611: 3: Unused import argparse [20] vostro:~/tmp$ (cd src; pylint s3ql/argparse.py) ************* Module s3ql.argparse C0111: 1: Missing docstring W0611: 3: Unused import argparse [20] vostro:~/tmp$ cat src/s3ql/argparse.py from __future__ import division, print_function, absolute_import import argparse [0] vostro:~/tmp$ cat src/s3ql/__init__.py __all__ = [ 'argparse '] [0] vostro:~/tmp$ pylint --version pylint 0.21.1, astng 0.20.1, common 0.51.1 Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] [0] vostro:~/tmp$ Comments :: On 2011/06/09 08:46 - Jajcus wrote : pylint-0.23.0, logilab-astng-0.21.1 and the problem is still there: $ ls -l package/ total 16 -rw-r--r-- 1 jajcus users 32 Jun 9 10:41 __init__.py -rw-r--r-- 1 jajcus users 106 Jun 9 10:40 __init__.pyc -rw-r--r-- 1 jajcus users 115 Jun 9 10:41 sys.py -rw-r--r-- 1 jajcus users 276 Jun 9 10:40 sys.pyc $ cat package/sys.py """Pylint Ticket #46772 test.""" from __future__ import absolute_import import sys print >> sys.stdout, "Works" $ python -c 'import package.sys' Works $ pylint package | head ************* Module package.sys W: 5: Module import itself E: 7: Module 'package.sys' has no 'stdout' member Report ====== 4 statements analysed. $ python --version Python 2.7.1 This error gives lots of false messages from Pylint when a module extensively is used in other package's sub-module with the same name. Ticket #47885 automatically generated 'pylintfeatures' is bugged ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved The doc generated at http://www.logilab.org/card/pylintfeatures has an unreadable "Contents". The difference between the sections and subsection is not strong enough. Moreover, the hierarchy between the sections seems to be inversed : The sections after http://www.logilab.org/card/pylintfeatures#id37 are subsections of the "Variables checker", and not "Variables checker" being a subsection of "Messages" http://www.logilab.org/card/pylintfeatures#id36 Ticket #46137 disable-report options do not work anymore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved In previous pylint version it was possible to disable unecessary reports by IDs either in command line or in rcfile with the _disable-report_ option. for example : pylint --disable-report=R0701 mymodule witch disable the raw metrics report but display the other reports Apparently this option have been removed and replaced by the main _disable_ option. But this _disable_ option did not recognise the reports IDs like : R0701,R0101,R0401,R0001,R0003 and made pylint to die with this exception : pylint.utils.UnknownMessage: No such message id R0701 Alternaly this documentation is no more up to date --> http://www.logilab.org/card/pylintfeatures As it include old removed options like **disable-msg** or **disable-report**. It will be usefull to either give back the **disable-report** option or to add the report IDs to the main **disable** option (but be carreful with R0801 ID as it serve for a message and a report) Comments :: On 2010/09/23 14:50 - sthenault wrote : documentation should clearly be updated. Now, it doesn't work because in the process report ids have also been renamed to avoid conflicts with message in the Refactoring category, so their suffix is now RP instead of R. On 2010/09/23 15:15 - miniwark wrote : Yes i just see that with the --full-documentation option, it's the case for all reports except R0801 witch have the same number than duplication messages. Anyway you can probably close the bug, as is now mainly an online documentation problem. > On 2010/09/23 15:51 - sthenault wrote : > I'll keep it until the online doc is up-to-date Ticket #3855 emacs keybindings in pylint.el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved pylint.el binds [f1], [f2] and [f3] in the python mode map, without asking. It should not. I personally feel that pylint.el should not bind any keys at all. If you feel pylint.el really must bind keys, I would draw your attention to the recommendations of the Emacs Lisp manual, such as The key sequences bound in a minor mode should consist of `C-c' followed by one of `.,/?`'"[]\|~!#$%^&*()-_+='. (The other punctuation characters are reserved for major modes.) Also note that next-error is (apparently) already bound to C-x ` in all buffers. I strongly feel that mode-local bindings for next-error and/or previous-error are also quite silly. Finally, I advise you to use EVAL-AFTER-LOAD (and DEFINE-KEY) instead of a hook, since the forms in python.el really only need to be evaluated once per emacs process, not every time the user opens a Python file. Comments :: On 2009/09/02 06:24 - anon wrote : I've recently committed a patch to give pylint a more sensible set of key-bindings and it's been merged into trunk as r480 by Adrien. In the patch I chose to bind pylint, next-error and previous-error to a C-c m prefix to mimic ropemacs. The bindings are local to the python-mode-map. I chose to still supply default bindings because the C-x ` and M-g p make are on 2 different end of the keyboards with no relation to each other whatsoever. Supplying a local binding makes sense for people who don't use other modes as often as python-mode and so are not used to the default key-bindings for next and previous error. Since this is bound locally to the mode key-map, the global key-bindings are not disturbed and you can still use them if you want. Ticket #19799 "pylint -blah" exit with status 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved while "pylint --help" states: >> Output status code: >> Pylint should leave with following status code: >> * 0 if everything went fine >> * 1 if some fatal message issued >> * 2 if some error message issued >> * 4 if some warning message issued >> * 8 if some refactor message issued >> * 16 if some convention message issued >> * 32 on usage error >> status 1 to 16 will be bit-ORed so you can know which different >> categories has been issued by analysing pylint output status code derek. : Currently bad options such as --blah will be being handled by optparse and thats probably the one responsible for returning the value 2 at the moment. Ticket #37641 pylint: crashes on modules importing icu: NameError: name 'BreakIterator' is not defined ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected Hello, I'm forwarding the Debian bug 591676 $ echo 'import icu' > test.py $ pylint test.py No config file found, using default configuration ************* Module test C: 1: Missing docstring Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 856, in __init__ linter.check(args) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 488, in check self.check_astng_module(astng, walker, rawcheckers) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 563, in check_astng_module walker.walk(astng) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 513, in walk cb(astng) File "/usr/lib/pymodules/python2.6/pylint/checkers/imports.py", line 224, in visit_import importedmodnode = self.get_imported_module(modnode, node, name) File "/usr/lib/pymodules/python2.6/pylint/checkers/imports.py", line 260, in get_imported_module return importnode.do_import_module(modname) File "/usr/lib/pymodules/python2.6/logilab/astng/mixins.py", line 147, in do_import_module return mymodule.import_module(modname, level=level) File "/usr/lib/pymodules/python2.6/logilab/astng/scoped_nodes.py", line 355, in import_module return MANAGER.astng_from_module_name(absmodname) File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 183, in astng_from_module_name return self.astng_from_file(filepath, modname, fallback=False) File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 140, in astng_from_file return ASTNGBuilder(self).file_build(filepath, modname) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 135, in file_build node = self.string_build(data, modname, path) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 145, in string_build return self.ast_build(parse(data + '\n'), modname, path) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 158, in ast_build newnode = self.rebuilder.build(node, modname, node_file) File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 112, in build self._add_from_names_to_locals(from_node, delayed=True) File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 211, in _add_from_names_to_locals imported = node.root().import_module(node.modname) File "/usr/lib/pymodules/python2.6/logilab/astng/scoped_nodes.py", line 355, in import_module return MANAGER.astng_from_module_name(absmodname) File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 183, in astng_from_module_name return self.astng_from_file(filepath, modname, fallback=False) FNameError: name 'BreakIterator' is not definedile "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 140, in astng_from_file return ASTNGBuilder(self).file_build(filepath, modname) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 135, in file_build node = self.string_build(data, modname, path) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 145, in string_build return self.ast_build(parse(data + '\n'), modname, path) File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 158, in ast_build newnode = self.rebuilder.build(node, modname, node_file) File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 112, in build self._add_from_names_to_locals(from_node, delayed=True) File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 211, in _add_from_names_to_locals imported = node.root().import_module(node.modname) File "/usr/lib/pymodules/python2.6/logilab/astng/scoped_nodes.py", line 355, in import_module return MANAGER.astng_from_module_name(absmodname) File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 176, in astng_from_module_name module = load_module_from_name(modname) File "/usr/lib/pymodules/python2.6/logilab/common/modutils.py", line 113, in load_module_from_name return load_module_from_modpath(dotted_name.split('.'), path, use_sys) File "/usr/lib/pymodules/python2.6/logilab/common/modutils.py", line 153, in load_module_from_modpath module = load_module(curname, mp_file, mp_filename, mp_desc) File "/usr/lib/pymodules/python2.6/icu.py", line 37, in from docs import * File "/usr/lib/pymodules/python2.6/docs.py", line 27, in _install__doc__(BreakIterator, ''' NameError: name 'BreakIterator' is not defined Comments :: On 2010/08/16 10:31 - sthenault wrote : weird... IMO the first thing to understand is why pylint try to *import* the icu module instead of building its ast from sources. Python sources file are available, right ? Also, is `BreakIterator` actually defined in the docs module ? > On 2010/10/21 12:17 - eanclin wrote : > when building the tree for icu, astng discovers the "from _icu import * " in > docs.py . since _icu is a binary module, astng tries to import the module for > building from "living object". BreakIterator is only defined, if we import > *icu* or *docs*. If we import *_icu* directly, we get:: > > >>> from _icu import * > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/pymodules/python2.6/icu.py", line 37, in > from docs import * > File "/usr/lib/pymodules/python2.6/docs.py", line 27, in > _install__doc__(BreakIterator, ''' > NameError: name 'BreakIterator' is not defined > > I don't know what we should do here ... On 2010/09/25 13:07 - anon wrote : yes, sources files are there, along with the pyc files: {{{ $ ls /usr/lib/pymodules/python2.6/icu.py* -l lrwxrwxrwx 1 root root 26 Sep 25 15:04 /usr/lib/pymodules/python2.6/icu.py -> /usr/share/pyshared/icu.py -rw-r--r-- 1 root root 906 Sep 25 15:04 /usr/lib/pymodules/python2.6/icu.pyc }}} for BreakIterator, yes, it's there. Ticket #48066 pylint crashes when redirecting output containing non-ascii characters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved I'm forwarding http://bugs.debian.org/598482 $ cat test.py #-*-coding:iso-8859-1-*- class test: def __init__ (self,dir) : testString = u"répertoire :\n%s !"%dir $ pylint -f parseable test.py > test.txt No config file found, using default configuration Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 856, in __init__ linter.check(args) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 488, in check self.check_astng_module(astng, walker, rawcheckers) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 563, in check_astng_module walker.walk(astng) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 516, in walk self.walk(child) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 513, in walk cb(astng) File "/usr/lib/pymodules/python2.6/pylint/checkers/format.py", line 317, in visit_default self.add_message(msg_def[0], node=node, args=msg_def[1]) File "/usr/lib/pymodules/python2.6/pylint/checkers/__init__.py", line 92, in add_message self.linter.add_message(msg_id, line, node, args) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 274, in add_message self.reporter.add_message(msgid, (path, module, obj, line or 1), msg) File "/usr/lib/pymodules/python2.6/pylint/reporters/text.py", line 97, in add_message self.writeln(self.line_format % locals()) File "/usr/lib/pymodules/python2.6/pylint/reporters/__init__.py", line 55, in writeln print >> self.out, string UnicodeEncodeError: 'ascii' codec can't encode characters in position 86-87: ordinal not in range(128) when I remove encoding specification at the beginning of the file, the problem vanishes but I get PyLint error relative to PEP263 (non ascii characters and no encoding specification). Comments :: On 2010/10/15 20:11 - anon wrote : I wrote a patch to fix this bug: diff -ruN pylint.orig/reporters/__init__.py pylint/reporters/__init__.py --- pylint.orig/reporters/__init__.py 2010-10-16 00:56:28.000000000 +0600 +++ pylint/reporters/__init__.py 2010-10-16 01:02:50.000000000 +0600 @@ -16,7 +16,7 @@ http://www.logilab.fr/ -- mailto:contact@logilab.fr """ -import sys +import sys, codecs, locale CMPS = ['=', '-', '+'] @@ -42,17 +42,24 @@ self.include_ids = None self.section = 0 self.out = None + self.out_encoding = None self.set_output(output) def set_output(self, output=None): """set output stream""" if output is None: output = sys.stdout + self.out_encoding = (output.encoding or + locale.getdefaultlocale()[1] or + sys.getdefaultencoding()) + if output.encoding is None: + output = codecs.getwriter(self.out_encoding)(output) self.out = output def writeln(self, string=''): """write a line in the output buffer""" - print >> self.out, string + print >> self.out, (string if isinstance(string, unicode) else + string.decode(self.out_encoding, 'replace')) def display_results(self, layout): """display results encapsulated in the layout tree""" On 2010/10/15 20:13 - anon wrote : I wrote a patch to fix this bug:: diff -ruN pylint.orig/reporters/__init__.py pylint/reporters/__init__.py --- pylint.orig/reporters/__init__.py 2010-10-16 00:56:28.000000000 +0600 +++ pylint/reporters/__init__.py 2010-10-16 01:02:50.000000000 +0600 @@ -16,7 +16,7 @@ http://www.logilab.fr/ -- mailto:contact@logilab.fr """ -import sys +import sys, codecs, locale CMPS = ['=', '-', '+'] @@ -42,17 +42,24 @@ self.include_ids = None self.section = 0 self.out = None + self.out_encoding = None self.set_output(output) def set_output(self, output=None): """set output stream""" if output is None: output = sys.stdout + self.out_encoding = (output.encoding or + locale.getdefaultlocale()[1] or + sys.getdefaultencoding()) + if output.encoding is None: + output = codecs.getwriter(self.out_encoding)(output) self.out = output def writeln(self, string=''): """write a line in the output buffer""" - print >> self.out, string + print >> self.out, (string if isinstance(string, unicode) else + string.decode(self.out_encoding, 'replace')) def display_results(self, layout): """display results encapsulated in the layout tree""" On 2010/10/16 12:52 - anon wrote : Here is another version or the unicode-output.patch:: diff -ruN pylint.orig/reporters/__init__.py pylint/reporters/__init__.py --- pylint.orig/reporters/__init__.py 2010-10-16 00:56:28.000000000 +0600 +++ pylint/reporters/__init__.py 2010-10-16 18:45:01.000000000 +0600 @@ -16,7 +16,7 @@ http://www.logilab.fr/ -- mailto:contact@logilab.fr """ -import sys +import sys, locale CMPS = ['=', '-', '+'] @@ -42,17 +42,20 @@ self.include_ids = None self.section = 0 self.out = None + self.out_encoding = None self.set_output(output) def set_output(self, output=None): """set output stream""" - if output is None: - output = sys.stdout - self.out = output + self.out = output or sys.stdout + self.out_encoding = (self.out.encoding or + locale.getdefaultlocale()[1] or + sys.getdefaultencoding()) def writeln(self, string=''): """write a line in the output buffer""" - print >> self.out, string + print >> self.out, (isinstance(string, unicode) and + string.encode(self.out_encoding) or string) def display_results(self, layout): """display results encapsulated in the layout tree""" Ticket #9868 pylint crash on erratic colons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected crash report (from twitter), hence short...:: I had an unclosed quote then a bad colon a few lines down. inference.py, line 328, no relative_name on mymodule Comments :: On 2009/08/04 16:32 - anon wrote : Here's the traceback I had. I will try to reproduce this again and post a code sample. Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 901, in __init__ linter.check(args) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 492, in check self.check_astng_module(astng, checkers) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 602, in check_astng_module if implements(checker, IASTNGChecker)]) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 619, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 619, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.5/site-packages/pylint/lint.py", line 616, in astng_events checker.visit(astng) File "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 84, in visit method(node) File "/usr/lib/python2.5/site-packages/pylint/checkers/variables.py", line 359, in visit_import module = node.infer_name_module(parts[0]).next() File "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 45, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 344, in infer_import yield _imported_module_astng(self, name) File "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 328, in _imported_module_astng if mymodule.relative_name(modname) == mymodule.name: AttributeError: Import instance has no attribute 'relative_name' make: *** [out/debug/__init__.py] Error 1 > On 2009/08/04 16:35 - anon wrote : > Trying to get something more readable... > > Traceback (most recent call last): File "/usr/bin/pylint", line 4, in > lint.Run(sys.argv[1:]) File "/usr/lib/python2.5/site-packages/pylint/lint.py", > line 901, in __init__ linter.check(args) File > "/usr/lib/python2.5/site-packages/pylint/lint.py", line 492, in check > self.check_astng_module(astng, checkers) File > "/usr/lib/python2.5/site-packages/pylint/lint.py", line 602, in > check_astng_module if implements(checker, IASTNGChecker)]) File > "/usr/lib/python2.5/site-packages/pylint/lint.py", line 619, in astng_events > self.astng_events(child, checkers, _reversed_checkers) File > "/usr/lib/python2.5/site-packages/pylint/lint.py", line 619, in astng_events > self.astng_events(child, checkers, _reversed_checkers) File > "/usr/lib/python2.5/site-packages/pylint/lint.py", line 616, in astng_events > checker.visit(astng) File > "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 84, in visit > method(node) File > "/usr/lib/python2.5/site-packages/pylint/checkers/variables.py", line 359, in > visit_import module = node.infer_name_module(parts[0]).next() File > "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 45, in > wrapped for res in _func(node, context, **kwargs): File > "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 344, in > infer_import yield _imported_module_astng(self, name) File > "/usr/lib/python2.5/site-packages/logilab/astng/inference.py", line 328, in > _imported_module_astng if mymodule.relative_name(modname) == mymodule.name: > AttributeError: Import instance has no attribute 'relative_name' make: *** > [out/debug/__init__.py] Error 1 > On 2009/08/04 17:03 - anon wrote : remember to notify http://twitter.com/bwahacker when this is fixed. On 2010/10/21 10:24 - eanclin wrote : seems to be very ancient pylint / astng versions : we have nowhere "relative_name' nor '_imported_module_astng' in astng. Ticket #3259 "pylint --disable-all --enable-msg=XYZ file.py" doesn't work as expected ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved in this case, only the XYZ message should be enabled but that doesnt' work Comments :: On 2007/06/08 12:00 - Unknown author wrote : has this been solved by removing --disable-all? > On 2007/06/08 13:53 - Unknown author wrote : > I am not able to obtain the required behaviour: > > Using inline hints always result in all file being ignored, I cannot use > --disable-all on the command line, and disable-all inline primes over > --enable-msg. > > I'm reopening this bug. On 2009/01/28 11:12 - sthenault wrote : disable-all has been designed to be a local option (eg given inside module code) to ignore a full module in a project, which explain the current behaviour. That should be fixed though by having a smarter implementation (actually disabling all messages, not using a simple flag). Ticket #37148 Pyreverse fails on twisted.internet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved pyreverse --ignore=test -o png twisted.internet ... Traceback (most recent call last): File "/usr/bin/pyreverse", line 4, in main.Run(sys.argv[1:]) File "/usr/lib/python2.6/site-packages/pylint/pyreverse/main.py", line 120, in __init__ PyreverseCommand(args) File "/usr/lib/python2.6/site-packages/pylint/pyreverse/main.py", line 99, in __init__ self.run(args) File "/usr/lib/python2.6/site-packages/pylint/pyreverse/main.py", line 109, in run diadefs = handler.get_diadefs(project, linker) File "/usr/lib/python2.6/site-packages/pylint/pyreverse/diadefslib.py", line 225, in get_diadefs diagrams = DefaultDiadefGenerator(linker, self).visit(project) File "/usr/lib/python2.6/site-packages/logilab/astng/utils.py", line 337, in visit self.visit(local_node) File "/usr/lib/python2.6/site-packages/logilab/astng/utils.py", line 331, in visit methods[0](node) File "/usr/lib/python2.6/site-packages/pylint/pyreverse/diadefslib.py", line 158, in visit_module self.linker.visit(node) File "/usr/lib/python2.6/site-packages/logilab/astng/utils.py", line 337, in visit self.visit(local_node) File "/usr/lib/python2.6/site-packages/logilab/astng/utils.py", line 331, in visit methods[0](node) File "/usr/lib/python2.6/site-packages/logilab/astng/inspector.py", line 179, in visit_assname already_infered = frame.locals_type[node.name] AttributeError: 'Function' object has no attribute 'locals_type' Comments :: On 2010/10/18 13:59 - eanclin wrote : Can't reproduce the problem on py 2.5 right now. Either it is closed, or it depends on py 2.6. Version 0.21.3 -------------- :publication date: 2010/09/28 :expected date: n/a Ticket #46845 restore 2.3 compat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved Version 0.21.2 -------------- :publication date: 2010/08/26 :expected date: n/a Ticket #37640 KeyError: 'RP0401' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved Hello, I'm forwarding here the Debian bug 591670 $ apt-cache policy python-docutils | grep Installed Installed: 0.7-2 $ pylint docutils [snip - large amounts of junk] ************* Module docutils.parsers.rst.languages.de C: 19: Invalid name "directives" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$) W: 72: String statement has no effect C: 74: Invalid name "roles" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$) W: 96: String statement has no effect R:157:Translator: Abstract class not referenced R:123:LaTeXTranslator: Abstract class not referenced R:838:LaTeXTranslator: Abstract class not referenced R: 14:Parser: Abstract class is only referenced 1 times R: 89:_ElementInterfaceWrapper: Interface not implemented Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 856, in __init__ linter.check(args) File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 494, in check checker.close() File "/usr/lib/pymodules/python2.6/pylint/checkers/imports.py", line 218, in close self.add_message('RP0401', args=' -> '.join(cycle)) File "/usr/lib/pymodules/python2.6/pylint/checkers/__init__.py", line 92, in add_message self.linter.add_message(msg_id, line, node, args) File "/usr/lib/pymodules/python2.6/pylint/utils.py", line 262, in add_message msg = self._messages[msgid].msg KeyError: 'RP0401' Comments :: On 2010/09/24 21:52 - anon wrote : Hello, why this ticket was reopened? the message suggests the fix it being removed from future release, is that correct? if so, why? > On 2010/09/27 09:22 - sthenault wrote : > sorry, this ticket should not have been reopened. Ticket #28796 regression in --generated-members in pylint 0.20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: open \--generated-members is ignored in 0.20, this was fully working before in 0.19. How to reproduce: ttest.py: a = "a" a.id Then run pylint 0.20 with: # pylint --generated-members="id" ttest pylint reports errors about id now, while it shouldn't. When this is run with 0.19, id is ignored. Comments :: On 2010/08/18 01:10 - anon wrote : The fix is really easy: change line 126 of checkers/typecheck.py, line 126 from: node.attrname in self.generated_members to: node.attrname in self.config.generated_members The problem is that self.generated_members is set in the __init__, which is called before the config is loaded. Ticket #36193 Import Checker Bug - RP0401 should be R0401 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved Looking at the history of this file (checkers/import.py) it appears that this was just an oversight when updating code for the RP0401 report. The patch pasted below and linked in pastie as well, will correct this problem. If these conditions are detected in the code, then exceptions are raised from pylint instead of reporting them because of this bug. http://pastie.org/1024551 diff -r df8f34aa3dd2 checkers/imports.py --- a/checkers/imports.py Mon Jun 07 13:05:40 2010 +0200 +++ b/checkers/imports.py Tue Jun 29 23:28:43 2010 -0500 @@ -213,9 +213,9 @@ def close(self): """called before visiting project (i.e set of modules)""" # don't try to compute cycles if the associated message is disabled - if self.linter.is_message_enabled('RP0401'): + if self.linter.is_message_enabled('R0401'): for cycle in get_cycles(self.import_graph): - self.add_message('RP0401', args=' -> '.join(cycle)) + self.add_message('R0401', args=' -> '.join(cycle)) def visit_import(self, node): """triggered when an import statement is seen""" Ticket #33640 pylint manpage outdated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Hello, i'm here forwarding some bug reports about pylint manpage being outdated regarding new options organization recently introduced. From a users perspective, it would be really nice to have the manpage updated soon: given the multitude of pylint options, manpage is ofter used to look them up. >> The options shown on the man page don't match the code at all: e.g. the man page has an option "--enable-checker" which the command rejects; the man page has "-e" where the command actually has "-E" and so on. << >> man pylint references options --disable-msg, --enable-msg, --disable-checker and --enable-checker which no longer work (replaced by --enable and --disable) % pylint --disable-msg=W0312 *.py Usage: pylint [options] module_or_package Check that a module satisfy a coding standard (and more !). pylint --help Display this help message and exit. pylint --help-msg [,] Display help messages about given message identifiers and exit. pylint: error: no such option: --disable-msg << Regards, Sandro Comments :: On 2010/06/11 22:36 - stosi wrote : I think we can close it, as of release 0.21.1 Version 0.21.1 -------------- :publication date: 2010/06/07 :expected date: n/a Ticket #28962 pylint crash with new options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Using the new options generates a crash:: $ pylint --disable=I,R,C var/logilab/astng/builder.py [...] Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/home/emile/var/pylint/lint.py", line 856, in __init__ linter.check(args) File "/home/emile/var/pylint/lint.py", line 494, in check checker.close() File "/home/emile/var/pylint/lint.py", line 585, in close self.make_reports(self.stats, old_stats) File "/home/emile/var/pylint/utils.py", line 401, in make_reports r_cb(report_sect, stats, old_stats) File "/home/emile/var/pylint/checkers/base.py", line 79, in report_by_type_stats documented = total - stats['undocumented_'+node_type] KeyError: 'undocumented_module' Also, it crashes when using "-d IRC" or "--disable=IRC" Comments :: On 2010/05/11 16:18 - acampeas wrote : I do not reproduce your crash. Version 0.21.0 -------------- :publication date: 2010/05/11 :expected date: n/a Ticket #21591 html reporter produces no output if reports is set to 'no' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved When the option for full reports is turned off (either using the -r no command line option, or by setting reports=no in .pylintrc), and the output mode is set to html, pylint produces no output at all (whereas, it should list just the messages). This isn't the case for any of the other output modes (text, parseable, colorized), which behave as expected. Comments :: On 2010/03/04 08:01 - sthenault wrote : duh? When html is turned on, output goes to html files. Do you mean you don't have output files when report is set to no ? > On 2010/03/04 20:22 - cmorris wrote : > I should point out, for the sake of anyone reading, that this is not the case. > The default behaviour when pylint is run with the -f html option is to output > html to stdout. If you want it to go to a file, you have to redirect the > output, or have files_output set to "yes". But when -f html -r no is set, the > reporter does absolutely nothing (no output to stdout, no files created). > > The crux of the problem seems to be that make_reports does quite different > things for a text reporter vs. an html reporter. With a text reporter, > make_reports is only responsible for the actual reports (showing the various > statistics), and the messages are immediately sent to stdout when they're > added with add_message. With an HTML reporter, ALL of the reporting is done by > make_reports (including the messages), so if reports are turned off, then no > output will be produced, which is obviously not the desired behaviour. Ticket #4683 Non-ASCII characters count double if utf8 encode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Lubin Fayolle reported :: # -*- coding: utf-8 -*- """A little script to demonstrate a little bug.""" print "------------------------------------------------------------------------" print "-----------------------------------------------------------------------é" Pylint returns the following warning:: myscript.py:6: [C] Line too long (81/80) where line 6 corresponds to the second call of print. The two lines are the same length though... It seems that 'é' counts double, like many (any?) other non-ASCII characters. Comments :: On 2010/03/03 19:31 - cmorris wrote : It seems like the solution here would be to cast to unicode before calling len. However, to do that, we need to know the encoding of the module. From what I've read, it doesn't seem to be possible to do this in general with total accuracy, but it seems like we could catch the majority of cases by using utf8, since it seems to be the most commonly used unicode encoding, and is backwards-compatible with ASCII. To catch other encodings, the best solution I can think of would be to have a command line option/field in .pylintrc to specify an encoding. Does this seem worthwhile? > On 2010/03/04 08:00 - sthenault wrote : > you should use the encoding declaration that is mandatory for non-ascii > modules > in earlier python versions (iirc, warning introduced in python 2.3 / crash > with > python 2.4). There are already some code in pylint to detect this encoding. On 2010/03/29 14:05 - svetlyak40wt wrote : I've solved this annoing problem. Here is the patch: http://gist.github.com/347854 > On 2010/03/29 14:57 - sthenault wrote : > would you please add a test case to the functional suite ? > > see test/input and test/messages or search ml archives for more details Ticket #20067 AttributeError: 'NoneType' object has no attribute 'name' with with ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved def foo(self): with file('x'): bar.baz bar = 7 gives AttributeError: 'NoneType' object has no attribute 'name' pylint-0.19.0-1.fc12.noarch python-logilab-astng-0.19.3-1.fc12.noarch https://bugzilla.redhat.com/show_bug.cgi?id=558943 Comments :: On 2010/04/15 13:38 - mkiilerich wrote : Problem still there with pylint-0.20.0-1.fc12.noarch python-logilab-astng-0.20.0-1.fc12.noarch Ticket #22976 C0321 check failing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved I updated to the latest version of pylint and now a lot of my code is getting the C0321 message. I'm not sure why. Here is a small part of the code:: if entry[1] != 'QW': if code_list.has_key(entry[0]): code_list[entry[0]][0] = float(entry[14].strip(',').strip('$')) else: code_list[entry[0]] = [float(entry[14].strip(',').strip('$')), '', 0] pylint gives me the C0321 message for every line in this block except for the 'else:' line. Comments :: On 2010/04/21 17:16 - davebyrne wrote : I believe this ticket can be closed. After applying the fix that was used for astng issue #22973, I no longer have the issue. Ticket #4595 Comma not followed by a space should not occurs on trailing comma in list/tuple/dict definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved :: C: 51:ExportFile.__init__: Comma not followed by a space self.server = self.parameters.get('serveur', ['localhost',]) Ticket #9992 -e cannot be overriden by --enable-msg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved So I have a set of Python files with quite a lot of warnings which will take quite some time to fix. So for now I'd like to have make call pylint to report only errors and the warning W0611. The obvious way to do so would be: pylint -e --enable-msg=W0611 ... But that does not work. In fact it turns our that once a warning has been disabled through -e, --disable-msg-cat or --disable-msg, it cannot be reenabled, no matter what order the options are in. The disable directives always have priority. So as is --enable-msg is completely useless and it's not possible to enable a specific message. Ticket #4581 option to NOT get a Missing docstring (C0111) warning if a method is overridden ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Olaf requesting this, arguing: :: Two reasons for this request: Epydoc automatically inherits the docstring when generating API documentation, and to reduce our code maintenance (avoid copy/paste of docstrings). Ticket #22585 [Patch] fix man warnings for pyreverse.1 manpage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Hello, here below a patch to fix the following errors in the pyreverse.1 manpage: * hyphen-used-as-minus-sign * (pyreverse.1.gz, line 58) warning: numeric expression expected (got `a') --- ../../tmp/pylint-0.20.0/man/pyreverse.1 2009-11-25 11:01:43.000000000 +0100 +++ pylint-0.20.0/man/pyreverse.1 2010-03-28 11:29:39.390544723 +0200 @@ -16,27 +16,27 @@ With different options, you can have fine tuning on what and how modules, classes and attributes will be shown in the diagram. You can combine several modules in one project (except with -.B -c +.B \-c ). -If no -c and no --diadefs option specified, +If no \-c and no \-\-diadefs option specified, .B pyreverse will create - - a diagram 'classes_' for the classes in and + \- a diagram 'classes_' for the classes in and ( if there is more than one module in ) - - a diagram 'packages_' for the package dependencies in + \- a diagram 'packages_' for the package dependencies in -With -c , +With \-c , .B pyreverse creates a diagram for that with filename .. -You can do -c , -c . +You can do \-c , \-c . .SH OPTIONS .IP "-h, --help" show this help message and exit .IP "-p, --project=" -set project name to if not using -c option. (default:'No Name') +set project name to if not using \-c option. (default:'No Name') .IP "-i, --ignore=" add (may be a directory) to the black list (not parsed) .IP "-f, --filter-mode=" @@ -53,28 +53,28 @@ create a class diagram with all classes related to [current: none] the class must be in the file . By default, this will include all ancestors and associated classes of and include module names -(i.e. '-ASmy' ). +(i.e. '\-ASmy' ). -.IP -a , --show-ancestors= +.IP "-a , --show-ancestors=" show generations of ancestor classes not in -.IP -A, --all-ancestors=[yn] +.IP "-A, --all-ancestors=[yn]" show all ancestors off all classes in [current: none] -.IP -s , --show-associated= +.IP "-s , --show-associated=" show associated classes. =1 will only take classes directly related to the classes in the project, while =2 will also take all classes related to those fetched by=1. -.IP -S, --all-associated=[yn] +.IP "-S, --all-associated=[yn]" show recursively all associated off all associated classes [current: none] -.IP "-b, --builtin" +.IP "-b, --builtin" include builtin objects in representation of classes [current: False] -.IP "-m [yn], --module-names=[yn]" +.IP "-m [yn], --module-names=[yn]" include module name in representation of classes. This will include full module path in the class name. [current: none] -.IP "-k, --only-classnames" +.IP "-k, --only-classnames" don't show attributes and methods in the class boxes; -this disables -f values [current: False] +this disables \-f values [current: False] .IP "-o , --output=" create a *. output file if format available. Available formats @@ -87,19 +87,19 @@ .IP "pyreverse -a1 -s1 -m" --a1 -s1 will include one level of ancestor and associated classes in the -diagram of the modules, while -m will show the full module +\-a1 \-s1 will include one level of ancestor and associated classes in the +diagram of the modules, while \-m will show the full module path of each class. You can use the same way the .B -a, -s, -A, -S options. Note that on class diagrams (using .B -c -) -a and -s will rather reduce than enlarge your diagram. +) \-a and \-s will rather reduce than enlarge your diagram. .IP "pyreverse mod/foo.py mod/fee.py -k" This is interesting if the diagram for =mod is too complicated: -you can show only the class names (no attributes or methods, option -k); +you can show only the class names (no attributes or methods, option \-k); or take only the modules you are interested in (here fee.py and foo.py). .SH REQUIRES (if it will be mangled I can send via email, contact me at morph-@-debian.org where to send). Regards, Sandro Ticket #22962 possibility to disable message categories with full name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved As reported by Red Hat bug https://bugzilla.redhat.com/show_bug.cgi?id=500272 , some people type full name of message categories like:: pylint --disable-msg-cat=warning,refactor,convention However, doing this yields :: raise Exception('Unknown category identifier %s' % catid) Exception: Unknown category identifier A It would be nice to make it possible to type the full message category name. Ticket #9787 proposition for simple pylint --help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved The '--help' message should be a simple summarize of all options, ideally not much than for example "grep --help". I suggest something like:: -r ... -i ... -e ... -w shortcut for "-f colorized -rn --disable-msg-cat=RC" --zope ... --list-msgs Show list of message ids (and not Generate pylint's full documentation.) --generate-rcfile Messages control: -c, --enable-checker= -C, --disable-checker= -k, --enable-msg-cat= -K, --disable-msg-cat= -m, --enable-msg= -M, --disable-msg= and maybe a few more. And a message saying "see manpage for a lot of other interesting options". (The short cuts in the section "Message control" are suggestions, too. Comments :: On 2009/07/21 09:10 - Unknown author wrote : I think the "long help" is worth keeping. A standard way of doing this is having -h / --help giving a short help, and -H / --option-help give the whole thing (and having this explained by the short help message). Ticket #23549 pyreverse / inspector : store also class attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved The inspector should store class attributes in the right way so that pyreverse sees them as associated members of a class. Ticket #9774 some thoughts for simplifying the user interface ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved Some remarks for simplifying/improving pylint's user interface: imho, pylint should * have a much shorter message on the '-h, --help' options, around 20 / 30 lines (the biggest part should be in the manpage) * disable similarities checking by default for code of a given size * maybe it would even be better not to produce a report by default (the important things are the messages, not the stats). Comments :: On 2009/10/21 12:01 - sthenault wrote : mads comment on the mailing-list about options... In my opinion one important aspect of usability is "conceptual complexity". The names of these filtering options introduce the concept "message category". It is not obvious to me what that is, and thus I tend to ignore these options when I browse the list of options. And intuitively I think that when the option names are long then they must be for some advanced and seldom used functionality. I wanted to check the help text where the user can find this option. The help text was so long and structured in a way which wasn't obvious to me as user that I gave up finding it with eye-grep. I ended up piping it through less, and fortunately I knew what to search for ... I suggest that the default help text only contains commonly used and important options - and especially not options for tweaking individual "checks". I suggest that all the enable/disable options are merged to one enable/disable option which can control anything. I think it will be obvious from the parameter value what should be enabled/disabled. Ticket #9018 when using defining-attr-method, method order matters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Consider this simple class: .. sourcecode:: python class C: def __init__(self): self.x = 0 self.reset() def set_y(self, y): self.y = y def set_x(self, x): self.x = x def reset(self): self.x = 0 self.y = 0 If you run pylint over it like so:: pylint --defining-attr-methods=__init__,reset resetwhen.py it complains:: resetwhen.py:9: [W, C.set_y] Attribute 'y' defined outside __init__ If, however, you reorganize it slightly so that reset() occurs before set_y, pylint is happy. I can understand why this error is emitted. Pylint sees the definition of self.y in set_y before it encounters reset and thus emits the error message. It seems to me that giving a bunch of attributes initial values is generally of secondary importance to a class's functionality. It should be ok to push such methods to the end of the file. I think pylint should collect the location of attribute initialization as it runs and only report on attributes which are not ever assigned in the methods specified by defining-attr-methods, ignoring when they are encountered. Version 0.20.0 -------------- :publication date: 2010/03/24 :expected date: n/a Ticket #9791 have simple message (ids) listing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Currently we have the option --list-msgs Generate pylint's full documentation. However, usually, we just want to find the message Id to disable it. It would be nice to have one line per message Id for this option (and rename the full documentation say '--full-documentation'. Ticket #5975 Abstract intermediate class not recognized as such ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved skip wrote... given :: class A(object): def methA(self): raise NotImplementedError("implement methA in subclass") class B(A): def methB(self): raise NotImplementedError("implement methB in subclass") class C(B): def methA(self): print "methA" def methB(self): print "methB" pylint (v 0.14.0, astng 0.17.2, common 0.28.2) complains that B doesn't provide a definition of methA even though it is itself both a base class for other classes and defines an unimplemented methB class (both making it a candidate abstract class). Seems that pylint should recognize on one count or both that B doesn't need to provide a definition for methA. Ticket #18947 checker for function arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved See http://lists.logilab.org/pipermail/python-projects/2009-November/002090.html Ticket #20991 class scope definitions ignored in a genexpr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved When visiting the genexpr in the following code:: class MyClass: """ds""" var1 = [] var2 = list(value*2 for value in var1) Pylint ignores the class scope definition. Ticket #9263 no W0613 for __init__ (method does not use all of its arguments) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Maarteen reported: pylint issues message W0613 if a method does not use all of its arguments. However, if a constructor does not use all of its arguments, no message is issued. Comments :: On 2010/02/28 16:42 - nchauvat wrote : see http://lists.logilab.org/pipermail/python-projects/2010-February/002264.html Ticket #5564 Parameters with leading "_" shouldn't count as "local" variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved skip wrote: Frequently, an external callback mechanism will dictate a fixed set of parameters, some of which some callback functions won't need. To avoid pylint warnings about unused variables, the usual technique used is to prefix such args with an underscore, e.g.:: def callback(_a, _b, c, _d): print c If your callback function is fairly complex it might well use several local variables to hold intermediate computations. In this stupid example, pylint complains (among other things) about having too many local variables:: def cb(a, b, c, d, e, f, _g, _h, _i, _j): k = a ** 2 l = b ** 3 m = c ** 4 n = d ** 5 o = e ** 6 p = f ** 7 If _g, _h, _i and _j are eliminated from consideration as "local variables" this function only has 12 locals, not 16. From a cognitive standpoint, by using the "_" prefix that is exactly what I have declared. "These are not important to me. I am ignoring them and you, the reader (or pylint), should ignore them as well." I can do this:: def callback(_a, _b, c, _d): return _callback(c) def _callback(c): print c but that seems inelegant, to say the least. In addition, if some of those local variables are used to avoid repeating the same complex or expensive calculation, adding an extra (expensive) function call to work around pylint seems just plain wrong. syt note: we should add a regexp to match variables we don't want to count. Ticket #18279 pylint crash ~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved I have the following traceback:: Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 884, in __init__ linter.check(args) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 501, in check self.check_astng_module(astng, checkers) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 578, in check_astng_module if implements(checker, IASTNGChecker)]) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 595, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 595, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 592, in astng_events checker.visit(astng) File "/usr/lib/pymodules/python2.5/logilab/astng/utils.py", line 320, in visit method(node) File "/usr/lib/pymodules/python2.5/pylint/checkers/variables.py", line 327, in visit_name assert stmt.fromlineno, (stmt, node, node.fromlineno) AssertionError: (<_ast.ClassDef object at 0x8e84310>, <_ast.Name object at 0x8adef90>, None) with this configuration: pylint 0.18.1, astng 0.19.1, common 0.45.0 Python 2.5.2 (r252:60911, Jan 4 2009, 21:59:32) Maybe it is linked to the fact that pylint parse several times the same submodule of the package Comments :: On 2009/11/24 10:47 - sthenault wrote : can't fix without information about how to reproduce this pb. > On 2009/12/14 12:07 - nchauvat wrote : > steph says "try pylint cassis". Ticket #19339 pylint.el : non existing py-mod-map ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved This has been bugged me for a while, I don't feel like using the other python-mode and everytime I enter a python file it bugs me about that non-existent py-mode-map. I have attached a patch which should make it works for both mode:: --- pylint-0.18.1/elisp/pylint.el.chmou 2009-12-10 14:20:03.574983993 +0000 +++ pylint-0.18.1/elisp/pylint.el 2009-12-10 14:25:00.826238694 +0000 @@ -34,25 +34,28 @@ ;; (local-set-key [f1] 'pylint) ;; (local-set-key [f2] 'previous-error) ;; (local-set-key [f3] 'next-error) + (let ((map)) + (if(boundp 'py-mode-map) + (setq map py-mode-map) + (setq map python-mode-map) + (define-key + map + [menu-bar Python pylint-separator] + '("--" . pylint-seperator)) - (define-key - py-mode-map - [menu-bar Python pylint-separator] - '("--" . pylint-seperator)) - - (define-key - py-mode-map - [menu-bar Python next-error] - '("Next error" . next-error)) - (define-key - py-mode-map - [menu-bar Python prev-error] - '("Previous error" . previous-error)) - (define-key - py-mode-map - [menu-bar Python lint] - '("Pylint" . pylint)) - + (define-key + map + [menu-bar Python next-error] + '("Next error" . next-error)) + (define-key + map + [menu-bar Python prev-error] + '("Previous error" . previous-error)) + (define-key + map + [menu-bar Python lint] + '("Pylint" . pylint)) + )) ) (add-hook 'python-mode-hook 'pylint-python-hook) Ticket #20904 return in try body is swallowed by return in finally clause ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved If you include a return statement in the finally clause of a try...finally bloc and there also is one in the try body, the return in the try body is swallowed. In fact, When return passes control out of a try statement with a finally clause, that finally clause is executed before really leaving the function. Maybe this could become a new pylint rule? Ticket #9982 specific message for NotImplemented exception ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Skip reported: Pylint complains (properly) when you try to do raise NotImplemented but the complaint is very generic - it complains that you are raising an object which isn't a subclass of Exception. Because Python has two very similarly named builtin objects which really have little to do with one another: NotImplemented and NotImplementedError, I think it might be a good idea to produce a more specific error message in this case: NotImplemented raised - should raise NotImplementedError Ticket #21026 type inference error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved much probably an astng error. From: Jürgen Hermann OK, here's a strange mixup... (intermediary fix: change "i.startswith" to "str(i).startswith") :: $ pylint -rn bad.py No config file found, using default configuration ************* Module bad ... C: 3:bad: Invalid name "s" (should match [a-z_][a-z0-9_]{2,30}$) E: 3:bad: Instance of 'set' has no 'startswith' member $ python bad.py set(['barfoo']) $ cat bad.py def bad(): s = set(["barfoo", "foobar"]) s -= set(i for i in s if i.startswith("foo")) print s if __name__ == "__main__": bad() $ pylint --version pylint 0.18.1, astng 0.19.3, common 0.47.0 Python 2.5.4 (r254:67916, Jan 20 2010, 21:44:03) Comments :: On 2010/03/01 08:42 - eanclin wrote : This bug does not appear anymore with current pylint and astng (stable and rebuild) state. Ticket #9776 warning if return or break inside a finally ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved If you include a return or break statement inside the finally clause of a try... finally block then exceptions raised in the try clause are silently swallowed instead of being re-raised. This seems like a bad thing (tm) and it would be useful if pylint could warn about this. Ticket #18860 warn on assert( a, b ?) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved James Lingard reported: A bug I have encountered several times in Python code is writing: .. sourcecode:: python assert( x, "x should have been True" ) rather than: .. sourcecode:: python assert x, "x should have been True" It would be great if pylint could catch this error. note that python2.6 already emits a warning:: >>> def f(x): ... assert( x, "x should have been True" ) ... :2: SyntaxWarning: assertion is always true, perhaps remove parentheses? Ticket #5977 yield != return ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved skip wrote... Pylint seems to treat yield statements as if they were returns. They definitely seem to be counted the same and the error message emitted with too many yields even calls them "returns": :: yieldex.py:1: [R, yield_ex] Too many return statements (10/6) Here's a trivial example cobbled together from an actual (slightly more complex) functio which generates a Python function from a higher level input: :: def yield_ex(s): if s: yield " line 1: %s\n" % s yield " line 2\n" yield " line 3\n" yield " line 4\n" yield " line 5\n" else: yield " line 6\n" yield " line 7\n" yield " line 8\n" yield " line 9\n" yield " line 10\n" I found it convenient to yield each line of the generated function. The code is hardly more complex than the above though there are some parameter substitutions on several lines. Having just two yield statements would have made it less obvious which values were being substituted where. (Though I will admit I could have used dict format expansion.) At any rate, I don't think yield statements should be counted the same way returns are. Comments :: On 2008/09/12 10:18 - nchauvat wrote : see also Maarten's comments in the same thread. On 2009/01/18 01:14 - mkiilerich wrote : "Maarten's comment" must be http://lists.logilab.org/pipermail/python-projects/2008-September/001516.html Ticket #5561 check function calls arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved Check if the number of arguments required are equal to number of arguments of the callee Comments :: On 2008/12/11 12:54 - eanclin wrote : Check also unexpected keyword arguments like in:: def xxx(aaa): """ This function has no parm bbb """ return aaa + 1 print xxx(aaa = 3, bbb = 4) On 2009/03/11 15:24 - eanclin wrote : This will / should also handle the case with class instantiation:: class MyClass: """Example""" def __init__(self, param1, param2, param3): """init""" myclass = MyClass(1, 2) On 2009/03/15 02:00 - anon wrote : I think that this would be a great feature to implement. It seems to me that it's about the last thing left that pychecker can do that pylint can't. This may be stating the obvious, but to be truly useful, this feature would have to check imported functions/methods/class instantiations:: import mymodule mymodule.myfunc(1, 2) Ticket #19498 fix windows batch file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved see thread and solution at http://lists.logilab.org/pipermail/python-projects/2009-December/002156.html Comments :: On 2010/02/09 15:26 - dharding wrote : A lot more discussion has taken place on the solution for this bug on the mailing list - the version of pylint.bat attached to this bug may not be the most appropriate solution. I proposed a patch for updating all of the Windows batch files to leverage the scripts used on non-Windows systems. This patch can be found at . On 2010/05/10 12:07 - dharding wrote : I have verified that running pylint from the Windows command shell no longer exits the shell when using pylint 0.20.0. The ticket state can be updated to done. Ticket #19882 pylint hangs ~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved The files are attached. The main file that hangs pylint is MotorControlGui.py. I just included the others so that you won't get errors. :: pylint 0.19.0, astng 0.19.3, common 0.46.0 Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) Pyserial 2.4 (from pyserial-2.4-py2.5.egg) matplotlib 0.99.1.1 (from matplotlib-0.99.1.1_r7813-py2.5.egg). Comments :: On 2010/01/21 14:55 - sthenault wrote : reported by Aaron Hoover on the python-projects ml, on jan 2010 On 2010/01/21 15:42 - sthenault wrote : Helmut Namyslo reported a similar pb on december (see the zip attachment): I am trying to lint a project with about 30 modules. All except one files can be checked with PyLint without problem. But when cheicking 'actions.py' pylint seems to hang in an infinite loop. This is my configuration:: pylint 0.18.1 astng 0.19.1 common 0.45.2 Python 2.5.4 I have reduced my project as much as possible, but if I remove more methods from 'actions.py' the problem does not occur anymore. I ran :: pylint actions.py --disable-checker=Typecheck to see that all other checkers don't cause a problem. When I call :: pylint actions.py --enable-checker=Typecheck PyLint hangs. > On 2010/01/21 15:44 - sthenault wrote : > reproduced with :: > > pylint 0.19.0, > astng 0.19.3, common 0.46.0 > Python 2.5.4 (r254:67916, Nov 19 2009, 19:46:21) On 2010/02/09 06:43 - sthenault wrote : see also http://help.lockergnome.com/linux/Bug-568968-Trivial-program-makes-pylint-hang-regression-18--ftopict514590.html On 2010/02/26 23:28 - anon wrote : bug is listed "done in 0.20.0" which is yet to be released... is there a specific patch which could be applied to 0.19 meanwhile to avoid such a stall (I hit it too ;-/) Thanks in advance! Version 0.19.0 -------------- :publication date: 2009/12/18 :expected date: n/a Ticket #18308 fulltest.sh refers to deleted runtests.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved runtests.py was removed in changeset 476:622d0bbc57c0, yet fulltest.sh still remains and refers to it. I'm guessing that the new "preferred" way to run unit tests is with pytest? At the very least this file was useful for explaining the best way to run tests, so it should be fixed rather than removed! :-) Ticket #9334 C0103 false positive on __class__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected When run on this code: .. sourcecode:: python class Clazz(object): def changeType(self, newClass): self.__class__ = newClass pylint issues this message:: C0103: 4:Clazz.changeType: Invalid name "__class__" (should match _?_?[a-z][a-zA-Z0-9]{1,30}$) It is true that the name "__class__" does not match the configured naming convention. However, since it is a builtin Python name, changing the name is not possible. Ticket #18949 checker for string formatting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: resolved See http://lists.logilab.org/pipermail/python-projects/2009-November/002086.html and http://lists.logilab.org/pipermail/python-projects/2009-November/002111.html Ticket #18862 E0601 false positive with lambda functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved James Lingard reported... The following program: .. sourcecode:: python def f(): g = lambda: x x = 1 print g() generates the following unnecessary error:: E0601: 2:f.: Using variable 'x' before assignment Note that the following program doesn't generate the error: .. sourcecode:: python def f(): def g(): return x x = 1 print g() I think it would make sense for this warning to treat lambda expressions the same as function definitions. Ticket #18948 fix spelling mistakes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved http://lists.logilab.org/pipermail/python-projects/2009-November/002093.html Ticket #5821 implement a quiet mode to run as a library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved implement a quiet mode so that it can be run by some other program and return an exit code without polluting the standard output. Comments :: On 2009/11/24 10:23 - sthenault wrote : you can already do this by using a custom reporter. Ticket #10056 Many test files missing from pylint tarball ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved The Pylint 0.18.0 tarball is missing a number of files in test/ (all files that don't start with test_ except fulltest.sh) that are still in Mercurial. This means the tests can't be run from the downloaded tarball. Ticket #17958 pylint -e must not silence Fatal messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Typical usage for "-e" being to catch most critical problems, having it hiding fatal messages is quite counter-productive. It should indeed mean "only the messages of severity ERROR and above are displayed". Ticket #4004 update pylint.el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved Rewrite or update pylint.el so as to: - not use Fn keybindings - not use the my-so and so function names - run with emacs22 - use a pylint-option variable to handle additional options See debian bug report for more information. Comments :: On 2007/07/13 11:22 - sthenault wrote : the two first point are done. Dunno about the third. The fourth isn't. > On 2009/09/02 06:27 - anon wrote : > 3) was raise probably because pylint was using only written for > python-mode.el. r480 corrected this by detecting the correct mode keymap. 4) > was fixed in #3857. Version 0.18.1 -------------- :publication date: 2009/08/27 :expected date: n/a Ticket #8764 false positive: More than one statement on a single line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Maarteen reported :: try: pass except IOError: pass finally: pass gives :: C0321: 1: More than one statement on a single line syt: imo this is due to missing blockstart_tolineno on TryExceptFinally node (and so an astng bug) Comments :: On 2009/07/23 10:03 - anon wrote : I can confirm this bug. Ticket #8878 fails on a relative import ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved :: **** module storage.formats.swap F: 26: Unable to import 'devicelibs' (No module named devicelibs) The import line in question is:: "from ..devicelibs import swap" Note that we have the following dir hierarchy:: storage storage/__init__.py storage/errors.py storage/.py storage/devicelibs/__init__.py storage/devicelibs/.py storage/formats/__init__.py storage/formats/.py Right above the failing import from devicelibs, we have:: "from ..errors import *" pylint does sucessfully handle this, but the relative import of the devicelibs (sub)package seems to confuse it. To get the anaconda sourcecode do the following:: git clone http://git.fedorahosted.org/git/anaconda.git cd anaconda If you want to reproduce the problem, you may need to take a few other steps to be able to run pylint successfully on the storage package: 1) You will need to make the native isys module:: cd isys make 2) You will need to install pyparted:: https://fedorahosted.org/releases/p/y/pyparted/ 3) You will need to install pyblock:: git clone http://git.fedorahosted.org/git/pyblock.git 4) You will need to run pylint as root, as pyparted refuses to be imported as normal user (or patch pyparted to not do this check, which we need to remove anyways). Here is how I run pylint:: sudo pylint --init-hook='import sys; sys.path.insert(1, "isys")' --disable-msg-cat=CRW -r n storage Comments :: On 2009/04/06 16:42 - sthenault wrote : It also fails one the following construction used in storage/formats/\*.py:: from . import DeviceFormat, register_device_format With the following errors:: E0611: 29: No name 'DeviceFormat' in module '' E0611: 29: No name 'register_device_format' in module '' Note that both DeviceFormat and register_device_format are defined in storage/format/__init__.py Ticket #9215 false undefined variable error in lambda function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Here is a short demonstration program that shows that a lambda function's parameter is flagged as undefined if the lambda function is an argument to a decorator function. .. sourcecode:: python """Demonstrate false undefined variable for lambda functions.""" def decorator(expr): """Function returning decorator.""" def func(function): """Pass-thru decorator.""" return function # use expr expr(0) return func # this lambda is flagged # E0602: 16:main.: Undefined variable 'x' @decorator(lambda x: x > 0) def main(): """Dummy function.""" # this one is not flagged decorator(lambda y: y > 0) if __name__ == "__main__": main() gives :: ************* Module lambda E0602: 16:main.: Undefined variable 'x' :: > pylint --version pylint 0.18.0, astng 0.19.0, common 0.40.0 Python 2.4.1 (#1, Feb 1 2006, 14:47:49) [GCC 3.4.3 20050227 (Red Hat 3.4.3-22.1)] Ticket #9837 syntax error in a submodule mistakenly reported as "No name 'a' in module 'module_a'" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Pascal Meunier reported... files hierarchy :: -module_a \-a.py -b.py -__init__.py b.py:: from module_a.a import my_class a.py contains a syntax error. :: $ pylint module_a/b.py No config file found, using default configuration ************* Module module_a.b C: 1: Missing docstring E: 1: No name 'a' in module 'module_a' W: 1: Unused import my_class Which I took to mean that there was no file a.py inside the directory "module_a" or some problem with the filesystem or the names... The problem was quite different (a syntax error in a.py). The Python error message is just as misleading. I was scrambling for quite a while trying to find out what was wrong in the filesystem or the names I had given to the files. I think that a Python syntax error inside a file should generate something more appropriate and helpful than something that sounds like the claim that there is no such file! I understand now that the syntax error prevented the name from appearing in the namespace, so from that oblique point of view the error message is correct. However, why on earth not report syntax errors as such? I found no option to increase the verbosity of PyLint. Version 0.18.0 -------------- :publication date: 2009/03/25 :expected date: n/a Ticket #5573 don't issue R0201 on special protocal methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved such as __lt__, __eq__, ... Ticket #4037 don't issue W0142 (* or ** magic) they are not used at all (no change, and no item access) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Amaury wrote : IMO, just receiving and passing *args, **kwargs "as is" is not magic, as long as they are not used at all (no change, and no item access). I use *args and **kwargs almost exclusively this way. I see it as a way to redirect a function call, with no change to the arguments. Ticket #5719 E0601 false negative (variable referenced before assignment) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Maarten wrote : In the following Python fragment, the variable "x" is referenced before it is assigned in two occasions: :: def f(n): if n == 0: if x == 1: pass else: print x x = 3 There is a rule in the "variables" checker that should catch errors like this: message E0601. But for some reason this message is not issued. The reason seems to be the "if x == 1" statement. If this is replaced by "pass", the message will be issued. I looked at the code of the variables checker and the implementation of E0601 is in the visit_name() method. This is the final part of the decision whether to issue the message or not: :: if (maybee0601 and stmt.source_line() <= defstmt.source_line() and not is_defined_before(node) and not are_exclusive(stmt, defstmt)): self.add_message('E0601', args=name, node=node) I added some debug prints and the reason the message is not issued is that "are_exclusive(stmt, defstmt)" returns True. Here "stmt" is the "if x == 1" statement and "defstmt" is the "x = 3" assignment. Indeed those two branches are exclusive. However, that is not a valid reason why the use of "x" should be considered correct. In fact, when the branch in which a variable is assigned is exclusive to a branch in which a variable is used, that would be a reason to consider its use wrong. I hope someone who is more familiar with the pylint code can figure out what the proper role of are_exclusive() should be for triggering E0601. Ticket #8687 w0613 false positive on inner functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Ticket #8332 Wrong line number 1 when syntax error found ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved $ python -c 'print "pass\nprint \"Sylvain Th\xc3\xa9nault\""' > test.py $ python test.py File "test.py", line 2 SyntaxError: Non-ASCII character '\xc3' in file test.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details $ pylint -rn test.py E: 1: Non ascii characters found but no encoding specified (PEP 263) Ticket #8350 C0322 false positive on multi-line string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Carl Chenet reported on python-projects : I've got some weird behaviors with pylint and cut strings. I'm generating html so I'm using this kind of lines : :: self.titreprojet = '\ Drapeau vert\ %s' % projet and pylint tells me : :: C:110:EditionPage.genere_titre_projet: Operator not preceded by a space self.titreprojet = '\ %s' % projet ^ C:115:EditionPage.genere_titre_projet: Operator not preceded by a space self.titreprojet = '\ %s' % projet ^ C:119:EditionPage.genere_titre_projet: Operator not preceded by a space self.titreprojet = '\ %s' % projet ^ Pylint seems to misunderstand that my equal sign is inside a string. Ticket #8337 easy_install pylint fails and doesn't install dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved slightly truncated screen-log, on Fedora 10 and with python-setuptools-devel-0.6c9-1.fc10.noarch It has been mentioned on the mailing-list, but on Sylvains request I file this. [root@dev-mk ~]# find /usr/lib/python2.5/ /usr/bin | egrep 'logilab|pylint' # nothing found [root@dev-mk ~]# easy_install pylint Searching for pylint Reading http://pypi.python.org/simple/pylint/ Reading http://www.logilab.org/project/name/pylint Reading http://www.logilab.org/projects/pylint Best match: pylint 0.16.0 Downloading http://ftp.logilab.org/pub/pylint/pylint-0.16.0.tar.gz Processing pylint-0.16.0.tar.gz Running pylint-0.16.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-I5RCUm/pylint-0.16.0/egg-dist-tmp-Vfnr7u package init file './test/__init__.py' not found (or not a regular file) File "build/bdist.linux-i686/egg/pylint/test/input/func_w0705.py", line 28 __revision__ += 1 SyntaxError: default 'except:' must be last File "build/bdist.linux-i686/egg/pylint/test/input/func___future___import_not_first_stmt.py", line 4 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file File "build/bdist.linux-i686/egg/pylint/test/input/func_return_outside_func.py", line 3 return SyntaxError: 'return' outside function SyntaxError: ("'return' with argument inside generator",) File "build/bdist.linux-i686/egg/pylint/test/input/func_yield_outside_func.py", line 3 yield 1 SyntaxError: 'yield' outside function File "build/bdist.linux-i686/egg/pylint/test/input/func_continue_not_in_loop.py", line 8 continue SyntaxError: 'continue' not properly in loop File "build/bdist.linux-i686/egg/pylint/test/input/func_syntax_error.py", line 1 def toto ^ SyntaxError: invalid syntax File "build/bdist.linux-i686/egg/pylint/test/input/func_unknown_encoding.py", line 0 SyntaxError: ('unknown encoding: IBO-8859-1', ('build/bdist.linux-i686/egg/pylint/test/input/func_unknown_encoding.py', 0, 0, None)) SyntaxError: ("'return' with argument inside generator",) test/input/func_w0152.py -> build/bdist.linux-i686/egg/pylint/test/input/func_w0152.py test/input/func_w0110.py -> build/bdist.linux-i686/egg/pylint/test/input/func_w0110.py test/input/func_nameerror_on_string_substitution.py -> build/bdist.linux-i686/egg/pylint/test/input/func_nameerror_on_string_substitution.py ... test/regrtest_data/package/subpackage/module.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/subpackage/module.py test/regrtest_data/package/subpackage/__init__.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/subpackage/__init__.py Creating missing __init__.py for pylint.test zip_safe flag not set; analyzing archive contents... pylint.checkers.__init__: module references __path__ pylint.checkers.variables: module references __file__ pylint.checkers.variables: module references __path__ pylint.test.unittest_checkers_utils: module references __file__ pylint.test.unittest_checkers_utils: module references __path__ pylint.test.utils: module references __file__ pylint.test.test_func_sample_config: module references __path__ pylint.test.unittest_lint: module references __file__ pylint.test.smoketest: module references __file__ File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_w0705.py", line 28 __revision__ += 1 SyntaxError: default 'except:' must be last File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func___future___import_not_first_stmt.py", line 4 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_return_outside_func.py", line 3 return SyntaxError: 'return' outside function SyntaxError: ("'return' with argument inside generator",) File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_yield_outside_func.py", line 3 yield 1 SyntaxError: 'yield' outside function File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_continue_not_in_loop.py", line 8 continue SyntaxError: 'continue' not properly in loop File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_syntax_error.py", line 1 def toto ^ SyntaxError: invalid syntax File "/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_unknown_encoding.py", line 0 SyntaxError: ('unknown encoding: IBO-8859-1', ('/usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_unknown_encoding.py', 0, 0, None)) SyntaxError: ("'return' with argument inside generator",) Adding pylint 0.16.0 to easy-install.pth file Installing symilar script to /usr/bin Installing pylint script to /usr/bin Installing epylint script to /usr/bin Installing pyreverse script to /usr/bin Installing pylint-gui script to /usr/bin Installed /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg Processing dependencies for pylint Searching for logilab-astng>=0.17.4 Reading http://pypi.python.org/simple/logilab-astng/ Reading http://www.logilab.org/project/name/logilab-astng Best match: logilab-astng 0.17.4 Downloading http://ftp.logilab.org/pub/astng/logilab-astng-0.17.4.tar.gz Processing logilab-astng-0.17.4.tar.gz Running logilab-astng-0.17.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-L-NmR6/logilab-astng-0.17.4/egg-dist-tmp-Pi1BOQ test/regrtest_data/package -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package test/regrtest_data/descriptor_crash.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/descriptor_crash.py test/regrtest_data/import_package_subpackage_module.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/import_package_subpackage_module.py test/regrtest_data/package/subpackage -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/subpackage test/regrtest_data/package/__init__.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/__init__.py test/regrtest_data/package/subpackage/module.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/subpackage/module.py test/regrtest_data/package/subpackage/__init__.py -> build/bdist.linux-i686/egg/pylint/test/regrtest_data/package/subpackage/__init__.py error: Setup script exited with error: file 'bin/pylint' does not exist [root@dev-mk ~]# find /usr/lib/python2.5/ /usr/bin | egrep 'logilab|pylint' # no logilab stuff installed /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/config.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/interfaces.pyc ... /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/unittest_checkers_utils.pyc /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/test_format.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/unittest_pyreverse_writer.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/clientmodule_test.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/suppliermodule_test.pyc /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/__init__.pyc /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/clientmodule_test.pyc /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/suppliermodule_test.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/data/__init__.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/test_func.py /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/pylint/test/input/func_w0703.pyc ... /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/dependency_links.txt /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/PKG-INFO /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts/symilar /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts/pylint /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts/epylint /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts/pyreverse /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/scripts/pylint-gui /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/not-zip-safe /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/requires.txt /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/top_level.txt /usr/lib/python2.5/site-packages/pylint-0.16.0-py2.5.egg/EGG-INFO/SOURCES.txt /usr/bin/pylint /usr/bin/epylint /usr/bin/pylint-gui [root@dev-mk ~]# pylint Traceback (most recent call last): File "/usr/bin/pylint", line 4, in import pkg_resources File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in working_set.require(__requires__) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: logilab-astng>=0.17.4 [root@dev-mk ~]# easy_install logilab-common Searching for logilab-common Reading http://pypi.python.org/simple/logilab-common/ Reading http://www.logilab.org/project/logilab-common Best match: logilab-common 0.38.1 Downloading http://ftp.logilab.org/pub/common/logilab-common-0.38.1.tar.gz Processing logilab-common-0.38.1.tar.gz Running logilab-common-0.38.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-XZ5Byo/logilab-common-0.38.1/egg-dist-tmp-Wmc8-t package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*' under directory 'doc/html' Creating missing __init__.py for logilab.common.test zip_safe flag not set; analyzing archive contents... logilab.common.pytest: module references __file__ logilab.common.modutils: module references __file__ logilab.common.testlib: module references __file__ logilab.common.testlib: module MAY be using inspect.getinnerframes logilab.common.debugger: module MAY be using inspect.getsource logilab.common.test.unittest_changelog: module references __file__ /usr/lib/python2.5/site-packages/setuptools/command/bdist_egg.py:422: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal symbols = dict.fromkeys(iter_symbols(code)) logilab.common.test.unittest_testlib: module references __file__ logilab.common.test.unittest_modutils: module references __file__ logilab.common.test.unittest_modutils: module references __path__ Adding logilab-common 0.38.1 to easy-install.pth file Installing pytest script to /usr/bin Installed /usr/lib/python2.5/site-packages/logilab_common-0.38.1-py2.5.egg Processing dependencies for logilab-common Finished processing dependencies for logilab-common [root@dev-mk ~]# easy_install logilab-astng Searching for logilab-astng Reading http://pypi.python.org/simple/logilab-astng/ Reading http://www.logilab.org/project/name/logilab-astng Best match: logilab-astng 0.17.4 Downloading http://ftp.logilab.org/pub/astng/logilab-astng-0.17.4.tar.gz Processing logilab-astng-0.17.4.tar.gz Running logilab-astng-0.17.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MY6qLk/logilab-astng-0.17.4/egg-dist-tmp-3qD6em test/regrtest_data/package -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/package test/regrtest_data/descriptor_crash.py -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/descriptor_crash.py test/regrtest_data/import_package_subpackage_module.py -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/import_package_subpackage_module.py test/regrtest_data/package/subpackage -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/package/subpackage test/regrtest_data/package/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/package/__init__.py test/regrtest_data/package/subpackage/module.py -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/package/subpackage/module.py test/regrtest_data/package/subpackage/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/regrtest_data/package/subpackage/__init__.py test/data/module2.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/module2.py test/data/noendingnewline.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/noendingnewline.py test/data/all.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/all.py test/data/appl -> build/bdist.linux-i686/egg/logilab/astng/test/data/appl test/data/nonregr.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/nonregr.py test/data/module.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/module.py test/data/format.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/format.py test/data/notall.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/notall.py test/data/SSL1 -> build/bdist.linux-i686/egg/logilab/astng/test/data/SSL1 test/data/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/__init__.py test/data/appl/myConnection.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/appl/myConnection.py test/data/appl/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/appl/__init__.py test/data/SSL1/Connection1.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/SSL1/Connection1.py test/data/SSL1/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/data/SSL1/__init__.py test/data2/clientmodule_test.py -> build/bdist.linux-i686/egg/logilab/astng/test/data2/clientmodule_test.py test/data2/suppliermodule_test.py -> build/bdist.linux-i686/egg/logilab/astng/test/data2/suppliermodule_test.py test/data2/__init__.py -> build/bdist.linux-i686/egg/logilab/astng/test/data2/__init__.py zip_safe flag not set; analyzing archive contents... logilab.astng.builder: module references __file__ logilab.astng.builder: module references __path__ logilab.astng.manager: module references __file__ logilab.astng.test.regrtest: module references __file__ logilab.astng.test.unittest_utils: module references __file__ logilab.astng.test.unittest_inference: module references __file__ logilab.astng.test.unittest_lookup: module references __file__ logilab.astng.test.unittest_builder: module references __file__ logilab.astng.test.unittest_builder: module references __path__ logilab.astng.test.unittest_scoped_nodes: module references __file__ Adding logilab-astng 0.17.4 to easy-install.pth file Installed /usr/lib/python2.5/site-packages/logilab_astng-0.17.4-py2.5.egg Processing dependencies for logilab-astng Finished processing dependencies for logilab-astng [root@dev-mk ~]# pylint No config file found, using default configuration Usage: pylint [options] module_or_package ... Comments :: On 2009/03/24 14:35 - mkiilerich wrote : It does NOT work for me. This time on centos: bash-3.2# find /usr/lib/python2.4/ /usr/bin | egrep 'logilab|pylint' # nothing found bash-3.2# easy_install pylint Searching for pylint Reading http://cheeseshop.python.org/pypi/pylint/ Reading http://www.logilab.org/project/name/pylint Reading http://cheeseshop.python.org/pypi/pylint/0.16.0 Best match: pylint 0.16.0 Downloading http://pypi.python.org/packages/source/p/pylint/pylint-0.16.0.tar.gz#md5=c2bbadb32ef1b6ee45c6319a879ebafa Processing pylint-0.16.0.tar.gz Running pylint-0.16.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-YsOltL/pylint-0.16.0/egg-dist-tmp-8Ju6lZ package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*.html' under directory 'doc' File "build/bdist.linux-x86_64/egg/pylint/test/input/func_return_outside_func.py", line 3 return SyntaxError: 'return' outside function File "build/bdist.linux-x86_64/egg/pylint/test/input/func_yield_outside_func.py", line 3 yield 1 SyntaxError: 'yield' outside function Sorry: MemoryError: () File "build/bdist.linux-x86_64/egg/pylint/test/input/func_syntax_error.py", line 1 def toto ^ SyntaxError: invalid syntax File "build/bdist.linux-x86_64/egg/pylint/test/input/func_w0705.py", line 30 pass SyntaxError: default 'except:' must be last File "build/bdist.linux-x86_64/egg/pylint/test/input/func_return_yield_mix2.py", line 8 return 2 SyntaxError: 'return' with argument inside generator File "build/bdist.linux-x86_64/egg/pylint/test/input/func_return_yield_mix.py", line 6 return 1 SyntaxError: 'return' with argument inside generator File "build/bdist.linux-x86_64/egg/pylint/test/input/func_continue_not_in_loop.py", line 8 continue SyntaxError: 'continue' not properly in loop File "build/bdist.linux-x86_64/egg/pylint/test/input/func_noerror_defined_and_used_on_same_line_py25.py", line 8 with file('f') as f: print f.read() ^ SyntaxError: invalid syntax test/input/func_w0151.py -> build/bdist.linux-x86_64/egg/pylint/test/input/func_w0151.py ... pylint.test.test_func_sample_config: module references __path__ File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_return_outside_func.py", line 3 return SyntaxError: 'return' outside function File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_yield_outside_func.py", line 3 yield 1 SyntaxError: 'yield' outside function Sorry: MemoryError: () File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_syntax_error.py", line 1 def toto ^ SyntaxError: invalid syntax File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_w0705.py", line 30 pass SyntaxError: default 'except:' must be last File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_return_yield_mix2.py", line 8 return 2 SyntaxError: 'return' with argument inside generator File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_return_yield_mix.py", line 6 return 1 SyntaxError: 'return' with argument inside generator File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_continue_not_in_loop.py", line 8 continue SyntaxError: 'continue' not properly in loop File "/usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg/pylint/test/input/func_noerror_defined_and_used_on_same_line_py25.py", line 8 with file('f') as f: print f.read() ^ SyntaxError: invalid syntax Adding pylint 0.16.0 to easy-install.pth file Installing pylint script to /usr/bin Installing pyreverse script to /usr/bin Installing pylint-gui script to /usr/bin Installing epylint script to /usr/bin Installing symilar script to /usr/bin Installed /usr/lib/python2.4/site-packages/pylint-0.16.0-py2.4.egg Processing dependencies for pylint Searching for logilab-astng>=0.17.4 Reading http://cheeseshop.python.org/pypi/logilab-astng/ Reading http://www.logilab.org/project/logilab-astng Reading http://cheeseshop.python.org/pypi/logilab-astng/0.18.0 Best match: logilab-astng 0.18.0 Downloading http://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.18.0.tar.gz#md5=95a10789c6b429cd8d3765dc68abe128 Processing logilab-astng-0.18.0.tar.gz Running logilab-astng-0.18.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-k1lF8x/logilab-astng-0.18.0/egg-dist-tmp-dJPb7G zip_safe flag not set; analyzing archive contents... logilab.astng.builder: module references __file__ logilab.astng.builder: module references __path__ logilab.astng.scoped_nodes: module references __file__ logilab.astng.scoped_nodes: module references __path__ logilab.astng.manager: module references __file__ logilab.astng.test.unittest_builder: module references __file__ logilab.astng.test.unittest_builder: module references __path__ logilab.astng.test.regrtest: module references __file__ logilab.astng.test.unittest_lookup: module references __file__ logilab.astng.test.unittest_lookup: module references __path__ logilab.astng.test.unittest_utils: module references __file__ logilab.astng.test.unittest_inference: module references __file__ logilab.astng.test.unittest_scoped_nodes: module references __file__ logilab.astng.test.unittest_scoped_nodes: module references __path__ Adding logilab-astng 0.18.0 to easy-install.pth file Installed /usr/lib/python2.4/site-packages/logilab_astng-0.18.0-py2.4.egg Searching for logilab-common Reading http://cheeseshop.python.org/pypi/logilab-common/ Reading http://cheeseshop.python.org/pypi/logilab-common/0.38.1 Best match: logilab-common 0.38.1 Downloading http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.38.1.tar.gz#md5=dbabb6a0a832995f78f3cc0e3bf0e9a6 Processing logilab-common-0.38.1.tar.gz Running logilab-common-0.38.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-pZPSNc/logilab-common-0.38.1/egg-dist-tmp-jO-_fw package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*' under directory 'doc/html' Creating missing __init__.py for logilab.astng.test zip_safe flag not set; analyzing archive contents... logilab.astng.testlib: module references __file__ logilab.astng.testlib: module MAY be using inspect.getinnerframes logilab.astng.modutils: module references __file__ logilab.astng.debugger: module MAY be using inspect.getsource logilab.astng.pytest: module references __file__ logilab.astng.test.unittest_changelog: module references __file__ logilab.astng.test.unittest_modutils: module references __file__ logilab.astng.test.unittest_modutils: module references __path__ logilab.astng.test.unittest_testlib: module references __file__ logilab-astng 0.18.0 is already the active version in easy-install.pth Installed /usr/lib/python2.4/site-packages/logilab_astng-0.18.0-py2.4.egg error: Could not find required distribution logilab-common bash-3.2# bash-3.2# logilab-common can however be installed alone: bash-3.2# easy_install logilab-common Searching for logilab-common Reading http://cheeseshop.python.org/pypi/logilab-common/ Reading http://cheeseshop.python.org/pypi/logilab-common/0.38.1 Best match: logilab-common 0.38.1 Downloading http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.38.1.tar.gz#md5=dbabb6a0a832995f78f3cc0e3bf0e9a6 Processing logilab-common-0.38.1.tar.gz Running logilab-common-0.38.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-yZ6ZCJ/logilab-common-0.38.1/egg-dist-tmp-Up0cWp package init file './test/__init__.py' not found (or not a regular file) warning: no files found matching '*' under directory 'doc/html' Creating missing __init__.py for logilab.common.test zip_safe flag not set; analyzing archive contents... logilab.common.testlib: module references __file__ logilab.common.testlib: module MAY be using inspect.getinnerframes logilab.common.modutils: module references __file__ logilab.common.debugger: module MAY be using inspect.getsource logilab.common.pytest: module references __file__ logilab.common.test.unittest_changelog: module references __file__ logilab.common.test.unittest_modutils: module references __file__ logilab.common.test.unittest_modutils: module references __path__ logilab.common.test.unittest_testlib: module references __file__ Adding logilab-common 0.38.1 to easy-install.pth file Installing pytest script to /usr/bin Installed /usr/lib/python2.4/site-packages/logilab_common-0.38.1-py2.4.egg Processing dependencies for logilab-common bash-3.2# > On 2009/03/24 14:55 - sthenault wrote : > as you can see, this is marked as resolved in (unpublished) version 0.18 ;) Ticket #6769 pyreverse manpage not in debian package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved The pyreverse manpage is not in debian package, although it is in pylint/man :: $ ls pylint/man/ pylint.1 pyreverse.1 Ticket #8547 setup.py doesn't work with setuptools ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved setup.py doesn't work with setuptools, so we used distutils as a workaround Comments :: On 2009/03/19 16:55 - sthenault wrote : please detail what's the problem. 'Doesn't work' doesn't help... Previous version of pylint was (almost) easy_install'able, so it should somewhat works at least... > On 2009/03/20 10:42 - anon wrote : > maybe related to http://www.logilab.org/ticket/8464 On 2009/03/21 23:57 - anon wrote : this also doesn't work with easy_install on windows xp. Also, setup.py install doesn't work for windows xp for logilab-common-0.38.1 it looks OK for awhile then finally ... byte-compiling build\bdist.win32\egg\pylint\__pkginfo__.py to __pkginfo__.pyc Creating missing __init__.py for pylint.test byte-compiling build\bdist.win32\egg\pylint\test\__init__.py to __init__.pyc creating build\bdist.win32\egg\EGG-INFO installing scripts to build\bdist.win32\egg\EGG-INFO\scripts running install_scripts running build_scripts --------------------------------------------------------------------------- SystemExit Traceback (most recent call last) c:\cygwin\home\macd\logilab-common-0.38.1\setup.py in () 200 201 if __name__ == '__main__' : --> 202 install() 203 204 c:\cygwin\home\macd\logilab-common-0.38.1\setup.py in install(**kwargs) 196 ext_modules = ext_modules, 197 cmdclass = {'install_lib': MyInstallLib}, --> 198 **kwargs 199 ) 200 C:\Python25\lib\distutils\core.pyc in setup(**attrs) 166 raise 167 else: --> 168 raise SystemExit, "error: " + str(msg) 169 170 return dist SystemExit: error: file 'bin\pylint.bat' does not exist WARNING: Failure executing file: In [10]: also the setup install doesn't work for logilab-astng-0.18.0 and pylint-0.16.0 Version 0.17.0 -------------- See this :eid:`8554` for details on the support of the new ast_ python module, which is the main new feature of this version. .. _ast: http://docs.python.org/library/ast.html :publication date: 2009/03/20 :expected date: n/a Ticket #7925 Line number wrong for "generator expression needs parenthesis" error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved test case: print 'line1' print 'line2' print 'line3' print dict(value, value * 2 for value in range(100)) pylint output: E0001: 1: generator expression needs parenthesis Since the error is on line 4, that is the line I would expect pylint to report, but it reports line 1 always. For a short program like this it is obvious where the problem is located, but for a 1000-line module it would be looking for a needle in a haystack. Comments :: On 2009/02/08 20:34 - mkiilerich wrote : > The same problem is seen with decorators: print 'line 1' print 'line 2' @foo # 1:f: Undefined variable 'foo' def f(): pass \- but I don't know if it is the same bug ... Ticket #8369 adapt pylint to astng0.18 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 7.000 :state: resolved astng0.18 will be able to use either the _ast module or the compiler.ast module. This involved big changes which partially affect pylint on different places. So we have check all the changes and possibly modify pylint and/or astng Version 0.16.0 -------------- :publication date: 2009/01/28 :expected date: n/a Ticket #3711 bug finding decorator arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved consider this (stripped down and simplified) code sniplet: :: def decorate(get_name): def f(func): def new_method(self, *args): print "calling", func.__name__, "in", get_name(self) func(self, *args) return new_method return f class Foo(object): def __init__(self, name): self.name = name def get_name(self): return self.name @decorate(get_name) # <-------- HERE def foo(self, arg): print "foo:", arg Foo("bar").foo("baz") pylint 0.13.1 gives me an E0602 "Foo.foo: Undefined variable 'get_name'" in the marked line, which imho is a false positive, as this code runs fine with python 2.4.4, and I see no reason why one should not be able to pass a reference to another method this way. Ticket #5575 drop dumb W0704 message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: resolved we should expect that a programmer puting a bare "pass" in an exception handler is doing it intentionally? Comments :: On 2008/09/17 09:52 - eanclin wrote : add an option to control this (whith default to false). Ticket #4691 exit code should reflect the presence of errors or warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved pylint should only have an exit code of 0 if no errors or warnings were found. I suggest the following exit status: 0: no errors or warnings 1: errors were found 2: no errors, but some warnings 0 can be found if only refactoring advices and coding conventions issues were found. A command line flag could be use to force R and C to be considered as warnings. Comments :: On 2008/03/14 15:21 - acampeas wrote : afaik exit codes are supposed to reflect on the behaviour of the application itself (such as : pylint ran fine, or crashed) what are use use cases for this ? > On 2008/03/25 10:15 - Unknown author wrote : > You are mistaken. Exit codes are supposed to be used to tell the caller script > how the application ran without resorting to output parsing. For example see > grep's man page:: > > EXIT STATUS > Normally, the exit status is 0 if selected lines are found and 1 otherwise. > > This is very useful when using a program in a shell script, for example as a > pre-commit hook to prevent commit from taking place if pylint found errors in > the code. On 2010/04/21 12:29 - anon wrote : The current exit code scheme results in the exit code for pylint crashing (i.e. exit code 1) the same as the exit code for minor errors. On 2010/09/10 14:10 - anon wrote : Please reopen the ticket and provide some valid exit codes. 1 should be reserved for crashes or invalid calls to the tool. Also do not forget to document all of them. > On 2010/09/10 14:16 - sthenault wrote : > why 1 should be reserved for crashes? > > Exit codes are documented in pylint --long-help On 2010/09/10 14:41 - sorin wrote : I didn't know about the long help, this is a good new. About `1` error code - because if any program is crashing (python) or python fails inside pylint, the error code will be 1 and you cannot control this. But because `1` already means fatal error for pytlint I suppose it is ok, both of them being fatal errors. > On 2011/03/04 06:04 - anon wrote : > Actually, it is not OK. If you have other programs (e.g. CI) monitoring > Pylint's status codes, they are UNABLE to distinguish between Pylint itself > failing and Pylint finding something it considers fatal in the code, because > Pylint chooses to report both as 1. If the command ran and the requested input > was unavailable, or Pylint ran out of memory, or it could not understand its > command line options, this is an excellent reason to report 1. But it cannot > be discriminated from Pylint running *successfully* - carrying out its > intended purpose - and simply finding a particularly nasty sort of bug in the > files which it successfully processed. > > Not having to parse status codes is nice, but the first duty of a UNIX command > line utility, insofar as it returns status codes at all, is to report whether > there was a problem or not in a way which allows downstream programs to detect > problems-in-general. Writing silly shell scripts to decode the bitfield and > then have some status codes which are ambiguous defeats the purpose of > reporting a status code. Ticket #6951 false positive with W0104 ("Statement seems to have no effect") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved Duncan Findlay : I'm working on some new checkers to fit our local Python style guidelines, and I found a false positive with W0104 ("Statement seems to have no effect"). I'm running python 2.5 on mercurial tip. This code exhibits a false positive:: some_function() and some_other_function() Granted, it's dirty and shouldn't be done, (I'm adding a message for it in my code...) but it shouldn't lead to a W0104. My guess is that instead of checking that a discard node's expr attribute is a Yield or CallFunc node, we should also check if a child node is one of those. Ticket #6954 false "Using variable before assignment" on one-liner with-statements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Mads Kiilerich :: from __future__ import with_statement with file('f') as f: print f.read() gives :: E: 2: Using variable 'f' before assignment When the print statement is moved to its own line pylint correctly doesn't see an error Comments :: On 2009/01/15 00:48 - mkiilerich wrote : The error message is E0601. In variables.VariablesChecker.visit_name a criteria for getting the error is if a variable is used on the line it is defined. That is not right in cases like this. But it seems to be what prevents the error message if it isn't used on the same line. But another criteria is utils.is_defined_before,  and that seems to be where the real problem is; the check  doesn't consider "with" statements. The following seems to fix the simple test case: > \--- a/checkers/utils.py +++ b/checkers/utils.py @@ -108,6 +108,9 @@ if getattr(_node, 'name', None) == varname:                  return True break +        elif isinstance(_node, astng.With): +            if _node.vars.name == varname: +                return True          _node = _node.parent      # possibly multiple statements on the same line using semi colon separator      stmt = var_node.statement() I haven't been able to run the test suite yet. It is not obvious to me how to add such a 2.5-specific test. It seems like test/input/func_e0601.py could be the right place... > On 2009/01/15 07:54 - sthenault wrote : > great, thanks for the patch! > > I've checked-it in the repository. > > FYI, I've added a test by adding your sample code in a file > `pylint/test/input/func_noerror_defined_and_used_on_same_line_py25.py` : > > * the _py25 suffix makes it executed only with python 2.5 > > * the _noerror_ prefix tells that no message should be issued when this file > is analysed (else a file containing messages is expected to be found in > `pylint/test/messages/.txt`) On 2009/01/25 01:56 - mkiilerich wrote : Please change the state from "open" to "validation pending" or something like that Ticket #5634 pylint crashes if a wrong filename is given on the command line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved reported by V. Chukharev:: $ pylint name_of_a_nonexisting_file No config file found, using default configuration Traceback (most recent call last): File "/usr/local/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 901, in __init__ linter.check(args) File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 457, in check filemods = self.expand_files(files_or_modules) File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 527, in expand_files self.set_current_module(modname) File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 552, in set_current_module self.stats['by_module'][modname] = {} TypeError: 'NoneType' object is unsubscriptable Ticket #5677 unsupported action: callback ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected Steps to reproduce : install the following ``~/.pylintrc`` file:: [MASTER] init-hook="execfile('/home/alf/.pylint_init_hook.py')" create an empty (or with a print statement) file ``~/.pylint_init_hook.py`` run pylint:: alf@lacapelle:~$ pylint Traceback (most recent call last): File "/usr/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/home/alf/dev/public/pylint/lint.py", line 877, in __init__ linter.load_config_file() File "/home/alf/dev/public/logilab/common/configuration.py", line 518, in load_config_file provider.set_option(option, value, opt_dict=optdict) File "/home/alf/dev/public/pylint/lint.py", line 331, in set_option BaseRawChecker.set_option(self, opt_name, value, action, opt_dict) File "/home/alf/dev/public/logilab/common/configuration.py", line 681, in set_option raise UnsupportedAction(action) logilab.common.configuration.UnsupportedAction: callback Ticket #4296 crash when pylint analyzes a python file with syntax errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: deprecated pylint (tip version) abcd.py where abcd.py contains:: print print crashes with the following traceback:: ************* Module abcd E: 1: invalid syntax Traceback (most recent call last): File "/Users/adim/local/bin/pylint", line 4, in lint.Run(sys.argv[1:]) File "/Users/adim/hg/pylint/lint.py", line 900, in __init__ linter.check(args) File "/Users/adim/hg/pylint/lint.py", line 496, in check checker.close() File "/Users/adim/hg/pylint/lint.py", line 641, in close old_stats = config.load_results(self.base_name) File "/Users/adim/hg/pylint/config.py", line 56, in load_results data_file = get_pdata_path(base, 1) File "/Users/adim/hg/pylint/config.py", line 47, in get_pdata_path base_name = base_name.replace(os.sep, '_') AttributeError: 'NoneType' object has no attribute 'replace' Ticket #6949 E0602 False Negative ("print __dict__ is not None") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Nathaniel Manista: This is fairly trivial, but I couldn't find it currently tracked in the issue tracker. As the subject line indicates, the undefined-variable checker fails if the undefined variable is __dict__. I don't think anyone in their right mind would program that way, but that doesn't mean the check should fail. :: """This should not lint cleanly, but does.""" print __dict__ is not None Comments :: On 2009/01/16 01:29 - mkiilerich wrote : The problem seems to be that the variable checkers visit_module initializes the scope/stack frame stack in self._to_consume with the .locals for the Module node, but .locals already contains __dict__.  That causes visit_name to stay in the E0601 branch and it newer gets thrown to the E0602 branch as it does with all other names. __name__, __file__ and __doc__ also exists in the module nodes .locals, but the difference is that these really do exist in the modules global scope at runtime - and also when referencing the module from outside. It seems like __dict__ is the only name where module.__dict__ is defined, but within the global scope of the module it is not defined. So perhaps it makes sense to make a special handling of __dict__ in visit_module and remove it from the copy of .locals? > On 2009/01/16 09:05 - sthenault wrote : > yep, but we should take care of potential __dict__ assignment in the module. > Also a fix to the builtin_lookup function of astng is needed to avoid E0601 > false negative. > > This is now fixed (test included) in pylint / astng repository. > > Thanks! On 2009/02/24 12:02 - anon wrote : not sure if it's the same bug, but it's a E0602 false negative: for extension in extensions: insert_every_four = ([[18, 19, 16, 17][i]] + j for i, j in enumerate(extension)) => [E0602] Undefined variable 'extension' > On 2009/02/24 12:17 - mkiilerich wrote : > No, I don't think it is related. > > It might be due to limited support for comprehensions - like > http://www.logilab.org/ticket/7925 . > > BUT I can't reproduce your problem (haven't tried much, though). I suggest you > file a separate issue and provide a full working example and information about > your version of pylint. Ticket #5626 name resolution bug inside classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved I noticed that pylint is not accepting the use of class members as arguments to decorators inside the class, example:: def decorator(value): def wrapper(function): return function return wrapper class foo: member = 10 @decorator(member) #This will cause pylint to complain def test(self): pass pylint will complain about "Undefined variable 'member'" while: :: @decorator(foo.member) def test(self): pass Will work according to pylint. However the first case works in python while the second one doesn't. Comments :: On 2008/11/19 14:15 - sthenault wrote : not an astng bug, pb is in visit_name method of the variables checker. On 2008/12/02 11:45 - anon wrote : test commentaire (syt) à dégager... Version 0.15.2 -------------- :publication date: 2008/10/13 :expected date: n/a Ticket #5998 documentation points to wrong url for mailing list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved From: "A.T.Hofkamp": :: I found another problem in the Pylint README: The README states: You can subscribe to this mailing list at http://www.logilab.org/mailinglists/python_projects/mailinglist_register_form which is not true, it returns a page saying "this resource does not exist". I assume it should be "http://lists.logilab.org/mailman/listinfo/python-projects" instead. Ticket #6022 no error message on wrong module names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved an error message should occur if using a wrong module name: example : :: import foo a = foo.VAR yields no error message even though the module "foo" does not exist Comments :: On 2008/09/17 09:48 - eanclin wrote : should emit F0401 message Ticket #6040 pytest doesn't run test/func_test.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved it seems that pytest doesn't run test/func_test.py Ticket #5211 stop requiring __revision__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved pylint shouldn't warn about the __revision__ string. Ticket #4355 traceback pylint/astng ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: deprecated Traceback (most recent call last): File "/usr/bin/pylint", line 4, in ? lint.Run(sys.argv[1:]) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 897, in __init__ linter.check(args) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 497, in check self.check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 524, in check_file self._check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 538, in _check_file if not self.check_astng_module(astng, checkers): File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 599, in check_astng_module self.astng_events(astng, [checker for checker in checkers File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 617, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 617, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 617, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 614, in astng_events checker.visit(astng) File "/usr/lib/python2.4/site-packages/logilab/astng/utils.py", line 84, in visit method(node) File "/usr/lib/python2.4/site-packages/pylint/checkers/variables.py", line 337, in visit_name if (maybee0601 File "/usr/lib/python2.4/site-packages/pylint/checkers/utils.py", line 114, in is_defined_before _node = stmt.previous_sibling() File "/usr/lib/python2.4/site-packages/logilab/astng/nodes.py", line 158, in previous_sibling while not self.is_statement(): AttributeError: 'NoneType' object has no attribute 'is_statement' en lançant pylint sur riskbu installé sur crater Comments :: On 2007/11/23 08:27 - Unknown author wrote : I'm not able to reproduce this on crater or on my machine. Can you double check that your PYTHONPATH is clean and provide the exact command line used? Ticket #5672 W0706 weirdness ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved maarten reported... When I run pylint on the following code:: class MultiException(Exception): def __init__(self): Exception.__init__(self) self.messages = [] def add_error(self, message): self.messages.append(message) return self raise MultiException().add_error('blah') I get the following output:: W0706: 11: Identifier MultiException().add_error('blah') used to raise an exception is assigned to class MultiException(Exception): def __init__(self): Exception.__init__(self) self.messages = [] def add_error(self, message): self.messages.append(message) return self I don't understand what this warning is warning me about. Also, I think it's very strange that the class body is included in the warning. Versions used: pylint 0.14.0, astng 0.17.2, common 0.22.1 Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) Comments :: On 2008/07/30 13:07 - sthenault wrote : The wording is a bit confusing, I would expect something like 'Expression "(1) + (1)" has type "int" but is raised as an exception'. It seems though that the inference correctly determined that MultiException.add_error() returns a MultiException object, since the warning was able to print the body of the MultiException class. On 2008/09/24 15:22 - eanclin wrote : this happens also on this case :: class Foo(object): def return_self(self): return self raise Foo().return_self() yielding :: W0706: 8: Identifier Foo().return_self() used to raise an exception is assigned to class Foo: def return_self(self): return self but no warning for :: raise Foo (where there should be at least a warning since python raises TypeError ) Version 0.15.1 -------------- 0.15 bugfix release :publication date: 2008/09/17 :expected date: n/a Ticket #5993 epylint should work with python 2.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved trace: :: % python2.3 ~/python/bin/epylint Traceback (most recent call last): File "/mnt/run/hat/python/bin/epylint", line 6, in ? from subprocess import * ImportError: No module named subprocess Ticket #5991 missing files in 0.15.0 tarball ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved bin/pyreverse and man/pyreverse.1 are missing. Comments :: On 2008/09/19 14:50 - anon wrote : epylint.bat missing as well Version 0.15.0 -------------- :publication date: 2008/09/10 :expected date: n/a Ticket #5943 integrate pyreverse diagram generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: resolved add a new command called pyreverse integrating some of pyreverse's diagram generation into pylint, and move pylint's --*import-graph options to pyreverse command; Ticket #2473 invoking pylint on __init__.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved I am trying to use pylint to check *only* a __init__.py file. My experiments (on windows, py24, pylint 0.8):: pylint.bat mypackage.__init__ works. But the following two:: pylint.bat __init__.py pylint.bat .\__init__.py check the whole package. (where I would expect to only check __init__). If ./outside is on the PYTHONPATH then:: pylint.bat .\outside\mypackage\__init__.py fails with an ImportError, and:: cd .\outside pylint.bat .\mypackage\__init__.py works. Comments :: On 2006/10/13 17:07 - sthenault wrote : added a test case but can't reproduce this. Test on windows ? On 2006/10/13 17:07 - sthenault wrote : a similar pb : :: I found a minor problem in pylint. To reproduce this, create an empty directory, go into it and create a file named "__init__.py". The contents of the file can be something very simple, for example: print "hello world" Now if you run "pylint __init__.py", you will get the expected output. But if you run "pylint .", the output will look like this: ************* Module C: 0: Invalid name "" (should match (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$) W: 0: Missing docstring W: 0: Missing required attribute "__revision__" C: 0: Invalid name "" (should match (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$) W: 0: Missing docstring W: 0: Missing required attribute "__revision__" If you add some more lines (5 is enough), pylint will even report copy-pasted code between these "two" modules. So it seems pylint is checking "__init__.py" twice, once under its own name and once named empty string (probably the name of the containing module). On 2008/05/13 09:38 - sthenault wrote : similar issue reported on pydev tracker : https://sourceforge.net/tracker/?fun c=detail&atid;=577329&aid;=1957009&group;_id=85796 Version 0.14.0 -------------- :publication date: 2008/01/14 :expected date: n/a Ticket #4012 flag back tick as deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Since pylint can already flag one deprecated operator (<>), it would be great if it could flag the use of \``, as well. According to Guido_, this is also deprecated. .. _Guido: http://mail.python.org/pipermail/python-dev/2006-May/064752.html Ticket #4026 pylint.el should require compile ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved pylint.el uses "compile-internal" from "compile" without require compile. So "M-x pylint" will fail if compile hadn't been loaded in advance by any means. My fix is rather straightforward: add "(require 'compile)" in the code. :: ------ begin diff output ------ > (require 'compile) ------ end diff output ------ Ticket #4028 SQLobject patch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved cf mail from Thomas W Barr on python-projects http://lists.logilab.org/pipermail/python-projects/2007-June/001239.html Ticket #3733 Messages (dis)appear depending on order of file names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Marteen ter Huur: :: $ cat module1.py 'Module 1' from module2 import Clazz OBJ = Clazz() OBJ.AttRiBuTE = None $ cat module2.py 'Module 2' class Clazz(object): 'Dummy class' def method1(self): 'Dummy method 1' pass def method2(self): 'Dummy method 2' pass $ pylint -rn module1.py module2.py No config file found, using default configuration ************* Module module1 C: 6: Invalid name "AttRiBuTE" (should match [a-z_][a-z0-9_]{2,30}$) W: 6: Attribute 'AttRiBuTE' defined outside __init__ $ pylint -rn module2.py module1.py No config file found, using default configuration Comments :: On 2007/05/02 12:21 - sthenault wrote : not so weird actually, after a deeper look at your sample code... The problem is that attributes added externally are actually seen only when the ast is built. With pylint, ast are built one by one (eg it iterates on argument and for each build its ast and analyze it), and additionaly others ast will be built when it's necessary to search something in imported modules of the analyzed one. In your sample, only module1 is importing module2, so if you analyze module2 before module1, the attribute "AttRiBuTE" is added once module2 has already been analyzed. I think pylint should first build ast for each given arguments and only then launch analyzis, to avoid such weirdness (though potentially not all of them, since ast for imported modules will still be processed at analysis time). Ticket #4022 wx python crash ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved If I run pylint-0.13.1 on the following module: :: import wx def func(pos=wx.DefaultPosition): pass I get the following error: :: File "/opt/python/lib/python2.4/site-packages/logilab/astng/manager.py", line 197, in astng_from_something modname = klass.__module__ NameError: Unknown C global variable This does not happen with pylint-0.12.2 I am using: * Python 2.4 * wxWidgets 2.6.3 * Pylint 0.13.1 * astng 0.17.0 * common 0.21.2 on Red Hat Linux. Comments :: On 2007/07/13 13:57 - sthenault wrote : can't reproduce this one using latest pylint/astng versions and wx 2.6.3?. It has probably been fixed by astng 0.17.1 Version 0.13.2 -------------- :publication date: 2007/06/07 :expected date: n/a Ticket #3663 disable-checker is enabling rpython if not specified ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Comments :: On 2007/06/08 12:34 - Unknown author wrote : I'm not sure how to assert that this was indeed fixed. Leaving in current state for now. Ticket #3667 rpython-mode command line parsing error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved it eats one extra argument it shouldn't Comments :: On 2007/06/08 12:34 - Unknown author wrote : I'm not sure how to assert that this was indeed fixed. Leaving in current state for now. Version 0.13.1 -------------- :publication date: 2007/03/02 :expected date: n/a Ticket #3627 some files are missing from the distribution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Version 0.13.0 -------------- rpython checks :publication date: 2007/03/01 :expected date: n/a Ticket #3209 Differentiate between unused 'import X' and unused 'from X import *" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved the requester Daniel Drake submitted a patch for this. Ticket #2465 M2Crypto SSLServer subclassing problem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: rejected Running pylint on code that subclasses M2Crypto's SSLServer class causes it to complain about "access to undefined member" for member data and functions that are defined through inheritance. This causes errors to be logged for code that was previously reported clean. One of the errors that is reported is: Component.py:220: [E, Component.serve_forever] Access to undefined member 'handle_request' Ticket #3205 W0704 (except doesn't do anything) false positive if some statements follow a "pass" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved :: try: pass except: pass # pylint: disable-msg=W0702 print 'failed to do nothing' PyLint reports "W0704: 3: Except doesn't do anything". Ticket #3218 allow use of "disable-all" option inline ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved patch submitted by Daniel Drake Ticket #3216 E1101 false positive with numarray.randint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Daniel Drake reported: :: import numarray as na import numarray.random_array as nar im16 = nar.randint(0, 256, 300).astype(na.UInt8) The above program causes pylint to complain: :: E1101: 3: Instance of 'int' has no 'astype' member This is with numarray-1.5.2. The randint function returns either a numarray or an int. In this context it will only return a numarray so .astype() is valid. Syt: hard to fix... A possible solution might be to: * issue E1101 when the searched member is not found on every infered value * issue another warning when the searched member is not found on some infered value but found on another (or don't issue anything in this case?) The best solution would be to be able to understand the flow according to given argument value, but we're still far away from that... Ticket #3156 --init-hooks option to fix for instance pytgtk.require problem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Usage example: :: pylint --init-hook='import pygtk; pygtk.require("2.6")' [other options] mymodule Ticket #3285 option for Visual Studio line number reporting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Request by Olaf Meding: I would be great if support for MS Visual Studio could be added in terms of reporting line numbers. Currently the output format of PyLint is:: C:\somepath\somefile.py:12: [C0301] Line too long (116/80) What is needed is:: C:\somepath\collect.py(12): [C0301] Line too long (116/80) I edited the below file for now. site-packages\pylint\reporters\text.py:: #self.writeln('%s:%s: [%s%s] %s' % (path, line, sigle, obj, msg)) self.writeln('%s(%s): [%s%s] %s' % (path, line, sigle, obj, msg)) All that is needed is changing ":n:" to "(n):", where n is the line number. Many thanks for considering making this configurable. Ticket #3184 PyLint crashes when encountering "return outside function" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Marteen reported : If I run PyLint on the following program:: return It crashes like this:: Traceback (most recent call last): File "/usr/bin/pylint", line 4, in ? lint.Run(sys.argv[1:]) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 847, in __init__ linter.check(args) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 481, in check self.check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 495, in check_file astng = self._check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 519, in _check_file self.check_astng_module(astng, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 577, in check_astng_module self.astng_events(astng, [checker for checker in checkers File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 594, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 594, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 591, in astng_events checker.visit(astng) File "/usr/lib/python2.4/site-packages/logilab/astng/utils.py", line 85, in visit method(node) File "/usr/lib/python2.4/site-packages/pylint/checkers/base.py", line 392, in visit_return self._returns[-1].append(node) IndexError: list index out of range Ticket #3214 pylint doesn't like numpy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: rejected Skip reported: Given this one-line script: :: from numpy import array, identity, matrixmultiply, dot pylint reports: :: pylintnumpy.py:1: [E] No name 'array' in module 'numpy' pylintnumpy.py:1: [E] No name 'identity' in module 'numpy' pylintnumpy.py:1: [E] No name 'matrixmultiply' in module 'numpy' pylintnumpy.py:1: [E] No name 'dot' in module 'numpy' pylintnumpy.py:1: [W] Unused import matrixmultiply pylintnumpy.py:1: [W] Unused import identity pylintnumpy.py:1: [W] Unused import array pylintnumpy.py:1: [W] Unused import dot pylint 0.12.1 astng 0.16.1 common 0.19.2 numpy 0.9.6.2138 Python 2.4.2 Comments :: On 2009/09/03 11:35 - anon wrote : This error can be reproduced with numpy version 1.0.4 and before. Did you use such version for the tests ? On 2010/04/22 13:23 - anon wrote : I also still see this here with pylint 0.20.0 and numpy 1.3.0. On 2010/04/22 13:23 - anon wrote : I also still see this here with pylint 0.20.0 and numpy 1.3.0. On 2010/04/22 13:23 - anon wrote : I also still see this here with pylint 0.20.0 and numpy 1.3.0. On 2010/05/20 15:47 - jdekloe wrote : Confirmed on my side as well with pylint 0.20.0 and numpy 1.3.0. In addition I also get a crash of python itself: *** glibc detected *** /usr/bin/python: corrupted double-linked list: 0x00000000030dc710 *** don't know if that could be related to this issue. For your reference, I use python 2.6.2 on a Fedora12 64 bit system (AMD processor). On 2010/05/20 22:53 - mkiilerich wrote : jdekloe: see http://www.logilab.org/ticket/23009 and for example http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581058 Ticket #3282 python2.3 compat / set usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved The 0.12.2 version uses set objects in checkers/typecheck.py but does not import it from logilab.common.compat Comments :: On 2007/02/09 08:31 - adimascio wrote : Ticket #3422 rpython checks ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 3.000 :state: resolved Check rpython stuff * xx.replace only works with a single char * unsupported operations * mixing types * non initialized variable before if/then/else block * ... Ticket #2479 W0212 "ethod could be a function" false positive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved W0212, Method could be a function shouldn't be emitted in case like (factory method pattern) :: class XA: pass class XB(XA): pass class XC(XA): pass class A: def MakeX(self): return XA() class B(A): def MakeX(self): return XB() class C(A): def MakeX(self): return XC() Ticket #3123 W0212 false positive on static method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Duncan reported : :: class Thing(object): ''' example class ''' _next_id = 0 __slots__ = ('number', 'name') def __init__(self, name): self.number = Thing.next_id() self.name = name def __str__(self): return '(number=%d, name="%s")' % (self.number, self.name) def next_id(): ''' static method to increment "private" class attribute ''' Thing._next_id += 1 return Thing._next_id next_id = staticmethod(next_id) gives : :: W: 20:Thing.next_id: Access to a protected member _next_id of a client class W: 21:Thing.next_id: Access to a protected member _next_id of a client class Ticket #2485 W0222 "Signature differs from overriden method" false positive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Maarten ter Huurne: :: class Super(object): def method(self, param): raise NotImplementedError class Sub(Super): def method(self, param = 'abc'): pass Output: :: W0222: 6:Sub.method: Signature differs from overriden method Since "Sub.method" can be called with 1 parameter just like its abstract declaration, I think the code above is correct, so the warning should not be issued. Version 0.12.2 -------------- bug fixes :publication date: 2006/11/23 :expected date: n/a Ticket #3149 E0101 false positive: 'return' or 'return None' in __init__ is not an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved :: Michael Foord wrote: > Barry Scott wrote: >> E0101, Foo.__init__] Explicit return in __init__ >> >> Why is this an error? I would have expected this to be a warning as >> it a matter of style >> not correctness. >> > But if it returns anything it is an error. Agreed. (I suspect that "return" and "return None" are the same in the ast). > > An early return certainly shouldn't be an error. This is the false positive I see with: class Foo: def __init__( self, x ): self.a = 1 if x > 0: return self.a = 2 a.py:2: [E0101, Foo.__init__] Explicit return in __init__ Ticket #3117 hard to override sys.stdout for reporters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Ilya Sokolov tell us: this is from pylint/reporters/text.py:49: :: def __init__(self, output=sys.stdout): BaseReporter.__init__(self, output) self._modules = {} i think it is better to change it in this way: :: def __init__(self, output=None): if output is None: output=sys.stdout BaseReporter.__init__(self, output) self._modules = {} Ticket #3119 Off-by-one error counting lines in a file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved skip reported: I just happened to notice that pylint seems to count the number of lines in a file incorrectly. I get this error message: :: [C] Too many lines in module (1042) Both XEmacs and the Unix wc command only count 1041 lines for that file. Ticket #3125 E1101 false positive and a message duplication ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved MATSUI Tetsushi wrote: The following code: :: import decimal decimal.getcontext().prec = 200 print decimal.getcontext().prec outputs: :: E: 4: Instance of 'Context' has no 'prec' member E: 4: Instance of 'Context' has no 'prec' member Comments :: On 2006/11/23 13:50 - sthenault wrote : Fixed the last part (eg message duplication) since the initial false positive is due to dynaming setting of attributes in the decimal.Context class. > On 2007/06/08 12:23 - Unknown author wrote : > I tried to reproduce this today, and got no error at all. I guess astng made > some progress... (otoh, running pylint on the snippet took a significant > amount of time...) Ticket #2508 false positive with lambda ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved pylint -f parseable bug.py bug.py:1: [C] Missing required attribute "__revision__" bug.py:6: [E, buggy.] Using variable 'a' before assignment bug.py:6: [E, buggy.] Using variable 'b' before assignment I'm running... /tmp$ pylint --version pylint 0.12.1, astng 0.16.1, common 0.19.2 Python 2.4.3 (#1, Oct 2 2006, 11:23:48) [GCC 3.3.6] The release notes in the mailing list stated that __revision__ was no longer required, so I am surprised to see that message. The lambda error is from a +lambda construct of... lambda (a, b): a != b ...but if I were to change that bit of code to be... lambda (x): x[0] != x[1] ...then pylint will be quiet about the lambda expression. Thanks! Ticket #3121 pylint crashers - AttributeError: fromlineno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Heikki Toivonen reported: :: "/home/heikki/workspace/chandler/release/lib/python2.4/site-packages/logilab/astng/__init__.py", line 194, in Const___getattr__ raise AttributeError(name) AttributeError: fromlineno You can either download prebuilt binaries of Chandler (http://builds.osafoundation.org/ - grab a continuous build for latest code) or use svn and build whatever parts you want yourself (http://wiki.osafoundation.org/bin/view/Projects/BuildingChandler). Comments :: On 2006/11/23 13:30 - sthenault wrote : with the repository version of pylint/astng, I don't get any crash with :: pylint application/ i18n/ repository/ tools/ util/ on a Chandler_linux_0.7alpha5.dev-r12415-20061122143833, so I guess it's fixed. I suspect even this pb to be fixed by astng 0.16.2. Ticket #3143 W0233 / Yes objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved http://lists.logilab.org/pipermail/python-projects/2006-August/000898.html Comments :: On 2006/11/20 14:47 - Unknown author wrote : See also http://lists.logilab.org/pipermail/python-projects/2006-November/001002.html Version 0.12.1 -------------- mostly fixes for python >= 2.4 :publication date: 2006/09/25 :expected date: n/a