For me, I just needed to add "python.analysis.extraPaths": ["${workspaceFolder}/modules"] to the <projectroot>/.vscode/settings.json file. Note that pylint CLI was not showing this error, only VSCode
"python.analysis.extraPaths": ["${workspaceFolder}/modules"]
<projectroot>/.vscode/settings.json
pylint