def check_empty_list(node): if not isinstance(node, ast.List): return if len(node.elts) == 0: yield (node.lineno, 'init by []')