another pylint improvement (libsubstkeyword)

This commit is contained in:
Paul Franklin 2016-06-23 00:48:07 -07:00
parent 37ad9321e9
commit d297e190e6

View File

@ -673,7 +673,7 @@ class VarString:
This will contain the string that will be displayed. or string out. This will contain the string that will be displayed. or string out.
it is used for groups and format strings. it is used for groups and format strings.
""" """
def __init__(self, start_state = TXT.remove): def __init__(self, start_state=TXT.remove):
self.state = start_state # overall state of the string. self.state = start_state # overall state of the string.
self._text = [] # list of tuples (TXT.?, string) self._text = [] # list of tuples (TXT.?, string)
@ -1246,7 +1246,7 @@ if __name__ == '__main__':
# You will need to put in your own path to the src directory # You will need to put in your own path to the src directory
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# pylint: disable-msg=C0103 # pylint: disable=C0103
def combinations(c, r): def combinations(c, r):
# combinations('ABCD', 2) --> AB AC AD BC BD CD # combinations('ABCD', 2) --> AB AC AD BC BD CD
@ -1362,7 +1362,8 @@ if __name__ == '__main__':
tmp = main_level_test(consume_str, DateFormat, date_to_test) tmp = main_level_test(consume_str, DateFormat, date_to_test)
print(tmp) print(tmp)
answer.append(tmp) answer.append(tmp)
print("Good" if answer == ["1970 a99b09c3d1970f70" print("Good" if answer == [
"1970 a99b09c3d1970f70"
] else "!! bad !!") ] else "!! bad !!")
import sys import sys
@ -1386,7 +1387,8 @@ if __name__ == '__main__':
#now can we put something in for the last name? #now can we put something in for the last name?
name_to_test.set_family_nick_name("The Clubs" if 5 in y_or_n else "") name_to_test.set_family_nick_name("The Clubs" if 5 in y_or_n else "")
line_in = "{$(c)$(t)<1>{<2>$(f)}{<3>$(n){<0> <0>}<4>$(x)}$(s)<5>$(l)<6>$(g)<0>" line_in = "{$(c)$(t)<1>{<2>$(f)}{<3>$(n){<0> "
line_in = line_in + "<0>}<4>$(x)}$(s)<5>$(l)<6>$(g)<0>"
consume_str = ConsumableString(line_in) consume_str = ConsumableString(line_in)
print() print()
@ -1510,7 +1512,8 @@ if __name__ == '__main__':
#print tmp #print tmp
answer.append(len(tmp)) answer.append(len(tmp))
print(answer) print(answer)
print("Good" if answer == [38, 44, 44, 42, 46, 50, 49, 50, 40, 40, 38, 42, print("Good" if answer == [
38, 44, 44, 42, 46, 50, 49, 50, 40, 40, 38, 42,
46, 45, 46, 46, 44, 48, 52, 51, 52, 44, 48, 52, 51, 52, 46, 50, 49, 50, 46, 45, 46, 46, 44, 48, 52, 51, 52, 44, 48, 52, 51, 52, 46, 50, 49, 50,
54, 53, 54, 57, 58, 57, 28, 28, 26, 30, 34, 33, 34, 34, 32, 36, 40, 39, 54, 53, 54, 57, 58, 57, 28, 28, 26, 30, 34, 33, 34, 34, 32, 36, 40, 39,
40, 32, 36, 40, 39, 40, 34, 38, 37, 38, 42, 41, 42, 45, 46, 45, 30, 28, 40, 32, 36, 40, 39, 40, 34, 38, 37, 38, 42, 41, 42, 45, 46, 45, 30, 28,