mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
python: Resolve pep8 blank line errors.
Resolve pep8 errors E302 and E303: E302 expected 2 blank lines, found 1 E303 too many blank lines (3) Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -17,6 +17,7 @@ import sys
|
||||
|
||||
from ovs.db import error
|
||||
|
||||
|
||||
def text_to_nroff(s, font=r'\fR'):
|
||||
def escape(match):
|
||||
c = match.group(0)
|
||||
@@ -56,9 +57,11 @@ def text_to_nroff(s, font=r'\fR'):
|
||||
s = re.sub('(-[0-9]|--|[-"\'\\\\.])', escape, s)
|
||||
return s
|
||||
|
||||
|
||||
def escape_nroff_literal(s, font=r'\fB'):
|
||||
return font + r'%s\fR' % text_to_nroff(s, font)
|
||||
|
||||
|
||||
def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
|
||||
if node.nodeType == node.TEXT_NODE:
|
||||
if to_upper:
|
||||
@@ -99,6 +102,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
|
||||
else:
|
||||
raise error.Error("unknown node %s in inline xml" % node)
|
||||
|
||||
|
||||
def pre_to_nroff(nodes, para, font):
|
||||
# This puts 'font' at the beginning of each line so that leading and
|
||||
# trailing whitespace stripping later doesn't removed leading spaces
|
||||
@@ -168,6 +172,7 @@ def diagram_header_to_nroff(header_node):
|
||||
text_s += "\n"
|
||||
return pic_s, text_s
|
||||
|
||||
|
||||
def diagram_to_nroff(nodes, para):
|
||||
pic_s = ''
|
||||
text_s = ''
|
||||
@@ -210,6 +215,7 @@ fillval = .2
|
||||
.RE
|
||||
\\}"""
|
||||
|
||||
|
||||
def block_xml_to_nroff(nodes, para='.PP'):
|
||||
s = ''
|
||||
for node in nodes:
|
||||
|
Reference in New Issue
Block a user