src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/PathLib/PathlibChecker.py

branch
eric7
changeset 11142
2f0fb22c1d63
parent 11090
f5f5f5803935
child 11145
d328a7b74fd8
equal deleted inserted replaced
11141:2f5f73c51c7c 11142:2f0fb22c1d63
130 @type list of str 130 @type list of str
131 @param repeat flag indicating to report each occurrence of a code 131 @param repeat flag indicating to report each occurrence of a code
132 @type bool 132 @type bool
133 """ 133 """
134 self.__select = tuple(selected) 134 self.__select = tuple(selected)
135 self.__ignore = ("",) if selected else tuple(ignored) 135 self.__ignore = tuple(ignored)
136 self.__expected = expected[:] 136 self.__expected = expected[:]
137 self.__repeat = repeat 137 self.__repeat = repeat
138 self.__filename = filename 138 self.__filename = filename
139 self.__source = source[:] 139 self.__source = source[:]
140 self.__tree = copy.deepcopy(tree) 140 self.__tree = copy.deepcopy(tree)
154 @param code message code to check for 154 @param code message code to check for
155 @type str 155 @type str
156 @return flag indicating to ignore the given code 156 @return flag indicating to ignore the given code
157 @rtype bool 157 @rtype bool
158 """ 158 """
159 return code.startswith(self.__ignore) and not code.startswith(self.__select) 159 return (
160 code in self.__ignore
161 or (code.startswith(self.__ignore) and not code.startswith(self.__select))
162 )
160 163
161 def __error(self, lineNumber, offset, code, *args): 164 def __error(self, lineNumber, offset, code, *args):
162 """ 165 """
163 Private method to record an issue. 166 Private method to record an issue.
164 167

eric ide

mercurial