HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/local/lib/python3.9/site-packages/libfuturize/fixes/__pycache__/fix_UserDict.cpython-39.pyc
a

q�dg�@sPdZddlmZddlmZmZddlmZmZm	Z	ddiZ
Gdd�de	�Zd	S)
zCFix UserDict.

Incomplete!

TODO: base this on fix_urllib perhaps?
�)�
fixer_base)�Name�
attr_chain)�
alternates�
build_pattern�
FixImports�UserDict�collectionscsTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�FixUserdictT�cCsd�t|j��S)N�|)�joinr�mapping��self�r�H/usr/local/lib/python3.9/site-packages/libfuturize/fixes/fix_UserDict.pyr5szFixUserdict.build_patterncs|��|_tt|���dS�N)rZPATTERN�superr�compile_patternr��	__class__rrr8s
zFixUserdict.compile_patterncsHtt|�j��|�}|rDd|vr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdSrr)�.0�obj��matchrr�	<genexpr>F�z$FixUserdict.match.<locals>.<genexpr>�parentF)rrr�anyr)r�node�resultsrrrr?s�zFixUserdict.matchcstt|��||�i|_dSr)rr�
start_tree�replace)r�tree�filenamerrrr#KszFixUserdict.start_treecCs�|�d�}|rl|j}t|j|�}|�t||jd��d|vrH||j|<d|vr�|�|�}|r�|�||�n2|dd}|j�|j�}|r�|�t||jd��dS)N�module_name)�prefixZname_importZmultiple_importsrr)	�get�value�unicoderr$rr(r�	transform)rr!r"Z
import_mod�mod_name�new_nameZ	bare_namerrrr,Os


zFixUserdict.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGrZ	run_orderrrrr#r,�
__classcell__rrrrr
*sr
N)�__doc__Zlib2to3rZlib2to3.fixer_utilrrZlib2to3.fixes.fix_importsrrrr2r
rrrr�<module>s