src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py

branch
eric7
changeset 11142
2f0fb22c1d63
parent 11090
f5f5f5803935
child 11145
d328a7b74fd8
equal deleted inserted replaced
11141:2f5f73c51c7c 11142:2f0fb22c1d63
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

eric ide

mercurial