-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pylance not indexing all files and symbols for sqlalchemy even with package depth of 4 #4637
Comments
What version of SQLAlchemy are you using? |
Version 1.4.28 |
Reassigning to @heejaechang. I believe this only repros in 2023.7.31 (or later) where the sqlalchemy stubs have been removed from typeshed. I was able to repro this by doing the following:
I thought what was happening was: The indexer sees the Based on that I wasn't sure if this was simply a library bug ( But then I realized that if I rename my So maybe there's an inconsistent bug where the cache file is misgenerated? Can you take a look? This is the first time I've dug into the indexer and I may be misinterpreting what's happening. I'm attaching my problematic |
@debonte thanks for looking into it. However I have seen this issue with multiple modules in sqlalhemy as well as some other packges as well where the auto import suggestions are incorrect. |
@debonte I think, your indices are all messed up due to some reasons, for such cases, we have so it can re-create the cache from scratch again. for users who doesn't want to get into such |
I think there is a bug around |
@heejaechang I basically ran both the commands not sure which one did the trick but it worked for me, however after setting Also do you have any eta on when |
@rbhanot4739 fix will be in the tomorrow's prerelease bit. the bug was at the |
This issue has been fixed in prerelease version 2023.7.41, which we've just released. You can find the changelog here: CHANGELOG.md |
I'm experiencing this issue with Pylance |
@nielsuit227, this issue has been closed for a long time, so it's likely you are seeing something different. Please open a new issue. |
Environment data
Code Snippet
Hi,
I am using Sqlachemy orm in my project however pylance is not able to index symbols correctly and hence not providing correct suggestions in the quick fix popup. In the gif below I have
AsyncSession
being referred in the function signature fromsqlalchemy.ext.asyncio.session
package how pylance gives the incorrect quick fix suggestion of_AsyncSessionContextManager
Here is another screenshot of where the autocomplete suggestions seems to be incorrect/incomplete. As you can see the the popup does not show the
select
statement fromsqlalchemy
in the suggestion list which I am actually expecting in this case and these suggestions does not seem to context aware.This is how my workspace config wrt to package indexing looks like
Logs
Posting logs in the attached file due to github template character limit.
pylance-logs.txt
The text was updated successfully, but these errors were encountered: