Closed reinout closed 5 years ago
I have experimented as well a few weeks or so ago, and like it too.
We can add a pyproject.toml
file with as contents:
[tool.black]
skip-string-normalization = true
See comments in this CMFPlone PR. The current Plone style guide recommends single quotes, so in Plone we would need such a config, to not make cleanups by black
crazy big.
It sounds like you want to run black on zest.releaser's own codebase. Good idea, but then we should first merge/reject/fix/cleanup all the outstanding pull requests. (And I'm fine with the double quotes, as single quotes have a tendency to show up in strings quite a lot (like in "Reinout's great idea"
).
This issue is about all the other projects out there that use zest.releaser. We inject a single-quoted version = '1.0'
into the setup.py
. We'd be forcing the skip-string-normalization = True
setting on all those projects (which I don't want).
But... reading that plone PR, I get the impression that it is fine to just use double quotes in our injected version string? Plone's black settings won't complain about it. Would that be acceptable?
@mauritsvanrees: you don't need to release yet, I want to look at #299 right now :-)
I'm experimenting with the "black" (https://black.readthedocs.io/) code formatter and I like it.
One problem: black prefers double quotes, like this:
but zest.releaser writes:
I think we ought to fix this. Using double quotes ourselves would be the easiest solution. Alternatively we'd have to detect the quoting style.