Given an index in the stack return wether it should be skipped. This is used in up/down and where to skip frames.
(self, stack)
| 289 | |
| 290 | |
| 291 | def hidden_frames(self, stack): |
| 292 | """ |
| 293 | Given an index in the stack return wether it should be skipped. |
| 294 | |
| 295 | This is used in up/down and where to skip frames. |
| 296 | """ |
| 297 | # The f_locals dictionary is updated from the actual frame |
| 298 | # locals whenever the .f_locals accessor is called, so we |
| 299 | # avoid calling it here to preserve self.curframe_locals. |
| 300 | # Futhermore, there is no good reason to hide the current frame. |
| 301 | ip_hide = [ |
| 302 | False if s[0] is self.curframe else s[0].f_locals.get( |
| 303 | "__tracebackhide__", False) |
| 304 | for s in stack] |
| 305 | ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"] |
| 306 | if ip_start: |
| 307 | ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)] |
| 308 | return ip_hide |
| 309 | |
| 310 | def interaction(self, frame, traceback): |
| 311 | try: |
no outgoing calls
no test coverage detected