src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Unused/UnusedChecker.py

branch
eric7
changeset 11142
2f0fb22c1d63
parent 11090
f5f5f5803935
child 11145
d328a7b74fd8
equal deleted inserted replaced
11141:2f5f73c51c7c 11142:2f0fb22c1d63
47 @type bool 47 @type bool
48 @param args dictionary of arguments for the various checks 48 @param args dictionary of arguments for the various checks
49 @type dict 49 @type dict
50 """ 50 """
51 self.__select = tuple(select) 51 self.__select = tuple(select)
52 self.__ignore = ("",) if select else tuple(ignore) 52 self.__ignore = tuple(ignore)
53 self.__expected = expected[:] 53 self.__expected = expected[:]
54 self.__repeat = repeat 54 self.__repeat = repeat
55 self.__filename = filename 55 self.__filename = filename
56 self.__source = source[:] 56 self.__source = source[:]
57 self.__tree = copy.deepcopy(tree) 57 self.__tree = copy.deepcopy(tree)
80 @param code message code to check for 80 @param code message code to check for
81 @type str 81 @type str
82 @return flag indicating to ignore the given code 82 @return flag indicating to ignore the given code
83 @rtype bool 83 @rtype bool
84 """ 84 """
85 return code.startswith(self.__ignore) and not code.startswith(self.__select) 85 return (
86 code in self.__ignore
87 or (code.startswith(self.__ignore) and not code.startswith(self.__select))
88 )
86 89
87 def __error(self, lineNumber, offset, code, *args): 90 def __error(self, lineNumber, offset, code, *args):
88 """ 91 """
89 Private method to record an issue. 92 Private method to record an issue.
90 93

eric ide

mercurial