Skip to content

Commit

Permalink
[tools/versionConv] Add method description
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsonntag committed Nov 16, 2018
1 parent 98aa213 commit 76e908a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions odml/tools/version_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@ def _replace_same_name_entities(cls, tree):

@staticmethod
def _change_entity_name(tree, elem_map, name):
"""
Adds numbering to identical element names where their odml.Section
or odml.Property parents reside on the same level in the tree.
:param tree: The element tree containing the 'name' element.
:param elem_map: lxml path to occurrence maps of named Sections or Properties.
:param name: lxml element containing the name text of a Section or Property.
"""
named_path = "%s:%s" % (tree.getpath(name.getparent().getparent()), name.text)
if named_path not in elem_map:
elem_map[named_path] = 1
Expand Down

0 comments on commit 76e908a

Please sign in to comment.