In my situation (select black
as the Python Formatting Provider in VS Code Settings), I encountered this warning everytime when I pasting some text into the editor.
And the official documentation of VS Code has a solution specifically for it:
When using the black formatter, VS Code issues the following warning when pasting source code into the editor: Black does not support the “Format Select” command.
To prevent this warning, add the following entry to your user or workspace settings to disable format on paste for Python files:
"[python]": {
"editor.formatOnPaste": false
}