To Reproduce Steps to reproduce the behavior:
example.py# A set literal with a trailing comma.
{
"Something": {"hi": {"My", "set", "items",}},
"Something else": {},
}
black example.py
All done! ✨ 🍰 ✨
1 file left unchanged.
flake8 on it:flake8 example.py
example.py:3:46: E231 missing whitespace after ','
Expected behavior A clear and concise description of what you expected to happen.
Expecting not to get any flake8 errors barring the different line length setting, and edge cases where black is unable to condense output under 88 chars.
Environment (please complete the following information):
Python 3.8.1
black, version 19.10b1.dev26+g8fef74c
flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.8.1 on Linux
Also getting the same behaviour with black-19.10b0.
This is a bug related to #1288 and will be fixed as part of that issue. Thank you for the time to report this!
In the mean time, if you remove the trailing comma by hand, Black won't re-add it.
Most helpful comment
This is a bug related to #1288 and will be fixed as part of that issue. Thank you for the time to report this!
In the mean time, if you remove the trailing comma by hand, Black won't re-add it.