+
    ~vi	                    t    R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht R R lt ! R R	]	4      tR# )
z6Manager to read and modify config data in JSON files.
)annotationsN)Any)LoggingConfigurable)Unicodec               $    V ^8  d   QhRRRRRR/# )   targetzdict[Any, Any]newreturnNone )formats   ":/usr/lib/python3/dist-packages/traitlets/config/manager.py__annotate__r      s!      ^ . T     c                    VP                  4        Fg  w  r#\        V\        4      '       d1   W 9  d   / W&   \        W,          V4       W,          '       g   W KI  KK  Vf   V P	                  VR4       Kc  W0V&   Ki  	  R# )zVRecursively update one dictionary using another.

None values will delete their keys.
N)items
isinstancedictrecursive_updatepop)r   r	   kvs   &&  r   r   r      sj    
 		a	VY*99I  YJJq$ 1I r   c                  f    ] tR t^%tRt]! R4      tR R ltR R ltR R lt	R	 R
 lt
R R ltRtR# )BaseJSONConfigManagerzQGeneral JSON config manager

Deals with persisting/storing config in a json file
.c                   V ^8  d   QhRR/# )r   r
   r   r   )r   s   "r   r   "BaseJSONConfigManager.__annotate__-   s      $ r   c                	     \         P                  ! V P                  R 4       R#   \         d,   pTP                  \        P
                  8w  d   h  Rp?R# Rp?ii ; i)i  N)osmakedirs
config_dirOSErrorerrnoEEXIST)selfes   & r   ensure_config_dir_exists.BaseJSONConfigManager.ensure_config_dir_exists-   sA    	KK/ 	ww%,,& '	s   !% A AAc                    V ^8  d   QhRRRR/# )r   section_namestrr
   r   )r   s   "r   r   r   4   s     E Ec Ec Er   c                	d    \         P                  P                  V P                  VR ,           4      # )z.json)r   pathjoinr!   )r%   r*   s   &&r   	file_nameBaseJSONConfigManager.file_name4   s     ww||DOO\G-CDDr   c                    V ^8  d   QhRRRR/# )r   r*   r+   r
   r   r   )r   s   "r   r   r   7   s        r   c                   V P                  V4      p\        P                  P                  V4      '       d7   \	        VRR7      ;_uu_ 4       p\
        P                  ! V4      uuRRR4       # / #   + '       g   i     R# ; i)zRetrieve the config data for the specified section.

Returns the data as a dictionary, or an empty dictionary if the file
doesn't exist.
utf-8encodingN)r/   r   r-   isfileopenjsonload)r%   r*   filenamefs   &&  r   getBaseJSONConfigManager.get7   sZ     >>,/77>>(##h11Qyy| 21 I 211s   A//B 	c               $    V ^8  d   QhRRRRRR/# )r   r*   r+   datar   r
   r   r   )r   s   "r   r   r   D   s!     ) ) )3 )4 )r   c                    V P                  V4      pV P                  4        \        VRRR7      ;_uu_ 4       p\        P                  ! W$^R7       RRR4       R#   + '       g   i     R# ; i)zStore the given config data.wr3   r4   )indentN)r/   r'   r7   r8   dump)r%   r*   r?   r:   r;   s   &&&  r   setBaseJSONConfigManager.setD   sJ    >>,/%%'(C'22aIIda( 3222s   AA,	c               $    V ^8  d   QhRRRRRR/# )r   r*   r+   new_datar   r
   r   )r   s   "r   r   r   L   s!      3 # # r   c                `    V P                  V4      p\        W24       V P                  W4       V# )zwModify the config section by recursively updating it with new_data.

Returns the modified config data as a dictionary.
)r<   r   rD   )r%   r*   rG   r?   s   &&& r   updateBaseJSONConfigManager.updateL   s+    
 xx%($r   r   N)__name__
__module____qualname____firstlineno____doc__r   r!   r'   r/   r<   rD   rI   __static_attributes__r   r   r   r   r   %   s1    
 JE) r   r   )rO   
__future__r   r#   r8   r   typingr   traitlets.configr   traitlets.traitletsr   r   r   r   r   r   <module>rU      s3    #   	  0 '*// /r   