HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/libfuturize/fixes/__pycache__/fix_UserDict.cpython-310.pyc
o

,�]�@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�@/usr/lib/python3/dist-packages/libfuturize/fixes/fix_UserDict.pyr5szFixUserdict.build_patterncs|��|_tt|���dS�N)r�PATTERN�superr�compile_patternr��	__class__rrr8s
zFixUserdict.compile_patterncsHtt|�j��|�}|r"d|vr t�fdd�t|d�D��r dS|SdS)N�bare_with_attrc3s�|]}�|�VqdSrr)�.0�obj��matchrr�	<genexpr>Fs�z$FixUserdict.match.<locals>.<genexpr>�parentF)rrr�anyr)r�node�resultsrrrr?s�zFixUserdict.matchcstt|��||�i|_dSr)rr�
start_tree�replace)r�tree�filenamerrrr#Ks
zFixUserdict.start_treecCs�|�d�}|r;|j}t|j|�}|�t||jd��d|vr$||j|<d|vr7|�|�}|r9|�||�dSdSdS|dd}|j�|j�}|rV|�t||jd��dSdS)N�module_name)�prefix�name_import�multiple_importsrr)	�get�value�unicoderr$rr(r�	transform)rr!r"�
import_mod�mod_name�new_name�	bare_namerrrr.Os$


��zFixUserdict.transform)�__name__�
__module__�__qualname__�
BM_compatible�keep_line_order�MAPPINGr�	run_orderrrrr#r.�
__classcell__rrrrr
*sr
N)�__doc__�lib2to3r�lib2to3.fixer_utilrr�lib2to3.fixes.fix_importsrrrr8r
rrrr�<module>s