"""
This type stub file was generated by pyright.
"""

from traitlets.config.configurable import Configurable

"""
A context manager for handling sys.displayhook.

Authors:

* Robert Kern
* Brian Granger
"""
class DisplayTrap(Configurable):
    """Object to manage sys.displayhook.

    This came from IPython.core.kernel.display_hook, but is simplified
    (no callbacks or formatters) until more of the core is refactored.
    """
    hook = ...
    def __init__(self, hook=...) -> None:
        ...
    
    def __enter__(self): # -> Self@DisplayTrap:
        ...
    
    def __exit__(self, type, value, traceback):
        ...
    
    def set(self): # -> None:
        """Set the hook."""
        ...
    
    def unset(self): # -> None:
        """Unset the hook."""
        ...
    


