mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-23 05:07:07 +08:00
Get rid of error leafs early.
This commit is contained in:
1 parent
b8c79f0be5
commit
ee1184e7c4
1 file changed
+2
-1
@@ -364,7 +364,8 @@ class PEP8Normalizer(Normalizer):
|
|||||||
def _visit_part(self, part, spacing, leaf):
|
def _visit_part(self, part, spacing, leaf):
|
||||||
value = part.value
|
value = part.value
|
||||||
type_ = part.type
|
type_ = part.type
|
||||||
# TODO get rid of error_leaf
|
if type_ == 'error_leaf':
|
||||||
|
return
|
||||||
|
|
||||||
if value == ',' and part.parent.type == 'dictorsetmaker':
|
if value == ',' and part.parent.type == 'dictorsetmaker':
|
||||||
self._indentation_tos = self._indentation_tos.parent
|
self._indentation_tos = self._indentation_tos.parent
|
||||||
|
|||||||
Reference in new issue
Block a user