mirror of
https://github.com/davidhalter/parso.git
synced 2026-09-06 15:06:57 +08:00
Get rid of the old star checking logic
This commit is contained in:
@@ -861,22 +861,10 @@ class _ArglistRule(SyntaxRule):
|
|||||||
arg_set = set()
|
arg_set = set()
|
||||||
kw_only = False
|
kw_only = False
|
||||||
kw_unpacking_only = False
|
kw_unpacking_only = False
|
||||||
is_old_starred = False
|
|
||||||
# In python 3 this would be a bit easier (stars are part of
|
|
||||||
# argument), but we have to understand both.
|
|
||||||
for argument in node.children:
|
for argument in node.children:
|
||||||
if argument == ',':
|
if argument == ',':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if argument in ('*', '**'):
|
|
||||||
# Python < 3.5 has the order engraved in the grammar
|
|
||||||
# file. No need to do anything here.
|
|
||||||
is_old_starred = True
|
|
||||||
continue
|
|
||||||
if is_old_starred:
|
|
||||||
is_old_starred = False
|
|
||||||
continue
|
|
||||||
|
|
||||||
if argument.type == 'argument':
|
if argument.type == 'argument':
|
||||||
first = argument.children[0]
|
first = argument.children[0]
|
||||||
if _is_argument_comprehension(argument) and len(node.children) >= 2:
|
if _is_argument_comprehension(argument) and len(node.children) >= 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user