When I just created a new project I had two py files - main.py and functions.py - in the project folder "my project". In main.py I imported functions.py and it worked fine. But then I created some folders in "my project" folder and put main.py and functions.py in one of them. They are still in the same folder, but in main.py it says that functions.py is an unresolved reference.
P.S. Using PyCharm on macos
Simple answer: you should make a package in your directory tree and PyCharm will pick it up easily.
Open
project_root
in PyCharm and these imports should work correctly:or