MINI MINI MANI MO

Path : /lib64/python3.6/lib2to3/fixes/__pycache__/
File Upload :
Current File : //lib64/python3.6/lib2to3/fixes/__pycache__/fix_operator.cpython-36.opt-2.pyc

3


 \
@sJddlZddlmZddlmZmZmZmZddZGdddej	Z
dS)N)
fixer_base)CallNameStringtouch_importcsfdd}|S)Ncs
|_|S)N)
invocation)f)s2/usr/lib64/python3.6/lib2to3/fixes/fix_operator.pydecszinvocation.<locals>.decr
)r	rr
)r	rrsrc@seZdZdZdZdZdZdeeedZddZ	e
d	d
dZe
dd
dZe
dddZ
e
dddZe
dddZe
dddZe
dddZddZd 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 > >
              )methodsobjcCs"|j||}|dk	r|||SdS)N)
_check_method)selfnoderesultsmethodr
r
r	transform+szFixOperator.transformzoperator.contains(%s)cCs|j||dS)Ncontains)_handle_rename)rrrr
r
r_sequenceIncludes0szFixOperator._sequenceIncludeszhasattr(%s, '__call__')cCs2|d}|jtdtdg}ttd||jdS)Nrz, z
'__call__'hasattr)prefix)clonerrrr)rrrrargsr
r
r_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|j||dS)Nmul)r)rrrr
r
r_repeat:szFixOperator._repeatzoperator.imul(%s)cCs|j||dS)Nimul)r)rrrr
r
r_irepeat>szFixOperator._irepeatz$isinstance(%s, collections.Sequence)cCs|j||ddS)NcollectionsSequence)_handle_type2abc)rrrr
r
r_isSequenceTypeBszFixOperator._isSequenceTypez#isinstance(%s, collections.Mapping)cCs|j||ddS)Nr"Mapping)r$)rrrr
r
r_isMappingTypeFszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|j||ddS)NZnumbersNumber)r$)rrrr
r
r
_isNumberTypeJszFixOperator._isNumberTypecCs|dd}||_|jdS)Nrr)valueZchanged)rrrnamerr
r
rrNszFixOperator._handle_renamecCsFtd|||d}|jtddj||gg}ttd||jdS)Nrz, .
isinstance)r)rrrjoinrrr)rrrmoduleabcrrr
r
rr$SszFixOperator._handle_type2abccCs\t|d|ddj}t|tjrXd|kr0|St|df}|j|}|j|d|dS)N_rrr/rzYou should use '%s' here.)getattrr*r-r"CallablestrrZwarning)rrrrsubZinvocation_strr
r
rrYs
zFixOperator._check_methodN)__name__
__module____qualname__Z
BM_compatibleorderrrdictZPATTERNrrrrrr!r%r'r)rr$rr
r
r
rr
s r
)r"Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixr
r
r
r
r<module>s

OHA YOOOO