python - pylint balks on reference to __package__ -
i'm using __package__
in setup.py refer top-level name of package it's supposed test, build, install, etc.. however, pylint objects:
module 'mian.mian' has no '__package__' member
this works fine in ipython
:
from mian import mian package package.__dict__ ... '__package__': 'mian',
is pylint doing right thing here, ignoring pep 366's "when import system encounters explicit relative import in module without __package__ set (or set none), calculate , store correct value"? if so, need change?
workaround: use package.__name__.rpartition('.')[0]
instead of package.__package__
.
this ticket on pylint's tracker: http://www.logilab.org/ticket/73668
Comments
Post a Comment