(self, hook=None)
| 39 | hook = Any() |
| 40 | |
| 41 | def __init__(self, hook=None): |
| 42 | super(DisplayTrap, self).__init__(hook=hook, config=None) |
| 43 | self.old_hook = None |
| 44 | # We define this to track if a single BuiltinTrap is nested. |
| 45 | # Only turn off the trap when the outermost call to __exit__ is made. |
| 46 | self._nested_level = 0 |
| 47 | |
| 48 | def __enter__(self): |
| 49 | if self._nested_level == 0: |
nothing calls this directly
no outgoing calls
no test coverage detected