On Sep 19, 2016 9:52 PM, "Mads Kiilerich" <m...@kiilerich.com> wrote:
> On 09/19/2016 09:34 PM, Thomas De Schampheleire wrote:
>> On Sep 19, 2016 9:30 PM, "Mads Kiilerich" <m...@kiilerich.com> wrote:
>> >> +from kallithea.tests.base import *
>> > Would you have any objections to dropping this and just use
kallithea.tests.base where it is needed?
>> > Import * in general is one thing, but having it in a module definition
can make it even harder to figure out what is going on.
>> Does that work with the override of __all__? That is the real reason to
import this way. If there is a better way, yes please.
> We only need __all__ in a module when we do 'import *' from it. And as I
propose it, there would be no 'import *' from __init__.py but from base.py.
> (Also __all__ in base.py will unambiguously be everything, and there is
thus not need for it. Unless we like explicit.)
In my reasoning I envisioned not touching the test files, which would
require __all__. In the pushed version, you did effectively fix the imports
from tests to tests.base, so I agree __all__ is no longer needed. Thanks
for taking care of it. I am now rebasing the tg branch on this and other
kallithea-general mailing list