I have written a module (a file my_mod.py file residing in the folder my_module). Currently, I am working in the file cool_script.py t
my_mod.py
my_module
cool_script.py
If your own module is in the same path, you need mark the path as Sources Root. In the project explorer, right-click on the directory that you want import. Then select Mark Directory As and select Sources Root.
Sources Root
Mark Directory As
I hope this helps.