Skip to content

Commit e839f57

Browse files
Make 4 spaces the default indent for AsStringVisitor
1 parent 2a767fb commit e839f57

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

astroid/nodes/as_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
class AsStringVisitor:
4848
"""Visitor to render an Astroid node as a valid python code string"""
4949

50-
def __init__(self, indent):
50+
def __init__(self, indent=" "):
5151
self.indent = indent
5252

5353
def __call__(self, node):

astroid/nodes/node_ng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def eq(self, value):
499499

500500
def as_string(self) -> str:
501501
"""Get the source code that this node represents."""
502-
return AsStringVisitor(" ")(self)
502+
return AsStringVisitor()(self)
503503

504504
def repr_tree(
505505
self,

0 commit comments

Comments
 (0)