Skip to content

Commit 9a2a85f

Browse files
committed
[fix] missing cases
1 parent f4d5a81 commit 9a2a85f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

baron/grammator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ def argument_star(pack):
592592
(star, test,) = pack
593593
return [{
594594
"type": "list_argument",
595+
"annotation": {},
596+
"annotation_first_formatting": [],
597+
"annotation_second_formatting": [],
595598
"formatting": star.hidden_tokens_after,
596599
"value": test,
597600
}]
@@ -601,6 +604,9 @@ def argument_star_star(pack):
601604
(double_star, test,) = pack
602605
return [{
603606
"type": "dict_argument",
607+
"annotation": {},
608+
"annotation_first_formatting": [],
609+
"annotation_second_formatting": [],
604610
"formatting": double_star.hidden_tokens_after,
605611
"value": test,
606612
}]

tests/test_grammator_operators.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9924,6 +9924,9 @@ def test_call_two_star_arg():
99249924
},
99259925
{
99269926
"type": "list_argument",
9927+
"annotation": {},
9928+
"annotation_first_formatting": [],
9929+
"annotation_second_formatting": [],
99279930
"formatting": [],
99289931
"value": {
99299932
"type": "name",
@@ -9999,6 +10002,9 @@ def test_call_two_star_arg_kwarg():
999910002
},
1000010003
{
1000110004
"type": "list_argument",
10005+
"annotation": {},
10006+
"annotation_first_formatting": [],
10007+
"annotation_second_formatting": [],
1000210008
"formatting": [],
1000310009
"value": {
1000410010
"type": "name",
@@ -10012,6 +10018,9 @@ def test_call_two_star_arg_kwarg():
1001210018
},
1001310019
{
1001410020
"type": "dict_argument",
10021+
"annotation": {},
10022+
"annotation_first_formatting": [],
10023+
"annotation_second_formatting": [],
1001510024
"formatting": [],
1001610025
"value": {
1001710026
"type": "name",

0 commit comments

Comments
 (0)