parent
e41844feb7
commit
19d69b34e5
@ -495,6 +495,8 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md).
|
|||||||
|
|
||||||
* fixed parsing of unaligned standalone comments (#99, #112)
|
* fixed parsing of unaligned standalone comments (#99, #112)
|
||||||
|
|
||||||
|
* fixed placement of dictionary unpacking inside dictionary literals (#111)
|
||||||
|
|
||||||
### 18.4a1
|
### 18.4a1
|
||||||
|
|
||||||
* added `--quiet` (#78)
|
* added `--quiet` (#78)
|
||||||
|
2
black.py
2
black.py
@ -1498,7 +1498,7 @@ def is_split_before_delimiter(leaf: Leaf, previous: Leaf = None) -> int:
|
|||||||
if (
|
if (
|
||||||
leaf.type in VARARGS
|
leaf.type in VARARGS
|
||||||
and leaf.parent
|
and leaf.parent
|
||||||
and leaf.parent.type in {syms.argument, syms.typedargslist}
|
and leaf.parent.type in {syms.argument, syms.typedargslist, syms.dictsetmaker}
|
||||||
):
|
):
|
||||||
# * and ** might also be MATH_OPERATORS but in this case they are not.
|
# * and ** might also be MATH_OPERATORS but in this case they are not.
|
||||||
# Don't treat them as a delimiter.
|
# Don't treat them as a delimiter.
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
]
|
]
|
||||||
slice[0]
|
slice[0]
|
||||||
slice[0:1]
|
slice[0:1]
|
||||||
@@ -114,78 +123,104 @@
|
@@ -114,79 +123,113 @@
|
||||||
numpy[-(c + 1):, d]
|
numpy[-(c + 1):, d]
|
||||||
numpy[:, l[-2]]
|
numpy[:, l[-2]]
|
||||||
numpy[:, ::-1]
|
numpy[:, ::-1]
|
||||||
@ -123,6 +123,16 @@
|
|||||||
+((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
|
+((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
|
||||||
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
||||||
(*starred)
|
(*starred)
|
||||||
|
-{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs} # no trailing comma, this file is not 3.6+
|
||||||
|
+{
|
||||||
|
+ "id": "1",
|
||||||
|
+ "type": "type",
|
||||||
|
+ "started_at": now(),
|
||||||
|
+ "ended_at": now() + timedelta(days=10),
|
||||||
|
+ "priority": 1,
|
||||||
|
+ "import_session_id": 1,
|
||||||
|
+ **kwargs
|
||||||
|
+} # no trailing comma, this file is not 3.6+
|
||||||
a = (1,)
|
a = (1,)
|
||||||
b = 1,
|
b = 1,
|
||||||
c = 1
|
c = 1
|
||||||
|
@ -127,6 +127,7 @@
|
|||||||
((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
|
((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
|
||||||
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
||||||
(*starred)
|
(*starred)
|
||||||
|
{"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs} # no trailing comma, this file is not 3.6+
|
||||||
a = (1,)
|
a = (1,)
|
||||||
b = 1,
|
b = 1,
|
||||||
c = 1
|
c = 1
|
||||||
@ -331,6 +332,15 @@ async def f():
|
|||||||
((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
|
((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
|
||||||
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
(((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
|
||||||
(*starred)
|
(*starred)
|
||||||
|
{
|
||||||
|
"id": "1",
|
||||||
|
"type": "type",
|
||||||
|
"started_at": now(),
|
||||||
|
"ended_at": now() + timedelta(days=10),
|
||||||
|
"priority": 1,
|
||||||
|
"import_session_id": 1,
|
||||||
|
**kwargs
|
||||||
|
} # no trailing comma, this file is not 3.6+
|
||||||
a = (1,)
|
a = (1,)
|
||||||
b = 1,
|
b = 1,
|
||||||
c = 1
|
c = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user