![]() This fixes a bug where a trailing comma would be added to a parenthesized return annotation changing its type to a tuple. Here's one case where this bug shows up: ``` def spam() -> ( this_is_a_long_type_annotation_which_should_NOT_get_a_trailing_comma ): pass ``` The root problem was that the type annotation was treated as if it was a parameter & import list (is_body=True to linegen::bracket_split_build_line) where a trailing comma is usually fine. Now there's another check in the aforementioned function to make sure the body it's operating on isn't a return annotation before truly adding a trailing comma. |
||
---|---|---|
.. | ||
black | ||
black_primer | ||
blackd | ||
blib2to3 |