fix N402 on tools/

fix N402 (single line docstrings should end in a period)

Change-Id: I2086dfb33a6efeb6ef6edc6a326182b6deda2527
This commit is contained in:
Sean Dague 2013-01-08 17:08:09 -05:00
parent f4ee8bc87a
commit 1d350ba537
3 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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

View File

@ -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)