mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
For now the normalizer just does something stupid. Removing the whitespace.
This commit is contained in:
@@ -14,7 +14,7 @@ class PEP8Normalizer(Normalizer):
|
||||
Normalizing to PEP8. Not really implemented, yet.
|
||||
"""
|
||||
def normalize(self, leaf):
|
||||
return leaf.prefix + leaf.value
|
||||
return leaf.value
|
||||
|
||||
def iter_errors(self, leaf):
|
||||
return iter([])
|
||||
|
||||
@@ -167,7 +167,7 @@ class NodeOrLeaf(object):
|
||||
try:
|
||||
children = self.children
|
||||
except AttributeError:
|
||||
return normalizer(self)
|
||||
return normalizer.normalize(self)
|
||||
else:
|
||||
return ''.join(child.normalize(normalizer) for child in children)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user