Skip to content
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 #9185

Closed
MichaReiser opened this issue Dec 18, 2023 · 0 comments · Fixed by #9922
Closed

Stabilize quote-style: preserve #9185

MichaReiser opened this issue Dec 18, 2023 · 0 comments · Fixed by #9922
Labels
formatter Related to the formatter

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Dec 18, 2023

Stabalize the new quote-style preserve and decide on its final semantics (does it preserve the quotes of multiline and docstrings)?

See #7525 and #8822

@MichaReiser MichaReiser added the formatter Related to the formatter label Dec 18, 2023
@MichaReiser MichaReiser added this to the Formatter: Stable milestone Dec 18, 2023
@konstin konstin changed the title Stabalize quote-style: preserve Stabilize quote-style: preserve Dec 18, 2023
MichaReiser added a commit that referenced this issue Feb 10, 2024
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
MichaReiser added a commit that referenced this issue Feb 12, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant