diff options
author | Ben Pfaff <blp@nicira.com> | 2015-07-06 21:05:03 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-07-06 21:05:51 -0700 |
commit | 4d9d1d9e7248820fd192dfbc6780fc5f673594fc (patch) | |
tree | 1c506b0edc164f2ae082c5f70d730485419b4043 /ovsdb/ovsdb-doc | |
parent | 44648b0f08fecf237a3c71203a334dd5ee3f9cad (diff) | |
download | openvswitch-4d9d1d9e7248820fd192dfbc6780fc5f673594fc.tar.gz |
nroff: Fix style of names.
The recommended Google Python style is multi_word_names, not
multiWordNames.
There are lots of other places where the style could be improved.
I started here because I was working in this code anyway and because
this code is only used at build time and not installed, so that it
can't break any third-party code.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Diffstat (limited to 'ovsdb/ovsdb-doc')
-rwxr-xr-x | ovsdb/ovsdb-doc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc index 51b022b43..5cf26ee46 100755 --- a/ovsdb/ovsdb-doc +++ b/ovsdb/ovsdb-doc @@ -29,9 +29,9 @@ from build.nroff import * argv0 = sys.argv[0] def typeAndConstraintsToNroff(column): - type = column.type.toEnglish(escapeNroffLiteral) - constraints = column.type.constraintsToEnglish(escapeNroffLiteral, - textToNroff) + type = column.type.toEnglish(escape_nroff_literal) + constraints = column.type.constraintsToEnglish(escape_nroff_literal, + text_to_nroff) if constraints: type += ", " + constraints if column.unique: @@ -53,7 +53,7 @@ def columnGroupToNroff(table, groupXml, documented_columns): introNodes += [node] summary = [] - intro = blockXmlToNroff(introNodes) + intro = block_xml_to_nroff(introNodes) body = '' for node in columnNodes: if node.tagName == 'column': @@ -76,7 +76,7 @@ def columnGroupToNroff(table, groupXml, documented_columns): if column.type.value: typeNroff = "optional %s" % column.type.value.toEnglish( - escapeNroffLiteral) + escape_nroff_literal) if (column.type.value.type == ovs.db.types.StringType and type_.type == ovs.db.types.BooleanType): # This is a little more explicit and helpful than @@ -90,8 +90,8 @@ def columnGroupToNroff(table, groupXml, documented_columns): else: typeNroff += ", containing a %s" % type_english constraints = ( - type_.constraintsToEnglish(escapeNroffLiteral, - textToNroff)) + type_.constraintsToEnglish(escape_nroff_literal, + text_to_nroff)) if constraints: typeNroff += ", %s" % constraints else: @@ -102,14 +102,14 @@ def columnGroupToNroff(table, groupXml, documented_columns): if not column.mutable: typeNroff = "immutable %s" % typeNroff body += '.IP "\\fB%s\\fR: %s"\n' % (nameNroff, typeNroff) - body += blockXmlToNroff(node.childNodes, '.IP') + "\n" + body += block_xml_to_nroff(node.childNodes, '.IP') + "\n" summary += [('column', nameNroff, typeNroff)] elif node.tagName == 'group': title = node.attributes["title"].nodeValue subSummary, subIntro, subBody = columnGroupToNroff( table, node, documented_columns) summary += [('group', title, subSummary)] - body += '.ST "%s:"\n' % textToNroff(title) + body += '.ST "%s:"\n' % text_to_nroff(title) body += subIntro + subBody else: raise error.Error("unknown element %s in <table>" % node.tagName) @@ -186,7 +186,7 @@ def docsToNroff(schemaFile, xmlFile, erFile, version=None): .SH NAME %s \- %s database schema .PP -''' % (manpage, schema.version, version, textToNroff(manpage), schema.name) +''' % (manpage, schema.version, version, text_to_nroff(manpage), schema.name) tables = "" introNodes = [] @@ -212,7 +212,7 @@ def docsToNroff(schemaFile, xmlFile, erFile, version=None): for table in undocumented_tables: raise error.Error("undocumented table %s" % table) - s += blockXmlToNroff(introNodes) + "\n" + s += block_xml_to_nroff(introNodes) + "\n" s += r""" .SH "TABLE SUMMARY" @@ -228,7 +228,7 @@ Purpose .TQ 1in \fB%s\fR %s -""" % (name, textToNroff(title)) +""" % (name, text_to_nroff(title)) if erFile: s += """ |