Python auto import extension for VSCode

VSCode team recently released Pylance

Features

  • Docstrings
  • Signature help, with type information
  • Parameter suggestions
  • Code completion
  • Auto-imports (as well as add and remove import code actions)
  • As-you-type reporting of code errors and warnings (diagnostics)
  • Code outline
  • Code navigation
  • Code lens (references/implementations)
  • Type checking mode
  • Native multi-root workspace support
  • IntelliCode compatibility
  • Jupyter Notebooks compatibility

I have built an automatic import extension that supports Python. It lets you fully customize how the imports get written to the file, modifying import paths, names, sorting relative to other imports. The Python plugin even lets you "group" imports together with extra line breaks.


No, but it will soon be a part of vscode-python: https://github.com/Microsoft/vscode-python/pull/636

EDIT: See answer by @Eric, who built such an extension.

EDIT 2: See answer by @Eyal Levin, mentioning such an extension (Pylance).