MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / leaf

Method leaf

suds/resolver.py:164–181  ·  view source on GitHub ↗

Find the leaf. @param parts: A list of path parts. @type parts: [str,..] @param parent: The leaf's parent. @type parent: L{xsd.sxbase.SchemaObject} @return: The leaf. @rtype: L{xsd.sxbase.SchemaObject}

(self, parent, parts)

Source from the content-addressed store, hash-verified

162 return result
163
164 def leaf(self, parent, parts):
165 """
166 Find the leaf.
167 @param parts: A list of path parts.
168 @type parts: [str,..]
169 @param parent: The leaf's parent.
170 @type parent: L{xsd.sxbase.SchemaObject}
171 @return: The leaf.
172 @rtype: L{xsd.sxbase.SchemaObject}
173 """
174 name = splitPrefix(parts[-1])[1]
175 if name.startswith('@'):
176 result, path = parent.get_attribute(name[1:])
177 else:
178 result, ancestry = parent.get_child(name)
179 if result is None:
180 raise PathResolver.BadPath(name)
181 return result
182
183 def qualify(self, name):
184 """

Callers 1

findMethod · 0.95

Calls 3

splitPrefixFunction · 0.90
get_attributeMethod · 0.45
get_childMethod · 0.45

Tested by

no test coverage detected