Get rid of error leafs early.

This commit is contained in:
Dave Halter
2017-07-08 23:16:52 +02:00
parent b8c79f0be5
commit ee1184e7c4

View File

@@ -364,7 +364,8 @@ class PEP8Normalizer(Normalizer):
def _visit_part(self, part, spacing, leaf):
value = part.value
type_ = part.type
# TODO get rid of error_leaf
if type_ == 'error_leaf':
return
if value == ',' and part.parent.type == 'dictorsetmaker':
self._indentation_tos = self._indentation_tos.parent