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
This is part of #1288. The 'Magic Trailing Comma' doesn't work on nested collections yet.
However, there's issues with it so far. It doesn't yet work on nested collections. Worse yet, in those cases it leaves trailing commas behind when a collection ends up compressed into one line. We need to fix those edge cases to make it generally dependable.
Describe the bug A clear and concise description of what the bug is.
If a dict is nested within another dict, it doesn't reformat correctly.
To Reproduce Steps to reproduce the behavior:
Take this:
Pass it through black:
This has a trailing comma, which violates https://www.flake8rules.com/rules/E231.html
Expected behavior A clear and concise description of what you expected to happen.
Either the snippet unchanged (which is what happens when the dictionary isn't nested)
Or a single-line dict with no trailing comma (
black
on this returns with no change)Environment (please complete the following information):
Does this bug also happen on master?
Yes
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: