Loading black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1364,7 +1364,7 @@ def whitespace(leaf: Leaf) -> str: # noqa C901 if not prevp or prevp.type == token.LPAR: return NO elif prev.type == token.EQUAL or prev.type == token.DOUBLESTAR: elif prev.type in {token.EQUAL, token.STAR, token.DOUBLESTAR}: return NO elif p.type == syms.decorator: Loading blib2to3/Grammar.txt +2 −2 Changes for blib2to3/Grammar.txt: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ arglist: argument (',' argument)* [','] # that precede iterable unpackings are blocked; etc. argument: ( test [comp_for] | test '=' test | '**' expr | star_expr ) '**' test | '*' test ) comp_iter: comp_for | comp_if comp_for: [ASYNC] 'for' exprlist 'in' or_test [comp_iter] Loading blib2to3/Grammar3.6.5.final.0.pickle −9 B (14.8 KiB) File changed.No diff preview for this file type. View original file View changed file tests/expression.diff +8 −3 Changes for tests/expression.diff: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ ] slice[0] slice[0:1] @@ -121,85 +135,119 @@ @@ -121,88 +135,122 @@ numpy[-(c + 1):, d] numpy[:, l[-2]] numpy[:, ::-1] Loading Loading @@ -184,6 +184,12 @@ async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) -print(* [] or [1]) + + +print(*[] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) -print(* lambda x: x) -for x, in (1,), (2,), (3,): ... -for y in (): ... -for z in (i for i in (1, 2, 3)): ... Loading Loading @@ -226,8 +232,7 @@ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -): - return True + + +print(*lambda x: x) +for (x,) in (1,), (2,), (3,): + ... +for y in (): Loading tests/expression.py +6 −0 Changes for tests/expression.py: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ def gen(): async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) print(* [] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) print(* lambda x: x) for x, in (1,), (2,), (3,): ... for y in (): ... for z in (i for i in (1, 2, 3)): ... Loading Loading @@ -402,6 +405,9 @@ async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) print(*[] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) print(*lambda x: x) for (x,) in (1,), (2,), (3,): ... for y in (): Loading Loading
black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1364,7 +1364,7 @@ def whitespace(leaf: Leaf) -> str: # noqa C901 if not prevp or prevp.type == token.LPAR: return NO elif prev.type == token.EQUAL or prev.type == token.DOUBLESTAR: elif prev.type in {token.EQUAL, token.STAR, token.DOUBLESTAR}: return NO elif p.type == syms.decorator: Loading
blib2to3/Grammar.txt +2 −2 Changes for blib2to3/Grammar.txt: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ arglist: argument (',' argument)* [','] # that precede iterable unpackings are blocked; etc. argument: ( test [comp_for] | test '=' test | '**' expr | star_expr ) '**' test | '*' test ) comp_iter: comp_for | comp_if comp_for: [ASYNC] 'for' exprlist 'in' or_test [comp_iter] Loading
blib2to3/Grammar3.6.5.final.0.pickle −9 B (14.8 KiB) File changed.No diff preview for this file type. View original file View changed file
tests/expression.diff +8 −3 Changes for tests/expression.diff: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ ] slice[0] slice[0:1] @@ -121,85 +135,119 @@ @@ -121,88 +135,122 @@ numpy[-(c + 1):, d] numpy[:, l[-2]] numpy[:, ::-1] Loading Loading @@ -184,6 +184,12 @@ async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) -print(* [] or [1]) + + +print(*[] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) -print(* lambda x: x) -for x, in (1,), (2,), (3,): ... -for y in (): ... -for z in (i for i in (1, 2, 3)): ... Loading Loading @@ -226,8 +232,7 @@ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -): - return True + + +print(*lambda x: x) +for (x,) in (1,), (2,), (3,): + ... +for y in (): Loading
tests/expression.py +6 −0 Changes for tests/expression.py: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ def gen(): async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) print(* [] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) print(* lambda x: x) for x, in (1,), (2,), (3,): ... for y in (): ... for z in (i for i in (1, 2, 3)): ... Loading Loading @@ -402,6 +405,9 @@ async def f(): await some.complicated[0].call(with_args=(True or (1 is not 1))) print(*[] or [1]) print(**{1: 3} if False else {x: x for x in range(3)}) print(*lambda x: x) for (x,) in (1,), (2,), (3,): ... for y in (): Loading