Home > database >  Pylance doesn't show suggestions for not-yet-imported definitions
Pylance doesn't show suggestions for not-yet-imported definitions

Time:02-04

According to the expected

This is what happens on my system:

actual

Can someone please help me understand why Pylance isn't working as advertised on my system?

CodePudding user response:

I wager you need to put the following in your user settings.json or workspace .vscode/settings.json:

`"python.analysis.autoImportCompletions": true`

(The default value of the setting if not specified is false)

You may also be interested in the related python.analysis.importFormat ("defines the default format for import module") and python.analysis.autoImportUserSymbols ("Offer user symbols in auto-import completions") settings.

  • Related