Adjusting project root (for pathing)

I have a project who's root level contains a bunch of stuff not directly related to the code (deploy, docker, scripts, etc). Rather, there is a subfolder that contains the app code. When I try to import stuff, it constantly tells me there are unresolved references, which means auto-complete works only sometimes. I'm trying to figure out how to tell Pycharm where to consider the code root for things like imports.

1 comment
Comment actions Permalink

Hi, you can try mark anything not related to your Python code as "Excluded" in Project structure settings.

On the other hand, if PyCharm can't resolve imports of custom modules which are also located in your project, you can mark them as "Source".

Please see here:


Please sign in to leave a comment.