3 ms·
I understand that. And this is what I like in Black. But the single quotes thing is really up to debate. When you use it with other tools such as flake8 or pyli
by hivacruz 5y ago
I understand that. And this is what I like in Black. But the single quotes thing is really up to debate. When you use it with other tools such as flake8 or pylint, you have to disable a bunch of things to make them work together because no one agrees on this point.
- j1elo 5y agoI'm not a full time Python dev so I won't (can't) get into what choice has more merits. But there is this: https://black.readthedocs.io/en/latest/the_black_code_style/current_style.html#strings https://black.readthedocs.io/en/latest/the_black_code_style/... Seen from outside, I think the double quotes are just the natural form of strings in lots of other places, at least in those that come from the same family than C (C++, Java, C#, Rust, just to name a few) Also Prettier.js (which I'd call the "Black of JavaScript") also settled on double quotes. So we're left with a de facto consensus across programming languages as a whole, which kind of feels nice.
- historyforsale 5y ago> When you use it with other tools such as flake8 or pylint, you have to disable a bunch of things to make them work together Using Flake8 with Black requires only two configuration options [1], while Pylint requires three [2]. If you prefer to use Black with --line-length 79, then it's down to a single configuration option for Flake8 or two for Pylint. [1]: https://black.readthedocs.io/en/latest/guides/using_black_with_other_tools.html#flake8 https://black.readthedocs.io/en/latest/guides/using_black_wi... [2]: https://black.readthedocs.io/en/latest/guides/using_black_with_other_tools.html#pylint https://black.readthedocs.io/en/latest/guides/using_black_wi...