mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-08 13:05:13 +08:00
Don't give syntax errors for parenthesised kwargs <3.8
This commit is contained in:
1 parent
8bb211fafb
commit
a06521d912
2 files changed
+6
No files matched your search
@@ -742,6 +742,9 @@ class _AnnotatorRule(SyntaxRule):
|
||||
class _ArgumentRule(SyntaxRule):
|
||||
def is_issue(self, node):
|
||||
first = node.children[0]
|
||||
if self._normalizer.version < (3, 8):
|
||||
# a((b)=c) is valid in <3.8
|
||||
first = _remove_parens(first)
|
||||
if node.children[1] == '=' and first.type != 'name':
|
||||
if first.type == 'lambdef':
|
||||
# f(lambda: 1=1)
|
||||
|
||||
Reference in new issue
Block a user