But I don’t like unnecessary different levels of reality (code one way, commit another) and hitting shift quote all those times sucks.
It’s funny how an “opinionated formatter” sounds great in theory until you realize the opinion is “wrong.”
But I don’t like unnecessary different levels of reality (code one way, commit another) and hitting shift quote all those times sucks.
It’s funny how an “opinionated formatter” sounds great in theory until you realize the opinion is “wrong.”
It’s not a big deal to me as I don’t care too much (similar to tabs vs space). I have a preference but would likely spend zero time caring if my team were trying to decide and would never in a million years try to change someone else’s project.
"this", "that", "and", "the", "other"
vs 'this', 'that', 'and', 'the', 'other'
However, in Ruby, PHP, Groovy, and JavaScript single quotes have actual functional advantages, either through simpler syntax abilities, or by not requiring escaping double quotes for HTML/XML.In code, I prefer whichever style tends to produce the fewest escape-sequence situations.
If the code contains hard-coded strings, that's usually double-quotes, though not always.
Otherwise I guess it makes less sense to want to push +shift+ everytime you enter a quote on a Python dict key, for example, versus using the single quote.
Addendum for clarification: part of the appeal of autoformatters is that what you type into your editor does not matter. I don't see the "difference of reality" because thanks to black, I don't need to care.
I’m happy to adopt to other folks projects as I don’t want to convert anyone. But purposely working on my own projects with a quote different than the record seems like an extra effort, even if minimal.
I don’t think Black’s dream of all Python looking the same is that worthwhile. Especially if people don’t like some of Black’s decisions.
I might use Blacker if it existed, but I’m currently ok with not using Black and just sticking with flake8.
Also it depends what you are using it for, 1) to keep your team focused, or 2) enable anyone in the python community to feel comfortable jumping into the project. Given not everyone uses black, #2 is not as common as you'd think.