May 12, 2022    Share on: Twitter | Facebook | HackerNews | Reddit

Black - keep single quotes for strings

See: Add --single-quote option · Issue #594 · psf/black · GitHub

Currently, it requires everyone who uses single quotes to run black and then have a second tool (we use pre-commit double-quote-string-fixer) to ensure that single quotes are being used consistently.

From black documentation:

If you are adopting Black in a large project with pre-existing string conventions (like the popular “single quotes for data, double quotes for human-readable strings”), you can pass --skip-string-normalization on the command line. This is meant as an adoption helper, avoid using this for new projects.