Commit bbc09a4f authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Consider stars in testlist_star_expr unpacking (because they are)

Fixes #297
parent 728e5a2f
Loading
Loading
Loading
Loading
+1 −0
Changes for black.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -768,6 +768,7 @@ def show(cls, code: str) -> None:
    syms.dictsetmaker,
    syms.listmaker,
    syms.testlist_gexp,
    syms.testlist_star_expr,
}
TEST_DESCENDANTS = {
    syms.test,
+2 −1
Changes for tests/expression.diff: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@
 slice[0:1:2]
 slice[:]
 slice[:-1]
@@ -133,107 +156,159 @@
@@ -133,108 +156,160 @@
 numpy[-(c + 1) :, d]
 numpy[:, l[-2]]
 numpy[:, ::-1]
@@ -183,6 +183,7 @@
 c = 1
 d = (1,) + a + (2,)
 e = (1,).count(1)
 f = 1, *range(10)
-what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
-what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
-result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
+2 −0
Changes for tests/expression.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@
c = 1
d = (1,) + a + (2,)
e = (1,).count(1)
f = 1, *range(10)
what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
@@ -426,6 +427,7 @@ async def f():
c = 1
d = (1,) + a + (2,)
e = (1,).count(1)
f = 1, *range(10)
what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
    vars_to_remove
)