44 @param repeat flag indicating to report each occurrence of a code |
45 @param repeat flag indicating to report each occurrence of a code |
45 @type bool |
46 @type bool |
46 @param args dictionary of arguments for the various checks |
47 @param args dictionary of arguments for the various checks |
47 @type dict |
48 @type dict |
48 """ |
49 """ |
49 self.__select = tuple(select) |
50 self.__select = tuple(x for x in select if x.startswith(AsyncChecker.Prefix)) |
50 self.__ignore = ( |
51 self.__ignore = tuple(x for x in ignore if x.startswith(AsyncChecker.Prefix)) |
51 ("",) if select else tuple(x for x in ignore if x.startswith("ASY")) |
|
52 ) |
|
53 self.__expected = expected[:] |
52 self.__expected = expected[:] |
54 self.__repeat = repeat |
53 self.__repeat = repeat |
55 self.__filename = filename |
54 self.__filename = filename |
56 self.__source = source[:] |
55 self.__source = source[:] |
57 self.__tree = copy.deepcopy(tree) |
56 self.__tree = copy.deepcopy(tree) |
82 @param code message code to check for |
81 @param code message code to check for |
83 @type str |
82 @type str |
84 @return flag indicating to ignore the given code |
83 @return flag indicating to ignore the given code |
85 @rtype bool |
84 @rtype bool |
86 """ |
85 """ |
87 return code.startswith(self.__ignore) and not code.startswith(self.__select) |
86 return ( |
|
87 code in self.__ignore |
|
88 or (code.startswith(self.__ignore) and not code.startswith(self.__select)) |
|
89 ) |
88 |
90 |
89 def __error(self, lineNumber, offset, code, *args): |
91 def __error(self, lineNumber, offset, code, *args): |
90 """ |
92 """ |
91 Private method to record an issue. |
93 Private method to record an issue. |
92 |
94 |