fix N402 on tools/
fix N402 (single line docstrings should end in a period) Change-Id: I2086dfb33a6efeb6ef6edc6a326182b6deda2527
This commit is contained in:
parent
f4ee8bc87a
commit
1d350ba537
@ -297,7 +297,7 @@ def nova_docstring_one_line(physical_line):
|
|||||||
pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start
|
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
|
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 (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"
|
return pos, "NOVA N402: one line docstring needs a period"
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""pylint error checking"""
|
"""pylint error checking."""
|
||||||
|
|
||||||
import cStringIO as StringIO
|
import cStringIO as StringIO
|
||||||
import json
|
import json
|
||||||
|
@ -50,7 +50,7 @@ ALLOWED_COMMANDS = ["list-vdis", "clean-vdis", "list-instances",
|
|||||||
|
|
||||||
|
|
||||||
def call_xenapi(xenapi, method, *args):
|
def call_xenapi(xenapi, method, *args):
|
||||||
"""Make a call to xapi"""
|
"""Make a call to xapi."""
|
||||||
return xenapi._session.call_xenapi(method, *args)
|
return xenapi._session.call_xenapi(method, *args)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user