Viewing File: /opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/fix_types.cpython-312.pyc
�
<��i� � �� � d Z ddlmZ ddlmZ i dd�dd�dd �d
d�dd
�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d d%d&d'��ZeD � cg c] } d(| z �� c} Z G d)� d*ej � Zy+c c} w ),a� Fixer for removing uses of the types module.
These work for only the known names in the types module. The forms above
can include types. or not. ie, It is assumed the module is imported either as:
import types
from types import ... # either * or specific types
The import statements are not modified.
There should be another fixer that handles at least the following constants:
type([]) -> list
type(()) -> tuple
type('') -> str
� )�
fixer_base)�Name�BooleanType�bool�
BufferType�
memoryview� ClassType�type�ComplexType�complex�DictType�dict�DictionaryType�EllipsisTypeztype(Ellipsis)� FloatType�float�IntType�int�ListType�list�LongType�
ObjectType�object�NoneTypez
type(None)�NotImplementedTypeztype(NotImplemented)� SliceType�slice�
StringType�bytes�StringTypesz(str,)�tuple�str�range)� TupleType�TypeType�UnicodeType�
XRangeTypez)power< 'types' trailer< '.' name='%s' > >c �8 � e Zd ZdZdj e� Zd� Zy)�FixTypesT�|c �z � t j |d j � }|rt ||j �� S y )N�name)�prefix)�
_TYPE_MAPPING�get�valuer r- )�self�node�results� new_values �>/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_types.py� transformzFixTypes.transform9 s3 � �!�%�%�g�f�o�&;�&;�<� ��� �$�+�+�6�6�� N)�__name__�
__module__�__qualname__�
BM_compatible�join�_pats�PATTERNr6 � r7 r5 r) r) 5 s � ��M��h�h�u�o�G�r7 r) N) �__doc__� r �
fixer_utilr r. r= �BaseFixr) )�ts 0r5 �<module>rE s, ���&