mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-26 21:09:22 +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()
|
||||
kw_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:
|
||||
if argument == ',':
|
||||
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':
|
||||
first = argument.children[0]
|
||||
if _is_argument_comprehension(argument) and len(node.children) >= 2:
|
||||
|
||||
Reference in New Issue
Block a user