def visit_call(self, node: nodes.Call) -> None: if isinstance(node.func, nodes.Name): name = node.func.name # ignore the name if it's not a builtin (i.e. not defined in the # locals nor globals scope) if not (name in node.frame(future=True) or name in node.root()): if name in self.linter.config.bad_functions: hint = BUILTIN_HINTS.get(name) args = f"{name!r}. {hint}" if hint else repr(name) self.add_message("bad-builtin", node=node, args=args)
def visit_call(self, node: nodes.Call) -> None: """Called when a :class:`.nodes.Call` node is visited. See :mod:`astroid` for the description of available nodes. """ if not (isinstance(node.func, nodes.Attribute) and isinstance(node.func.expr, nodes.Name) and node.func.expr.name == self.config.store_locals_indicator and node.func.attrname == "create"): return in_class = node.frame() for param in node.args: in_class.locals[param.name] = node
def visit_call(self, node: nodes.Call) -> None: """Visit a Call node -> check if this is not a disallowed builtin call and check for * or ** use. """ self._check_misplaced_format_function(node) if isinstance(node.func, nodes.Name): name = node.func.name # ignore the name if it's not a builtin (i.e. not defined in the # locals nor globals scope) if not (name in node.frame(future=True) or name in node.root()): if name == "exec": self.add_message("exec-used", node=node) elif name == "reversed": self._check_reversed(node) elif name == "eval": self.add_message("eval-used", node=node)