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

Add a --single-quotes option to prefer single quotes #633

Closed
wants to merge 1 commit into from

Conversation

davvid
Copy link

@davvid davvid commented Dec 8, 2018

Now there are no excuses not to use black.
Fixes #594

Copy link
Contributor

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I find double quotes easier to type on my keyboard layout, but here's some typos)

README.md Outdated Show resolved Hide resolved
black.py Outdated Show resolved Hide resolved
@davvid davvid force-pushed the single-quotes branch 2 times, most recently from ccd0797 to bd6e829 Compare December 8, 2018 08:17
Add support for `black -s|--single-quotes`.

Fixes psf#594
@ambv
Copy link
Collaborator

ambv commented Dec 8, 2018

Thank you for your contribution but we won't be adding this to Black.

@ambv ambv closed this Dec 8, 2018
@richardARPANET
Copy link

Support for this has been added to https://github.com/odwyersoftware/brunette 👍

@rspadim
Copy link

rspadim commented Mar 28, 2022

Could the brunette --single-quotes be imported to black?

@y4rr
Copy link

y4rr commented May 12, 2022

Is there any explanation as to why this option not being added?

Your main page says,

Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

Actually, after using your tool, I don't have any time and mental energy left at all, because I use single quotes everywhere, as they are easier to type on my keyboard.

@harahu
Copy link

harahu commented Nov 1, 2022

Actually, after using your tool, I don't have any time and mental energy left at all, because I use single quotes everywhere, as they are easier to type on my keyboard.

Not sure I understand why you feel this is an issue, @y4rr. After all, since black will gladly swap out your quotes, there's nothing stopping you from continuing to type single quotes. Nobody is forcing you to type double quotes.

@manulera
Copy link

manulera commented Mar 5, 2024

This feels really strange. Why not allow maintainers to harmonise string quotes to single if they want to do so? Really sad to see that a working implementation was discarded on the basis of what seems to be personal preference of the lead maintainer.

@Zananok
Copy link

Zananok commented Jun 15, 2024

Black is like the original vim. It's the maintainer's project, not a community project like nvim.
I respect the maintainer's decision and am simply moving to a community project.

My humble suggestion on further friction is to always keep your preference as the default and explain why your opinion is best in the readme.md, yet allow PRs that don't affect your default as a form of extra config when it is highly desirable.

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.

Add --single-quote option
9 participants