-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilize quote-style preserve
#9922
Conversation
|
is this PR is going to merge for next patch release? |
Yes, this will ship as part of the next patch release. Changing the semantic is is in line with our versioning policy because
|
This PR removes the `--preview` requirement for `quote-style: preserve` and changes the semantics of the style to apply to all strings (including triple quoted and doc-strings). The motivation for changing the semantic to apply to all strings is: * The option is intended as a replacement for black's `--skip-string-normalization` that applies to all strings * The option is intended for projects that can't enforce a consistent quote style. These are mainly projects that want to use a formatter but can't agree on a single quote style or changing all strings leads to too large diffs. Allowing these users to use a formatter is more important than being opinionated on the quote style * We received reports that users were surprised that `preserve` didn't apply to all strings. Fixes #9185
6a79983
to
2689a15
Compare
This PR removes the
--preview
requirement forquote-style: preserve
and changes the semantics ofthe style to apply to all strings (including triple quoted and doc-strings).
The motivation for changing the semantic to apply to all strings is:
--skip-string-normalization
that applies to all stringspreserve
didn't apply to all strings.Fixes #9185
Test Plan
cargo test
. Reviewed the snapshot changes. Tested the CLI that usingquote-style: preserve
without the preview flag no longer aborts.