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

Make quote style configurable #1003

Closed
wants to merge 1 commit into from
Closed

Make quote style configurable #1003

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 3, 2019

This allows the quote style to be configurable.

Why is this necessary?

  1. typing double quotes is more work than typing single quotes. I can type a single quote with a single key press. Typing double quotes requires holding shift and pressing another key. That seems like an awful lot of effort that isn't required.

  2. Trying to incorporate Black into an existing project is a PITA if you're already established using single quotes. It creates huge diffs that react badly with concurrent changes, resulting in merge conflicts that just aren't necessary.

Default behaviour is, of course, double quotes.

@zsol
Copy link
Collaborator

zsol commented Sep 4, 2019

Thanks for putting in the work, but this has been discussed at length in #118 and we won't be adding an option to configure the quote style.

@zsol zsol closed this Sep 4, 2019
@hugovk
Copy link
Contributor

hugovk commented Sep 4, 2019

2. Trying to incorporate Black into an existing project is a PITA if you're already established using single quotes. It creates huge diffs that react badly with concurrent changes, resulting in merge conflicts that just aren't necessary.

This is the Black option for you:

  -S, --skip-string-normalization
                                  Don't normalize string quotes or prefixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants