Reputation: 50372
Is there a way to have PyCharm to auto-completion when specifying imports of packages defined in the project?
PyCharm seems to do auto-complete just fine for library packages, but not the ones that have been defined in the project.
Example project structure:
ProjectName > src > package_1 __init__.py package_file.py __init__.py source_1.py
If within the file 'source_1.py', I type the following, I get not auto-suggest for the rest of the work 'package_1':
from packa
Upvotes: 0
Views: 1574
Reputation: 9359
in Project
sidebar:
right-click on desired folder (src
in this case) and from context menu choose Mark directory as
-> Source root
. It will turn blue.
Upvotes: 5