I'm working on a project in which one of the .py files is spun up in a container (Worker.py). This file imports from other .py files in the project which are appended to the system path so that it all works. It looks like this:
import os
sys.path.append('/app/src/')
from utils.general_utils import generic_function
from handler.task_handler import TaskHandler
VSCode throws an "unable to import utils.general_utils" error, since it, of course, has no knowledge beforehand of what gets put where in a container. Hence, I believe the best solution would be to suppress these errors. However, I'd prefer not to just disable import errors since for other parts of the project it is still useful.
How can this be done, or is there a better alternative solution?