tools/metrics/common/models.py
def GetPrintStyle(self):
    """Gets an XmlStyle object for pretty printing a document of this type.

    Returns:
      An XML style object.
    """
    types = self.root_type.GetNodeTypes()
    return pretty_print_xml.XmlStyle(
        attribute_order={t: types[t].GetAttributes()
                         for t in types},
        required_attributes={
            t: types[t].GetRequiredAttributes()
            for t in types
        },
        tags_that_have_extra_newline={
            t: types[t].extra_newlines
            for t in types if types[t].extra_newlines
        },
        tags_that_dont_indent=[t for t in types if not types[t].indent],
        tags_that_allow_single_line=[t for t in types if types[t].single_line],
        tags_alphabetization_rules={
            t: types[t].alphabetization
            for t in types if types[t].alphabetization
        })
Gets an XmlStyle object for pretty printing a document of this type.

    Returns:
      An XML style object.
    
Gets an XmlStyle object for pretty printing a document of this type.
Gets an XmlStyle object for pretty printing a document of this type .
def GetPrintStyle(self):
    types = self.root_type.GetNodeTypes()
    return pretty_print_xml.XmlStyle(
        attribute_order={t: types[t].GetAttributes()
                         for t in types},
        required_attributes={
            t: types[t].GetRequiredAttributes()
            for t in types
        },
        tags_that_have_extra_newline={
            t: types[t].extra_newlines
            for t in types if types[t].extra_newlines
        },
        tags_that_dont_indent=[t for t in types if not types[t].indent],
        tags_that_allow_single_line=[t for t in types if types[t].single_line],
        tags_alphabetization_rules={
            t: types[t].alphabetization
            for t in types if types[t].alphabetization
        })
def GetPrintStyle ( self ) : types = self . root_type . GetNodeTypes ( ) return pretty_print_xml . XmlStyle ( attribute_order = { t : types [ t ] . GetAttributes ( ) for t in types } , required_attributes = { t : types [ t ] . GetRequiredAttributes ( ) for t in types } , tags_that_have_extra_newline = { t : types [ t ] . extra_newlines for t in types if types [ t ] . extra_newlines } , tags_that_dont_indent = [ t for t in types if not types [ t ] . indent ] , tags_that_allow_single_line = [ t for t in types if types [ t ] . single_line ] , tags_alphabetization_rules = { t : types [ t ] . alphabetization for t in types if types [ t ] . alphabetization } )
Gets an XmlStyle object for pretty printing a document of this type.
Gets an XmlStyle object for pretty printing a document of this type .
"""Gets an XmlStyle object for pretty printing a document of this type.

    Returns:
      An XML style object.
    """
An XML style object.
An XML style object .
self