Skip to content

Commit a502115

Browse files
committed
[doc.py] Fix Wrong Indentation for pprint()
1 parent 4e4cdae commit a502115

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

odml/doc.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,22 @@ def get_terminology_equivalent(self):
141141
return None
142142
term = terminology.load(self.repository)
143143
return term
144-
def pprint(self, indent=2, max_depth=1, max_length=80, current_depth=0):
145-
"""
146-
Pretty print method to visualize Document-Section trees.
147-
148-
:param indent: number of leading spaces for every child Section or Property.
149-
:param max_depth: maximum number of hierarchical levels printed from the
150-
starting Section.
151-
:param max_length: maximum number of characters printed in one line.
152-
:param current_depth: number of hierarchical levels printed from the
153-
starting Section.
154-
"""
155-
doc_str = "[{} [{}] {}, sections: {}, repository: {}]".format(self.author, self.version,
156-
self.date, len(self._sections), self.repository)
157-
print(doc_str)
158144

159-
for s in self._sections:
160-
s.pprint(current_depth=current_depth+1, max_depth=max_depth,
161-
indent=indent, max_length=max_length)
145+
def pprint(self, indent=2, max_depth=1, max_length=80, current_depth=0):
146+
"""
147+
Pretty print method to visualize Document-Section trees.
148+
149+
:param indent: number of leading spaces for every child Section or Property.
150+
:param max_depth: maximum number of hierarchical levels printed from the
151+
starting Section.
152+
:param max_length: maximum number of characters printed in one line.
153+
:param current_depth: number of hierarchical levels printed from the
154+
starting Section.
155+
"""
156+
doc_str = "[{} [{}] {}, sections: {}, repository: {}]".format(self.author, self.version,
157+
self.date, len(self._sections), self.repository)
158+
print(doc_str)
159+
160+
for s in self._sections:
161+
s.pprint(current_depth=current_depth+1, max_depth=max_depth,
162+
indent=indent, max_length=max_length)

0 commit comments

Comments
 (0)