
    9i                      V    S r SSKJr  SSKJrJr  SSKJrJrJ	r	  SS0r
 " S S\	5      rg	)
zCFix UserDict.

Incomplete!

TODO: base this on fix_urllib perhaps?
    )
fixer_base)Name
attr_chain)
alternatesbuild_pattern
FixImportsUserDictcollectionsc                   \   ^  \ rS rSrSrSr\rSrS r	U 4S jr
U 4S jrU 4S jrS rS	rU =r$ )
FixUserdict*   T   c                 J    SR                  [        U R                  5      5      $ )N|)joinr   mapping)selfs    ^/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/libfuturize/fixes/fix_UserDict.pyr   FixUserdict.build_pattern5   s    xxdll344    c                 T   > U R                  5       U l        [        [        U ]  5         g N)r   PATTERNsuperr   compile_pattern)r   	__class__s    r   r   FixUserdict.compile_pattern8   s"     ))+j$/1r   c                    >^ [         [        U ]
  mT" U5      nU(       a-  SU;  a%  [        U4S j[	        US5       5       5      (       a  gU$ g)Nbare_with_attrc              3   4   >#    U  H  nT" U5      v   M     g 7fr    ).0objmatchs     r   	<genexpr>$FixUserdict.match.<locals>.<genexpr>F   s     I.Hsc

.Hs   parentF)r   r   r$   anyr   )r   noderesultsr$   r   s      @r   r$   FixUserdict.match?   sH    j$-+  w.Ijx.HIIINr   c                 :   > [         [        U ]  X5        0 U l        g r   )r   r   
start_treereplace)r   treefilenamer   s      r   r-   FixUserdict.start_treeK   s    j$*4:r   c                    UR                  S5      nU(       a  UR                  n[        U R                  U   5      nUR	                  [        XSR                  S95        SU;   a  XPR                  U'   SU;   a+  U R                  U5      nU(       a  U R                  X5        g g g US   S   nU R                  R                  UR                  5      nU(       a#  UR	                  [        XVR                  S95        g g )Nmodule_name)prefixname_importmultiple_importsr   r   )	getvalueunicoder   r.   r   r4   r$   	transform)r   r)   r*   
import_modmod_namenew_name	bare_names          r   r:   FixUserdict.transformO   s    [[/
!''Ht||H56HtH5F5FGH' *2X&!W,
 **T*NN41  -   01!4I||''	8H!!$x8H8H"IJ r   )r   r.   )__name__
__module____qualname____firstlineno__BM_compatiblekeep_line_orderMAPPINGr   	run_orderr   r   r$   r-   r:   __static_attributes____classcell__)r   s   @r   r   r   *   s9    MOG I52
K Kr   r   N)__doc__lib2to3r   lib2to3.fixer_utilr   r   lib2to3.fixes.fix_importsr   r   r   rF   r   r!   r   r   <module>rN      s2     / K K 8<K* <Kr   