Loading black.py +12 −2 Changes for black.py: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2064,12 +2064,22 @@ def right_hand_split( ): omit = {id(closing_bracket), *omit} delimiter_count = body.bracket_tracker.delimiter_count_with_priority() first = body.leaves[0] last = body.leaves[-1] if ( delimiter_count == 0 or delimiter_count == 1 and ( body.leaves[0].type in OPENING_BRACKETS or body.leaves[-1].type in CLOSING_BRACKETS first.type in OPENING_BRACKETS or last.type == token.RPAR or last.type == token.RBRACE or ( # don't use indexing for omitting optional parentheses; # it looks weird last.type == token.RSQB and last.parent and last.parent.type != syms.trailer ) ) ): try: Loading tests/composition.py +3 −5 Changes for tests/composition.py: 3 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -32,11 +32,6 @@ def test(self) -> None: # Another ): print(i) if _cfg_target_split > [int(x) for x in cur_target.split(".")]: my_msg = "$MACOSX_DEPLOYMENT_TARGET mismatch: " 'now "%s" but "%s" during configure' % ( cur_target, _cfg_target, ) def omitting_trailers(self) -> None: get_collection( Loading @@ -48,6 +43,9 @@ def omitting_trailers(self) -> None: d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][ 22 ] assignment = ( some.rather.elaborate.rule() and another.rule.ending_with.index[123] ) def easy_asserts(self) -> None: assert { Loading Loading
black.py +12 −2 Changes for black.py: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2064,12 +2064,22 @@ def right_hand_split( ): omit = {id(closing_bracket), *omit} delimiter_count = body.bracket_tracker.delimiter_count_with_priority() first = body.leaves[0] last = body.leaves[-1] if ( delimiter_count == 0 or delimiter_count == 1 and ( body.leaves[0].type in OPENING_BRACKETS or body.leaves[-1].type in CLOSING_BRACKETS first.type in OPENING_BRACKETS or last.type == token.RPAR or last.type == token.RBRACE or ( # don't use indexing for omitting optional parentheses; # it looks weird last.type == token.RSQB and last.parent and last.parent.type != syms.trailer ) ) ): try: Loading
tests/composition.py +3 −5 Changes for tests/composition.py: 3 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -32,11 +32,6 @@ def test(self) -> None: # Another ): print(i) if _cfg_target_split > [int(x) for x in cur_target.split(".")]: my_msg = "$MACOSX_DEPLOYMENT_TARGET mismatch: " 'now "%s" but "%s" during configure' % ( cur_target, _cfg_target, ) def omitting_trailers(self) -> None: get_collection( Loading @@ -48,6 +43,9 @@ def omitting_trailers(self) -> None: d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][ 22 ] assignment = ( some.rather.elaborate.rule() and another.rule.ending_with.index[123] ) def easy_asserts(self) -> None: assert { Loading