ut6 ` d dl Zd dlmZ d dlmZmZmZmZ d Z G d dej
ZdS ) N)
fixer_base)CallNameStringtouch_importc fd}|S )Nc | _ | S N)
invocation)fss G/opt/alt/python-internal/lib64/python3.11/lib2to3/fixes/fix_operator.pydeczinvocation..dec s )r
r s ` r r r s# Jr c n e Zd ZdZdZdZdZd eee z Zd Z e
d d Z e
d
d Z e
d d
Z
e
d d Z e
d d Z e
d d Z e
d d Zd Zd Zd ZdS )FixOperatorTprez
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 > >
)methodsobjc N | || }| ||| S d S r
)
_check_method)selfnoderesultsmethods r transformzFixOperator.transform+ s7 ##D'226$((( r zoperator.contains(%s)c 0 | ||d S )Ncontains_handle_renamer r r s r _sequenceIncludeszFixOperator._sequenceIncludes0 s ""4*===r zcallable(%s)c |d }t t d | g|j S )Nr callableprefix)r r cloner' )r r r r s r _isCallablezFixOperator._isCallable4 s4 enD$$syy{{mDKHHHHr zoperator.mul(%s)c 0 | ||d S )Nmulr r" s r _repeatzFixOperator._repeat9 s ""4%888r zoperator.imul(%s)c 0 | ||d S )Nimulr r" s r _irepeatzFixOperator._irepeat= s ""4&999r z(isinstance(%s, collections.abc.Sequence)c 2 | ||dd S )Ncollections.abcSequence_handle_type2abcr" s r _isSequenceTypezFixOperator._isSequenceTypeA s $$T74EzRRRr z'isinstance(%s, collections.abc.Mapping)c 2 | ||dd S )Nr1 Mappingr3 r" s r _isMappingTypezFixOperator._isMappingTypeE s $$T74EyQQQr zisinstance(%s, numbers.Number)c 2 | ||dd S )NnumbersNumberr3 r" s r
_isNumberTypezFixOperator._isNumberTypeI s $$T7IxHHHr c X |d d }||_ | d S )Nr r )valuechanged)r r r namer s r r! zFixOperator._handle_renameM s. "1%r c t d || |d }| t dd ||g z g}t t d ||j S )Nr z, .
isinstancer&