Your IP : 3.142.219.252
U
e5db
�@sJddlZddlmZddlmZmZmZmZdd�Z Gdd�dej
�ZdS)�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S�N)�
invocation)�f��s��2/usr/lib64/python3.8/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr)rrrr
r
rsrc@s�eZdZdZdZdZdZdeeed�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)%�FixOperatorTZprez�
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�objcCs"|�||�}|dk r|||�SdSr)�
_check_method)�self�node�results�methodrrr
� transform+szFixOperator.transformzoperator.contains(%s)cCs|�||d�S)N�contains��_handle_rename�rrrrrr
�_sequenceIncludes0szFixOperator._sequenceIncludeszcallable(%s)cCs"|d}ttd�|��g|jd�S)Nr�callable��prefix)rr�cloner)rrrrrrr
�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|�||d�S)N�mulrrrrr
�_repeat9szFixOperator._repeatzoperator.imul(%s)cCs|�||d�S)N�imulrrrrr
�_irepeat=szFixOperator._irepeatz(isinstance(%s, collections.abc.Sequence)cCs|�||dd�S)N�collections.abc�Sequence��_handle_type2abcrrrr
�_isSequenceTypeAszFixOperator._isSequenceTypez'isinstance(%s, collections.abc.Mapping)cCs|�||dd�S)Nr&�Mappingr(rrrr
�_isMappingTypeEszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|�||dd�S)NZnumbers�Numberr(rrrr
�
_isNumberTypeIszFixOperator._isNumberTypecCs|dd}||_|��dS)Nrr)�valueZchanged)rrr�namerrrr
rMszFixOperator._handle_renamecCsFtd||�|d}|��tdd�||g��g}ttd�||jd�S)Nrz, �.�
isinstancer)rr r�joinrrr)rrr�module�abcr�argsrrr
r)RszFixOperator._handle_type2abccCs^t|d|ddj�}t|tjj�rZd|kr2|St|d�f}|j|}|�|d|�dS)N�_rrr4rzYou should use '%s' here.) �getattrr/r2�collectionsr5�Callable�strrZwarning)rrrr�subZinvocation_strrrr
rXs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrr!r#r%r*r,r.rr)rrrrr
rs2
�
r)Zcollections.abcr9Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixrrrrr
�<module>s
?>