-
Notifications
You must be signed in to change notification settings - Fork 2.6k
--line-ranges
bad behavior and internal errors
#4033
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
Labels
T: bug
Something isn't working
Comments
Thanks for the report! cc @yilei |
I'll investigate. On the surface this is a very strange bug and only reproducible if every line is the same. If I slightly change the content of the string for each line then it works:
|
Probably an issue with the diffing algorithm in |
Ah! Thank you for untangling my misdiagnosis. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I can't get the recently-merged
--line-ranges
command line option to work at all. It either produces incorrect results, or produces an internal error.To Reproduce
Five lines of input causes an internal error
(long lines of output, the error message & .log content, wrapped by me for readability)
4 lines of input completes, but formats the wrong line range
Expected behavior
I expect only lines 2 and 3 to be formatted, but instead 2-4 have been formatted.
Environment
I'm using a version of Black cloned from Github's latest main:
I installed it using
pipx install -e .
on a cloned source tree.Additional context
I don't believe I have any active config.
The text was updated successfully, but these errors were encountered: