...
- If you you're getting squiggly red lines underneath your modules module names in your import statements (usually this happens if you have all your Python code within a subfolder), right-click the parent directory of the Python code, go "Mark Directory As" → "Sources Root". (Source)
...