Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97355

Selectively surpress VSCode warnings/errors that are not relevant in deloyment

$
0
0

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?


Viewing all articles
Browse latest Browse all 97355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>