2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

checkpatch.py: Fix Python style.

Fixes the following warnings:

../utilities/checkpatch.py:219:1: E302 expected 2 blank lines, found 1
../utilities/checkpatch.py:224:1: E302 expected 2 blank lines, found 1
../utilities/checkpatch.py:228:1: E302 expected 2 blank lines, found 1

CC: Justin Pettit <jpettit@ovn.org>
Fixes: 4e99b70dfa ("checkpatch.py: Add check for "xxx" in comments.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
Ben Pfaff
2018-01-26 11:45:52 -08:00
parent 6399df6a88
commit 8df9a0c410

View File

@@ -216,15 +216,18 @@ def is_comment_line(line):
"""Returns TRUE if the current line is part of a block comment."""
return __regex_is_comment_line.match(line) is not None
def has_comment(line):
"""Returns TRUE if the current line contains a comment or is part of
a block comment."""
return __regex_has_comment.match(line) is not None
def trailing_operator(line):
"""Returns TRUE if the current line ends with an operatorsuch as ? or :"""
return __regex_trailing_operator.match(line) is not None
def has_xxx_mark(line):
"""Returns TRUE if the current line contains 'xxx'."""
return __regex_has_xxx_mark.match(line) is not None