Skip to content

Commit 76e908a

Browse files
committed
[tools/versionConv] Add method description
1 parent 98aa213 commit 76e908a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

odml/tools/version_converter.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,13 @@ def _replace_same_name_entities(cls, tree):
396396

397397
@staticmethod
398398
def _change_entity_name(tree, elem_map, name):
399+
"""
400+
Adds numbering to identical element names where their odml.Section
401+
or odml.Property parents reside on the same level in the tree.
402+
:param tree: The element tree containing the 'name' element.
403+
:param elem_map: lxml path to occurrence maps of named Sections or Properties.
404+
:param name: lxml element containing the name text of a Section or Property.
405+
"""
399406
named_path = "%s:%s" % (tree.getpath(name.getparent().getparent()), name.text)
400407
if named_path not in elem_map:
401408
elem_map[named_path] = 1

0 commit comments

Comments
 (0)