[Python-projects] pylint crashed on unknown decorators

Benjamin Niemann pink at odahoda.de
Tue Dec 12 12:03:20 CET 2006


On Tuesday 12 December 2006 11:46, Benjamin Niemann wrote:
> stubled upon this bug, simplest testcase is:
>
> @fooze
> def func():
>     pass

Sorry, must have missed the last release annoucement. This crash is gone in 
astng-0.16.3/pylint-0.12.2

> Another bug, which triggered the bug above, is that pylint does seem not
> find a decorator, when it is defined as a member of the class where it is
> used:
>
> class TC(object):
>     def deco(func):
>         return func
>
>     @deco
>     def func(self):
>         pass

This one now results in "pylintbug.py:1: [E0602, TC.func] Undefined 
variable 'deco'" - deco is defined and the reference does not occure in line 
1...

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/


More information about the Python-Projects mailing list