Merge "Fix typo error in zun/hacking/checks.py"

This commit is contained in:
Jenkins 2017-06-08 09:41:29 +00:00 committed by Gerrit Code Review
commit e3bd45d289

View File

@ -43,7 +43,7 @@ assert_equal_with_true_re = re.compile(
r"assertEqual\(True,")
assert_equal_with_false_re = re.compile(
r"assertEqual\(False,")
asse_equal_with_is_not_none_re = re.compile(
assert_equal_with_is_not_none_re = re.compile(
r"assertEqual\(.*?\s+is+\s+not+\s+None\)$")
assert_true_isinstance_re = re.compile(
r"(.)*assertTrue\(isinstance\((\w|\.|\'|\"|\[|\])+, "
@ -87,7 +87,7 @@ def assert_equal_true_or_false(logical_line):
def assert_equal_not_none(logical_line):
"""Check for assertEqual(A is not None) sentences Z302"""
msg = "Z302: assertEqual(A is not None) sentences not allowed."
res = asse_equal_with_is_not_none_re.search(logical_line)
res = assert_equal_with_is_not_none_re.search(logical_line)
if res:
yield (0, msg)