-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
black -C and black disagrees on some formatting #2488
Labels
T: bug
Something isn't working
Comments
maybe |
I think this is a bug in the magic comma handling, that def foo():
assert TaskGroup.add_tasks(
TaskWithArguments_name,
redactium.tasklib.TT_USER,
redactium.tasklib.TP_DEFAULT,
[
{"test_argument1": "mango", "test_argument2": "banana"},
{"test_argument1": "strawberry", "test_argument2": "apple"},
{"test_argument1": "pinapple", "test_argument2": "tomato"},
], # this comma is considered magic - even though the Call node is already exploded
) == [1, 2, 3] |
Closed
nipunn1313
added a commit
to nipunn1313/black
that referenced
this issue
Oct 20, 2021
Fixes psf#2488 and psf#2518 Admittedly, it doesn't fix the underlying issue. There are three expected-failure tests in test_black.py, which prove the issue (test_trailing_comma_optional_parens_stability{1,2,3}) This is a (somewhat terrible) bandaid which runs the entire formatter twice to work around this problem. The problem appears preexisting based on the disabled tests and the comments, so this feels like a reasonable step-in-the-right-direction.
nipunn1313
added a commit
to nipunn1313/black
that referenced
this issue
Oct 20, 2021
Fixes psf#2488 and psf#2518 Admittedly, it doesn't fix the underlying issue. There are three expected-failure tests in test_black.py, which prove the issue (test_trailing_comma_optional_parens_stability{1,2,3}) This is a (somewhat terrible) bandaid which runs the entire formatter twice to work around this problem. The problem appears preexisting based on the disabled tests and the comments, so this feels like a reasonable step-in-the-right-direction.
nipunn1313
added a commit
to nipunn1313/black
that referenced
this issue
Oct 20, 2021
Fixes psf#2488 and psf#2518 Admittedly, it doesn't fix the underlying issue. There are three expected-failure tests in test_black.py, which prove the issue (test_trailing_comma_optional_parens_stability{1,2,3}) This is a (somewhat terrible) bandaid which runs the entire formatter twice to work around this problem. The problem appears preexisting based on the disabled tests and the comments, so this feels like a reasonable step-in-the-right-direction.
nipunn1313
added a commit
to nipunn1313/black
that referenced
this issue
Oct 20, 2021
Fixes psf#2488 and psf#2518 Admittedly, it doesn't fix the underlying issue. There are three expected-failure tests in test_black.py, which prove the issue (test_trailing_comma_optional_parens_stability{1,2,3}) This is a (somewhat terrible) bandaid which runs the entire formatter twice to work around this problem. The problem appears preexisting based on the disabled tests and the comments, so this feels like a reasonable step-in-the-right-direction.
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
black -C
andblack
disagrees on some formattingTo Reproduce
black -C
andblack
should format this file in the same wayhttps://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AIAAO1dAD2IimZxl1N_WlbvK5V9KEd0suDTtKdXyW-KHSefTva28g9sA_fTOonSmUqcsLdgGrThmnfIa0ZqFymHSupEErhua5AxikFyHCtVRGOILPcvASqyDBaMOp19d4DxRh451dFENfRZeJ-oUYRDovoKZ_722VcJPCyPBxVeTCUGmbNRgd5PTagQdR5nX9Ux8Ve94f97sP695umL5Xw6qOPD__ojyWDC3496ha6unOI9Ima0nf4FmJfHndK9Fw7vZ5ZwBNqVHebc_vtSTq2uRIFZlrE9LrK995wlOSf8UGCYqTC_trqwjU3Fpk4OPxPvrQAAAAC-j1dV13dOYQABiQKBBAAAL7vG0rHEZ_sCAAAAAARZWg==
Environment
Any - reproducible on black.now.sh
Does this bug also happen on main?
yes https://black.vercel.app/?version=main&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AIAAO1dAD2IimZxl1N_WlbvK5V9KEd0suDTtKdXyW-KHSefTva28g9sA_fTOonSmUqcsLdgGrThmnfIa0ZqFymHSupEErhua5AxikFyHCtVRGOILPcvASqyDBaMOp19d4DxRh451dFENfRZeJ-oUYRDovoKZ_722VcJPCyPBxVeTCUGmbNRgd5PTagQdR5nX9Ux8Ve94f97sP695umL5Xw6qOPD__ojyWDC3496ha6unOI9Ima0nf4FmJfHndK9Fw7vZ5ZwBNqVHebc_vtSTq2uRIFZlrE9LrK995wlOSf8UGCYqTC_trqwjU3Fpk4OPxPvrQAAAAC-j1dV13dOYQABiQKBBAAAL7vG0rHEZ_sCAAAAAARZWg==
Additional context
The text was updated successfully, but these errors were encountered: