관리-도구
편집 파일: fix_operator.cpython-39.opt-2.pyc
a �����DOgb ����������������������@���sJ���d�dl�Zd�dlmZ�d�dlmZmZmZmZ�dd��Z G�dd��dej �ZdS�)�����N)� fixer_base)�Call�Name�String�touch_importc��������������������s�����fdd�}|S�)Nc��������������������s �����|�_�|�S��N)� invocation)�f��s���2/usr/lib64/python3.9/lib2to3/fixes/fix_operator.py�dec���s����zinvocation.<locals>.decr���)r���r���r���r ���r ���r������s����r���c�������������������@���s����e�Zd�ZdZdZdZdZdeeed��Zdd��Z e d �d d���Ze d�d d���Ze d�dd���Z e d�dd���Ze d�dd���Ze d�dd���Ze d�dd���Zdd��Zd d!��Zd"d#��Zd$S�)%�FixOperatorT�prez� method=('isCallable'|'sequenceIncludes' |'isSequenceType'|'isMappingType'|'isNumberType' |'repeat'|'irepeat') z'(' obj=any ')'z� power< module='operator' trailer< '.' %(methods)s > trailer< %(obj)s > > | power< %(methods)s trailer< %(obj)s > > )�methods�objc�����������������C���s"���|���||�}|d�ur|||�S�d�S�r���)� _check_method)�self�node�results�methodr���r���r ���� transform+���s����zFixOperator.transformzoperator.contains(%s)c�����������������C���s���|���||d�S�)N�contains��_handle_rename�r���r���r���r���r���r ����_sequenceIncludes0���s����zFixOperator._sequenceIncludeszcallable(%s)c�����������������C���s"���|d�}t�td�|���g|jd�S�)Nr����callable��prefix)r���r����cloner ���)r���r���r���r���r���r���r ����_isCallable4���s����zFixOperator._isCallablezoperator.mul(%s)c�����������������C���s���|���||d�S�)N�mulr���r���r���r���r ����_repeat9���s����zFixOperator._repeatzoperator.imul(%s)c�����������������C���s���|���||d�S�)N�imulr���r���r���r���r ����_irepeat=���s����zFixOperator._irepeatz(isinstance(%s, collections.abc.Sequence)c�����������������C���s���|���||dd�S�)N�collections.abc�Sequence��_handle_type2abcr���r���r���r ����_isSequenceTypeA���s����zFixOperator._isSequenceTypez'isinstance(%s, collections.abc.Mapping)c�����������������C���s���|���||dd�S�)Nr'����Mappingr)���r���r���r���r ����_isMappingTypeE���s����zFixOperator._isMappingTypezisinstance(%s, numbers.Number)c�����������������C���s���|���||dd�S�)NZnumbers�Numberr)���r���r���r���r ���� _isNumberTypeI���s����zFixOperator._isNumberTypec�����������������C���s���|d�d�}||_�|����d�S�)Nr���r���)�value�changed)r���r���r����namer���r���r���r ���r���M���s����zFixOperator._handle_renamec�����������������C���sF���t�d�||��|d�}|���tdd�||g���g}ttd�||jd�S�)Nr���z, �.� isinstancer���)r���r!���r����joinr���r���r ���)r���r���r����module�abcr����argsr���r���r ���r*���R���s����zFixOperator._handle_type2abcc�����������������C���s^���t�|�d|d�d�j��}t|tjj�rZd|v�r2|S�t|d��f}|j|�}|��|d|���d�S�)N�_r���r���r6���r���zYou should use '%s' here.) �getattrr0���r4����collectionsr7����Callable�strr����warning)r���r���r���r����subZinvocation_strr���r���r ���r���X���s���� zFixOperator._check_methodN)�__name__� __module__�__qualname__Z BM_compatible�orderr���r����dictZPATTERNr���r���r���r"���r$���r&���r+���r-���r/���r���r*���r���r���r���r���r ���r������s2��� � r���)�collections.abcr;���Zlib2to3r���Zlib2to3.fixer_utilr���r���r���r���r���ZBaseFixr���r���r���r���r ����<module>���s���