(self)
| 28 | self.tree = tree |
| 29 | |
| 30 | def run(self): |
| 31 | for node in ast.walk(self.tree): |
| 32 | if isinstance(node, ast.FunctionDef): |
| 33 | for default in node.args.defaults: |
| 34 | if any([ |
| 35 | isinstance(default, mutable_type) |
| 36 | for mutable_type in mutable_types |
| 37 | ]): |
| 38 | error_msg = self._error_tmpl.format( |
| 39 | self._code, type(default).__name__ |
| 40 | ) |
| 41 | yield (default.lineno, default.col_offset, |
| 42 | error_msg, type(self)) |
no outgoing calls