redundant import statement appears from nowhere in vscode

Viewed 301

It's not the first time I've noticed that while editing python files in vscode import statement appears from nowhere, without my permission, like code below:

from unittest import result

What is it? How to prevent such insertions?

1 Answers

This happens because of auto import completion of Pylance. To disable this go to VSCode's Extensions tab, open Pylance settings and disable this setting.

Related