(self, node)
| 780 | self.out = [] |
| 781 | |
| 782 | def visit_With(self, node): |
| 783 | items = node.items |
| 784 | context = [ |
| 785 | { |
| 786 | "node": item.context_expr, |
| 787 | "target_vars": self.get_target_vars(item.optional_vars), |
| 788 | "with_items": item, |
| 789 | "highlight": node, |
| 790 | } |
| 791 | for item in items |
| 792 | ] |
| 793 | |
| 794 | tv_all = TargetVars(sum([list(c["target_vars"].items()) for c in context], [])) |
| 795 | |
| 796 | self.out.append( |
| 797 | { |
| 798 | "context": context, |
| 799 | "body": {"node": node.body, "with_items": items}, |
| 800 | "node": node, |
| 801 | "n_vars": len(items), |
| 802 | } |
| 803 | ) |
| 804 | |
| 805 | |
| 806 | class TryExceptParser(Parser): |
nothing calls this directly
no test coverage detected