Closed KelvinChung2000 closed 3 months ago
@KelvinChung2000 If you want to use latest black, you can set black-formatter.importStrategy
to fromEnvironment
, and install latest black in your environment. The extension provides various ways for you to configure it so that it always matches your CI.
Here are the options:
black-formatter.importStrategy
allows you to use black from the environment. This means if you have different versions of black used in different projects, this will pick black from environment so always matching the project.black-formatter.path
this setting allows you to set path to a black formatter. If you us the same black formatter, you can install it into a global tools environment using tools like pipx
. Then point the extension to use black from that environment.The extension itself ships with black
but sometimes tools might release newer versions, and the above settings can help you use the one that works for you.
Diagnostic Data
Behaviour
Expected Behavior
Format with the extension will not fail the linting with latest Black
Actual Behavior
Black 24.4.2 does not passing the CI that uses Black 24.8.0
Logs:
Information on the failing CI