[Python-projects] pylint and commons patch for explicit relative imports

Stefan Rank list-ener at strank.info
Thu Feb 7 10:12:53 CET 2008


One more thing: I did not test the patch on older python versions
(< 2.5), and From nodes in py2.4 probably don't have a .level attribute.

The code might need a::

    try:
        level = node.level
    except AttributeError:
        level = 0

in one or two places...

stefan


on 07.02.2008 09:34 Sylvain Thénault said the following:
> On Wed, Feb 06, 2008 at 07:26:33PM +0100, Stefan Rank wrote:
>> The same patch again, with a minimal correction I forgot:
>> a possible IndexError for 'from . import xxx'.
> 
> patch included, thanks a lot Stefan!
> regards,


More information about the Python-Projects mailing list