From 1d350ba53792bd7fe0fd6364a2598b893ccf061c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 8 Jan 2013 17:08:09 -0500 Subject: [PATCH] fix N402 on tools/ fix N402 (single line docstrings should end in a period) Change-Id: I2086dfb33a6efeb6ef6edc6a326182b6deda2527 --- tools/hacking.py | 2 +- tools/lintstack.py | 2 +- tools/xenserver/vm_vdi_cleaner.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/hacking.py b/tools/hacking.py index a860aa37b4c5..7322fd071f29 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -297,7 +297,7 @@ def nova_docstring_one_line(physical_line): pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start end = max([physical_line[-4:-1] == i for i in DOCSTRING_TRIPLE]) # end if (pos != -1 and end and len(physical_line) > pos + 4): - if (physical_line[-5] != '.'): + if (physical_line[-5] not in ['.', '?', '!']): return pos, "NOVA N402: one line docstring needs a period" diff --git a/tools/lintstack.py b/tools/lintstack.py index ce9b6f8a667f..5c4fb0a3a4e4 100755 --- a/tools/lintstack.py +++ b/tools/lintstack.py @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. -"""pylint error checking""" +"""pylint error checking.""" import cStringIO as StringIO import json diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py index fb06a9c32a8a..eeaf978b8582 100755 --- a/tools/xenserver/vm_vdi_cleaner.py +++ b/tools/xenserver/vm_vdi_cleaner.py @@ -50,7 +50,7 @@ ALLOWED_COMMANDS = ["list-vdis", "clean-vdis", "list-instances", def call_xenapi(xenapi, method, *args): - """Make a call to xapi""" + """Make a call to xapi.""" return xenapi._session.call_xenapi(method, *args)