Your IP : 3.15.198.9


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

3


 \��@spdZddlmZddlmZddddddd	d
dddd
dddddddddd�Zdd�eD�ZGdd�dej�ZdS)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�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�!/usr/lib64/python3.6/fix_types.py�
<listcomp>3src@s"eZdZdZdje�Zdd�ZdS)�FixTypesT�|cCs&tj|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnode�resultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNr rrrrr5s
rN)	�__doc__�rZ
fixer_utilrrr%ZBaseFixrrrrr�<module>s2