mirror of
https://github.com/davidhalter/parso.git
synced 2026-02-11 20:52:00 +08:00
Get rid of error leafs early.
This commit is contained in:
@@ -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