src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Imports/ImportsChecker.py

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

eric ide

mercurial