-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Put black config in explicit config #5947
Conversation
This lets editors etc use the correct config
Hi @max-sixty!
Additionally adding a Can you say a bit more about what you're trying to achieve here? If all you want is to use black in your IDE instead of as a pre-commit hook, may I suggest just configuring black directly in your IDE (VSCode / Pycharm))? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs further discussion
See: #5947 (comment)
I don't think that's the case, respectfully. In the existing code, pre-commit passes configs to black. In the proposed code, black already has the configs. So pre-commit is running with exactly the same configs in both cases. Note that the pre-commit tests pass; and feel free to have a go locally. This is the standard approach for using static tools with pre-commit, e.g. we've done this in https://github.com/pydata/xarray for years.
Right, but with the proposed approach, it avoids everyone having to add a repo-specific configuration themselves. It's friendlier to new contributors! Though I don't have a religious belief here. I noticed it when doing development on the repo, and thought it would be helpful to make it conform to best practice. But if the whole team has an aesthetic view against it, I would not be offended! |
My mistake @max-sixty -- I misremembered the process isolation pre-commit uses when running hooks as isolating them from non |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cheers @iknox-fa ! Appreciate your openness |
This lets editors etc use the correct config
resolves #5946
Description
Checklist
changie new
to create a changelog entry