You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discovered in #164, Darker strips all-whitespace Python files which have been modified. This is different from Black which leaves them untouched. See also this comment to psf/black#779.
Actually, Black developers seem to agree in psf/black#2382 that the behavior is currently wrong, and Black should format all-whitespace files as just a single newline.
So instead of matching Black's current behavior, we could just fix Darker to truncate all-whitespace files to a single newline instead of a zero-length file.
As discovered in #164, Darker strips all-whitespace Python files which have been modified. This is different from Black which leaves them untouched. See also this comment to psf/black#779.
We could replace (in
darker.black_diff.run_black()
):with
to match
black
's behavior on all-whitespace files. The other option is to handle all-whitespace files indarker
just likeblack
does:Which approach to choose should depend on Black's possible choice of a public Python API (psf/black#779).
The text was updated successfully, but these errors were encountered: