3 ms·
Interesting, Black docs specifically calls out an option for users with that exact use case for mixing single and double-quoted strings (although they do recomm
by Qub3d 5y ago
Interesting, Black docs specifically calls out an option for users with that exact use case for mixing single and double-quoted strings (although they do recommend dispensing of it eventually): https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#strings https://black.readthedocs.io/en/stable/the_black_code_style/...
> 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.
- MereInterest 5y agoThank you, and I hadn't known about that. That sounds sort of like the options for Prettier that xigol mentioned, where they're maintained in order to get a wider user base, but not recommended as they fragment the long-term coding styles. At this point, I've accepted the double-quote strings and am trying to make a habit of using enums instead, but it's good to know that the options exist. [0] https://news.ycombinator.com/item?id=30132012 https://news.ycombinator.com/item?id=30132012