관리-도구
편집 파일: fix_UserDict.cpython-37.pyc
B �A�[ � @ sP d Z ddlmZ ddlmZmZ ddlmZmZm Z ddiZ G dd� de �Zd S ) zCFix UserDict. Incomplete! TODO: base this on fix_urllib perhaps? � )� fixer_base)�Name� attr_chain)� alternates� build_pattern� FixImports�UserDict�collectionsc sT e Zd ZdZdZeZdZdd� Z� fdd�Z � fdd�Z � fd d �Zdd� Z� Z S ) �FixUserdictT� c C s d� t| j��S )N�|)�joinr �mapping)�self� r �O/opt/alt/python37/lib/python3.7/site-packages/libfuturize/fixes/fix_UserDict.pyr 5 s zFixUserdict.build_patternc s | � � | _tt| ��� d S )N)r ZPATTERN�superr �compile_pattern)r )� __class__r r r 8 s zFixUserdict.compile_patternc sH t t| �j� � |�}|rDd|kr@t� fdd�t|d�D ��r@dS |S dS )N�bare_with_attrc 3 s | ]}� |�V qd S )Nr )�.0�obj)�matchr r � <genexpr>F s z$FixUserdict.match.<locals>.<genexpr>�parentF)r r r �anyr )r �node�results)r )r r r ? s zFixUserdict.matchc s t t| ��||� i | _d S )N)r r � start_tree�replace)r �tree�filename)r r r r K s zFixUserdict.start_treec C s� |� d�}|rl|j}t| j| �}|�t||jd�� d|krH|| j|<