관리-도구
편집 파일: fix_renames.cpython-35.opt-2.pyc
���]� � @ ss d d l m Z d d l m Z m Z d d d i i Z i Z d d � Z d d � Z Gd d � d e j � Z d S) � )� fixer_base)�Name� attr_chain�sysZmaxint�maxsizec C s d d j t t | � � d S)N�(�|�))�join�map�repr)�members� r �0/opt/alt/python35/lib64/python3.5/fix_renames.py� alternates s r c c s{ xt t t j � � D]` \ } } xQ t | j � � D]= \ } } | t | | f <d | | | f Vd | | f Vq2 Wq Wd S)Nz� import_from< 'from' module_name=%r 'import' ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) > z^ power< module_name=%r trailer< '.' attr_name=%r > any* > )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrr r r � build_pattern s r c sL e Z d Z d Z d j e � � Z d Z � f d d � Z d d � Z � S)� FixRenamesTr �prec sX t t | � j � � | � } | rT t � f d d � t | d � D� � rP d S| Sd S)Nc 3 s | ] } � | � Vq d S)Nr )�.0�obj)�matchr r � <genexpr>5 s z#FixRenames.match.<locals>.<genexpr>�parentF)�superr r �anyr )�self�node�results)� __class__)r r r 1 s (zFixRenames.matchc C s` | j d � } | j d � } | r\ | r\ t | j | j f } | j t | d | j �� d S)N�module_name� attr_name�prefix)�getr �valuer r r( )r"