tools/json_schema_compiler/model.py
def _GetModelHierarchy(entity):
  """Returns the hierarchy of the given model entity."""
  hierarchy = []
  while entity is not None:
    hierarchy.append(getattr(entity, 'name', repr(entity)))
    if isinstance(entity, Namespace):
      hierarchy.insert(0, '  in %s' % entity.source_file)
    entity = getattr(entity, 'parent', None)
  hierarchy.reverse()
  return hierarchy
Returns the hierarchy of the given model entity.
Returns the hierarchy of the given model entity.
Returns the hierarchy of the given model entity .
def _GetModelHierarchy(entity):
  hierarchy = []
  while entity is not None:
    hierarchy.append(getattr(entity, 'name', repr(entity)))
    if isinstance(entity, Namespace):
      hierarchy.insert(0, '  in %s' % entity.source_file)
    entity = getattr(entity, 'parent', None)
  hierarchy.reverse()
  return hierarchy
def _GetModelHierarchy ( entity ) : hierarchy = [ ] while entity is not None : hierarchy . append ( getattr ( entity , 'name' , repr ( entity ) ) ) if isinstance ( entity , Namespace ) : hierarchy . insert ( 0 , '  in %s' % entity . source_file ) entity = getattr ( entity , 'parent' , None ) hierarchy . reverse ( ) return hierarchy
Returns the hierarchy of the given model entity.
Returns the hierarchy of the given model entity .
"""Returns the hierarchy of the given model entity."""
entity