Setting src as sources root when opening project initially

I have a simple Python project with a src folder. When I open the project initially in Pycharm (IntelliJ) I have to manually set src as a Sources Root to get the intellisense import warnings to disappear. Is there a minimal way to make the IDE pick up src as the sources root automatically, e.g. a toml file in the root or similar?

.idea
.venv
layers
modules
src
.python-version
Dockerfile
 
0
1 comment

Hi Reik Schatz,

Currently, PyCharm doesn’t automatically mark the src folder as a Sources Root when opening a project. This has to be configured manually unless it's already specified in the project’s .idea/modules.xml file.

There's an open feature request for this behavior here: PY-31202. You’re welcome to vote, comment, and follow the issue for any updates. If you’re new to YouTrack, this guide may help you get started.

0

Please sign in to leave a comment.