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

Surveying defaults #1812

Open
5 tasks
abitrolly opened this issue Sep 20, 2021 · 3 comments
Open
5 tasks

Surveying defaults #1812

abitrolly opened this issue Sep 20, 2021 · 3 comments

Comments

@abitrolly
Copy link

If I say that this is the defaults the most users want, what are the chances for defaults to be changed?

[tool.isort]
profile = 'black'
lines_between_types = 1
combine_as_imports = true

There is actually a way to survey the defaults.

  1. Have a page in docs with instructions
  2. Add an option survey_defaults = true
  3. Instruction should say "To participate in the GitHub survey of default options, move your config into pyproject.toml and add survey_defaults=true to it. This option will signal that these are the options that you want to see as default."
  4. Run campaign for a year
  5. Use GitHub search https://github.com/search?q=filename%3Apyproject.toml+path%3A%2F+survey_defaults&type=Code to find submitted configs and build stats out of them
@timothycrosley
Copy link
Member

I'm pretty on board with changing the defaults to

[tool.isort]
profile = 'black'
combine_as_imports = true

for isort 6+. Or more directly, making combine_as_imports true part of the black profile, and making isort default to using the black profile. I haven't seen much usage of lines_between_types = 1, but I am open to being wrong there and would love any additional input

@WhyNotHugo
Copy link

I'm a fan of sticking to defaults, so only change these settings so they align with black.

[tool.isort]
profile = black
force_single_line = true

force_single_line aligns with black's mentality of "reducing merge conflicts" and also maximises readability.
Without it unreadable merge conflicts pop up continuously, and they're a pain to deal with.

@timothycrosley
Copy link
Member

timothycrosley commented Sep 29, 2021

@WhyNotHugo, you know how I feel about this, and certainly you must know that your argument of it being along black's mentality is only true from one perspective, but not true from just as many others.

#1791 (comment)

I don't feel as an owner who would push his way on others, so if I genuinely felt or there was considerable usage of that setting across the community I would entertain it. As it is currently, I don't see it too often and I think that, your way of thinking about it while certainly true for you, isn't the community consensus, and most people prefer the imports to be grouped and that most people see the absence of that setting as much more aligned with how black formats.

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

No branches or pull requests

3 participants