79 @type bool |
79 @type bool |
80 @param args dictionary of arguments for the annotation checks |
80 @param args dictionary of arguments for the annotation checks |
81 @type dict |
81 @type dict |
82 """ |
82 """ |
83 self.__select = tuple(select) |
83 self.__select = tuple(select) |
84 self.__ignore = ("",) if select else tuple(ignore) |
84 self.__ignore = tuple(ignore) |
85 self.__expected = expected[:] |
85 self.__expected = expected[:] |
86 self.__repeat = repeat |
86 self.__repeat = repeat |
87 self.__filename = filename |
87 self.__filename = filename |
88 self.__source = source[:] |
88 self.__source = source[:] |
89 self.__tree = copy.deepcopy(tree) |
89 self.__tree = copy.deepcopy(tree) |
133 @param code message code to check for |
133 @param code message code to check for |
134 @type str |
134 @type str |
135 @return flag indicating to ignore the given code |
135 @return flag indicating to ignore the given code |
136 @rtype bool |
136 @rtype bool |
137 """ |
137 """ |
138 return code.startswith(self.__ignore) and not code.startswith(self.__select) |
138 return ( |
|
139 code in self.__ignore |
|
140 or (code.startswith(self.__ignore) and not code.startswith(self.__select)) |
|
141 ) |
139 |
142 |
140 def __error(self, lineNumber, offset, code, *args): |
143 def __error(self, lineNumber, offset, code, *args): |
141 """ |
144 """ |
142 Private method to record an issue. |
145 Private method to record an issue. |
143 |
146 |