I have a project in Pycharm organized as follows:
-- Sources
|--__init__.py
|--Calculators
|--__init__.py
|--Filters.py
|--Controllers
Make sure you didn't by mistake changed the file type of __init__.py
files. If, for example, you changed their type to "Text" (instead of "Python"), PyCharm won't analyze the file for Python code. In that case, you may notice that the file icon for __init__.py
files is different from other Python files.
To fix, in Settings > Editor > File Types
, in the "Recognized File Types" list click on "Text" and in the "File name patterns" list remove __init__.py
.