(self, name: ast.Name)
| 976 | return name, self.explanation_param(expr) |
| 977 | |
| 978 | def visit_Name(self, name: ast.Name) -> tuple[ast.Name, str]: |
| 979 | # Display the repr of the name if it's a local variable or |
| 980 | # _should_repr_global_name() thinks it's acceptable. |
| 981 | locs = ast.Call(self.builtin("locals"), [], []) |
| 982 | inlocs = ast.Compare(ast.Constant(name.id), [ast.In()], [locs]) |
| 983 | dorepr = self.helper("_should_repr_global_name", name) |
| 984 | test = ast.BoolOp(ast.Or(), [inlocs, dorepr]) |
| 985 | expr = ast.IfExp(test, self.display(name), ast.Constant(name.id)) |
| 986 | return name, self.explanation_param(expr) |
| 987 | |
| 988 | def visit_BoolOp(self, boolop: ast.BoolOp) -> tuple[ast.Name, str]: |
| 989 | res_var = self.variable() |
nothing calls this directly
no test coverage detected