
    ^j                    6    d Z ddlmZ ddlmZ  G d de      Zy)zJYet another implementation of bunch

attribute-access of items on a dict.
    )annotations)Anyc                  4     e Zd ZdZddZddZd fdZ xZS )BunchzA dict with attribute-accessc                `    	 | j                  |      S # t        $ r}t        |      |d }~ww xY wN)__getitem__KeyErrorAttributeError)selfkeyes      N/opt/ringagent/.cad-venv/lib/python3.12/site-packages/traitlets/utils/bunch.py__getattr__zBunch.__getattr__   s5    	-##C(( 	- %1,	-s    	-(-c                (    | j                  ||       y r   )__setitem__)r   r   values      r   __setattr__zBunch.__setattr__   s    e$    c                    g }|j                  t        | 	                |j                  | j                                |S r   )extendsuper__dir__keys)r   names	__class__s     r   r   zBunch.__dir__   s2    UW_&'TYY[!r   )r   strreturnr   )r   r   r   r   r   None)r   z	list[str])__name__
__module____qualname____doc__r   r   r   __classcell__)r   s   @r   r   r      s    &-% r   r   N)r#   
__future__r   typingr   dictr    r   r   <module>r)      s    # D r   