224 ) |
224 ) |
225 ) and not self.__atModuleLevel(): |
225 ) and not self.__atModuleLevel(): |
226 self.__error(node.lineno - 1, node.col_offset, "L101") |
226 self.__error(node.lineno - 1, node.col_offset, "L101") |
227 |
227 |
228 if ( |
228 if ( |
|
229 isinstance(node.func, ast.Attribute) |
|
230 and node.func.attr in _LoggerMethods |
|
231 and isinstance(node.func.value, ast.Name) |
|
232 and self.__loggingName |
|
233 and node.func.value.id == self.__loggingName |
|
234 ) or ( |
|
235 isinstance(node.func, ast.Name) |
|
236 and node.func.id in _LoggerMethods |
|
237 and self.__fromImports.get(node.func.id) == "logging" |
|
238 ): |
|
239 self.__error(node.lineno - 1, node.col_offset, "L115") |
|
240 |
|
241 if ( |
229 self.__loggingName |
242 self.__loggingName |
230 and isinstance(node.func, ast.Attribute) |
243 and isinstance(node.func, ast.Attribute) |
231 and node.func.attr == "getLogger" |
244 and node.func.attr == "getLogger" |
232 and isinstance(node.func.value, ast.Name) |
245 and isinstance(node.func.value, ast.Name) |
233 and node.func.value.id == self.__loggingName |
246 and node.func.value.id == self.__loggingName |