Skip to content
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 requires i use quickfix to import local modules #3322

Closed
Axzurey opened this issue Sep 13, 2022 · 3 comments
Closed

pylance requires i use quickfix to import local modules #3322

Axzurey opened this issue Sep 13, 2022 · 3 comments

Comments

@Axzurey
Copy link

Axzurey commented Sep 13, 2022

Environment data

  • Language Server version: 2022.9.10
  • Os windows 11, vscode version 1.71.0
  • Python version: 3.10.7

I have a python file with another module in the same directory.
However, I must first use quickfix, directly open the file, or manually import the module for it to be on the import list

https://imgur.com/a/YK50hxe -- the behavior

I should be able to type a partial name, and pylance will show a list of modules including the local one

this issue highlighted the same problem but it was marked as resolved and yes, going back to that version does work, but I won't have all the features.

Additional information:

my related settings.json looks like this:
{ "python.analysis.indexing": true, "python.languageServer": "Pylance", "python.analysis.autoSearchPaths": true, "python.analysis.typeCheckingMode": "strict", "python.analysis.diagnosticMode": "workspace", }

@heejaechang
Copy link
Contributor

we do not add user types in auto import unless it is already used. code action on the other hand, adds all user types. this was a decision to make sure we do not add hundreds of user types in completion list.

@luabud
Copy link
Member

luabud commented Sep 13, 2022

I believe this is a dupe of #2681, so closing in favour of that. Let us know if that's not the case, though :)

@luabud luabud closed this as completed Sep 13, 2022
@heejaechang
Copy link
Contributor

this is also dup of this - #3324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants