
    "eC                         d dl Z d dlmZ d Z G d d ee j                              Z G d d ee j                              Z G d d	ee      Z G d
 de      Z G d d ee j                              Z	y)    N)Anyc                 R      G  fdd       }t         j                  |ddi       S )z%Create a base class with a metaclass.c                       e Zd Z fdZy)"_with_metaclass.<locals>.metaclassc                      ||      S N )clsname
this_basesdbasesmetas       E/usr/lib/python3/dist-packages/_pydevd_bundle/pydevd_extension_api.py__new__z*_with_metaclass.<locals>.metaclass.__new__   s    eQ''    N)__name__
__module____qualname__r   )r   r   s   r   	metaclassr   	   s    	(r   r   temporary_classr	   )typer   )r   r   r   s   `` r   _with_metaclassr      s'    (D (
 <<	#4b"==r   c                   X    e Zd ZdZej
                  d        Zej
                  d        Zy)_AbstractResolvera  
    This class exists only for documentation purposes to explain how to create a resolver.

    Some examples on how to resolve things:
    - list: get_dictionary could return a dict with index->item and use the index to resolve it later
    - set: get_dictionary could return a dict with id(object)->object and reiterate in that array to resolve it later
    - arbitrary instance: get_dictionary could return dict with attr_name->attr and use getattr to resolve it later
    c                     t         )aY  
        In this method, we'll resolve some child item given the string representation of the item in the key
        representing the previously asked dictionary.

        :param var: this is the actual variable to be resolved.
        :param attribute: this is the string representation of a key previously returned in get_dictionary.
        NotImplementedError)selfvar	attributes      r   resolvez_AbstractResolver.resolve   s
     "!r   c                     t         )z
        :param var: this is the variable that should have its children gotten.

        :return: a dictionary where each pair key, value should be shown to the user as children items
        in the variables view for the given var.
        r   )r   r    s     r   get_dictionaryz _AbstractResolver.get_dictionary)   s
     "!r   N)r   r   r   __doc__abcabstractmethodr"   r$   r	   r   r   r   r      s;     	" " 	" "r   r   c                   0    e Zd Zej                  d        Zy)_AbstractProviderc                     t         r   r   )r   type_object	type_names      r   can_providez_AbstractProvider.can_provide6       !!r   N)r   r   r   r&   r'   r-   r	   r   r   r)   r)   4   s    " "r   r)   c                       e Zd ZdZy)TypeResolveProviderz\
    Implement this in an extension to provide a custom resolver, see _AbstractResolver
    N)r   r   r   r%   r	   r   r   r0   r0   ?   s    r   r0   c                   D    e Zd ZdZdedefdZej                  d        Z	y)StrPresentationProviderzQ
    Implement this in an extension to provide a str presentation for a type
    valcontextc                 $    | j                  |      S )a  
        :param val:
            This is the object for which we want a string representation.

        :param context:
            This is the context in which the variable is being requested. Valid values:
                "watch",
                "repl",
                "hover",
                "clipboard"

        :note: this method is not required (if it's not available, get_str is called directly,
               so, it's only needed if the string representation needs to be converted based on
               the context).
        )get_str)r   r3   r4   s      r   get_str_in_contextz*StrPresentationProvider.get_str_in_contextJ   s      ||C  r   c                     t         r   r   )r   r3   s     r   r6   zStrPresentationProvider.get_str\   r.   r   N)
r   r   r   r%   r   strr7   r&   r'   r6   r	   r   r   r2   r2   E   s4    !c !C !$ 	" "r   r2   c                       e Zd ZdZd Zy)DebuggerEventHandlerzF
    Implement this to receive lifecycle events from the debugger
    c                      y)a  
        This method invoked after all debugger modules are loaded. Useful for importing and/or patching debugger
        modules at a safe time
        :param kwargs: This is intended to be flexible dict passed from the debugger.
        Currently passes the debugger version
        Nr	   )r   kwargss     r   on_debugger_modules_loadedz/DebuggerEventHandler.on_debugger_modules_loadedf   s    r   N)r   r   r   r%   r>   r	   r   r   r;   r;   a   s    r   r;   )
r&   typingr   r   ABCMetar   r)   r0   r2   r;   r	   r   r   <module>rA      sm    
 >"4 "@"4 "+-> "/ "8?3;;7 r   