PyCharm can not autocomplete when importing * from a package

This is the structure of my project:

main.py/

         pck/

               __init__.py

               mod.py

The list name __all__ = ['mod'] is in the pck/__init__.py

When I use

from pck import mod

 the autocomplete is worked.

when I use 

from pck import *

 the autocomplete is not worked.

 

But I try it in the PyCharm Python console, it is also worked.
 
 
Is it possible to autocomplete in PyCharm by using
from pck import *
 

Thank you very much!

1
2 comments

Try setting the folder "pck" as a source in Project Structure. 

 

 

2
Avatar
Permanently deleted user

Thanks so much for this lifesaving quick fix!!! Now I can have relative import paths that maintain full autocomplete both from my submodule coding projects, as well as any project integrating them.

0

Please sign in to leave a comment.