MCPcopy Create free account
hub / github.com/aws/aws-cli / _lstrip

Method _lstrip

awscli/bcdoc/docstringparser.py:156–172  ·  view source on GitHub ↗

Traverses the tree, stripping out whitespace until text data is found :param node: The node to strip :return: True if non-whitespace data was found, False otherwise

(self, node)

Source from the content-addressed store, hash-verified

154 super(LineItemNode, self).write(doc)
155
156 def _lstrip(self, node):
157 """
158 Traverses the tree, stripping out whitespace until text data is found
159 :param node: The node to strip
160 :return: True if non-whitespace data was found, False otherwise
161 """
162 for child in node.children:
163 if isinstance(child, DataNode):
164 child.lstrip()
165 if child.data:
166 return True
167 else:
168 found = self._lstrip(child)
169 if found:
170 return True
171
172 return False
173
174
175class DataNode(Node):

Callers 1

writeMethod · 0.95

Calls 1

lstripMethod · 0.45

Tested by

no test coverage detected