-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ENH: incremental changes to modify only code neighboring already changed lines #370
Comments
This is something we explicitly don't support. Incremental style changes are against PEP 8's philosophy of staying consistent within a file. They also mix formatting changes with semantic changes, making review harder than it needs to be. See #134 for a longer explanation. Reformat your entire project in one go. Then there is a single commit that is trivial to omit using See also: #320 |
Also FYI, I wrote darker for applying Black formatting only to lines which have changed in the Git working tree since the last commit. |
Idea: allow running black with a
-n --dry-run=filename
option and store the resulting changeset. Then allow using this in a subsequent run to only update newly found changes.Rational: In a workflow on an established managed repository, this would allow running black incrementally, reformatting only parts of the code that have been changed, minimizing git churn and blame lines.
The text was updated successfully, but these errors were encountered: