AlkantarClanX12
Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_operator.cpython-311.pyc |
� c��fb � �b � d Z ddlZddlmZ ddlmZmZmZm Z d� Z G d� dej � � ZdS )a� Fixer for operator functions. operator.isCallable(obj) -> callable(obj) operator.sequenceIncludes(obj) -> operator.contains(obj) operator.isSequenceType(obj) -> isinstance(obj, collections.abc.Sequence) operator.isMappingType(obj) -> isinstance(obj, collections.abc.Mapping) operator.isNumberType(obj) -> isinstance(obj, numbers.Number) operator.repeat(obj, n) -> operator.mul(obj, n) operator.irepeat(obj, n) -> operator.imul(obj, n) � N)� fixer_base)�Call�Name�String�touch_importc � � � � fd�}|S )Nc � �� �| _ | S �N)� invocation)�f�ss ��A/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_operator.py�deczinvocation.<locals>.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 )�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 �N � | � ||� � }|� |||� � S d S r )� _check_method)�self�node�results�methods r � transformzFixOperator.transform+ s7 � ��#�#�D�'�2�2�����6�$��(�(�(� �r zoperator.contains(%s)c �0 � | � ||d� � S )N�contains��_handle_rename�r r r s r �_sequenceIncludeszFixOperator._sequenceIncludes0 s � ��"�"�4��*�=�=�=r zcallable(%s)c � � |d }t t d� � |� � � g|j �� � S )Nr �callable��prefix)r r �cloner'