-
Notifications
You must be signed in to change notification settings - Fork 133
Mark files in .venv as library files to avoid reindexing #1207
Comments
Can you be more specific? This should already occur. We get the details of the interpreter from it directly, and treat anything it reports as library code during our analysis. What do you mean by "re-indexed"? |
We are using docker volume to share code between host and container. That means the paths that python interpreter reports are container's paths, not host's paths (We have a bridge script that uses We can set ["./api", "./api/.venv/lib/python3.7", "./api/.venv/lib/python3.7/site-packages"] but on any changes to Our site-packages folder is of medium size, so it take a while along with 100% cpu everytime "Reloading modules" starts. |
Those two Reloading modules happens when we detect that there has been a package install; in that case we have to "reload modules" and start the analysis over again, since the existence of a new module has very broad impacts. It might be the case that it's happening too often and triggering on user files (and I know there are some issues with our file watching, I have to file an issue on that for investigation). Is this VS Code Remote, or a custom solution? https://code.visualstudio.com/docs/remote/containers |
This is a custom solution, not vs code remote, as I said we have a "bridge script" to act as a local python interpreter, but in fact passing commands to container's python using The problem is the interpreter will report container paths, not host paths. Example: VS Code Remote looks promising but we only share a portion of the code (the |
#1492 fixed our library code watching toggle to be visible again (among other fixes to file watching). If the watching isn't working how you'd like, you can add: "python.analysis.watchSearchPaths": false To disable this functionality. |
Uh oh!
There was an error while loading. Please reload this page.
It would be nice if files in
.venv
folder are considered as library files, so as they won't be re-indexed when user files changes. We are usingPIPENV_VENV_IN_PROJECT
to store virtual environment directory directly inside our workspace directory.Or an extra configuration like
autocomplete.extraLibPaths
would make configuring project paths more flexible.The text was updated successfully, but these errors were encountered: