mirror of
https://github.com/davidhalter/parso.git
synced 2026-04-26 09:26:01 +08:00
Revision on assignment errors (#97)
* Revision on assignment expression errors * added rule for __debug__ (should be a keyword) * reviewed error messages * added new failing samples * Adjustment upon Dave's review * rewind several changes in assignment errors * patched is_definition: command not found for assignment expressions * patched Python 2 inconsistent error messages in test_python_errors.py: command not found
This commit is contained in:
@@ -233,6 +233,8 @@ class Name(_LeafWithoutNewlines):
|
||||
while node is not None:
|
||||
if node.type == 'suite':
|
||||
return None
|
||||
if node.type == 'namedexpr_test':
|
||||
return node.children[0]
|
||||
if node.type in _GET_DEFINITION_TYPES:
|
||||
if self in node.get_defined_names(include_setitem):
|
||||
return node
|
||||
|
||||
Reference in New Issue
Block a user