The bundled black is only used if there is no installed version of black found in the selected python environment.
Minimum supported version of black is 22.3.0.
Once installed in Visual Studio Code, "Black Formatter" will be available as a formatter for python files. Please select "Black Formatter" (extension id:ms-python.black-formatter) as the default formatter. You can do this either by using the context menu (right click on a open python file in the editor) and select "Format Document With...", or you can add the following to your settings:
Custom arguments passed to black. E.g "black-formatter.args" = ["--config", "<file>"]
Sets the tracing level for the extension.
Setting to provide custom black executable. This will slow down formatting, since we will have to run black executable every time or file save or open. Example 1: ["~/global_env/black"] Example 2: ["conda", "run", "-n", "lint_env", "python", "-m", "black"]