3 \@spdZddlmZddlmZddddddd d d d d d ddddddddddZddeDZGdddejZdS)aFixer 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)Namebool memoryviewtypecomplexdictztype(Ellipsis)floatintlistobjectz type(None)ztype(NotImplemented)slicebytesz(str,)tuplestrrange)Z BooleanTypeZ BufferTypeZ ClassTypeZ ComplexTypeZDictTypeZDictionaryTypeZ EllipsisTypeZ FloatTypeZIntTypeZListTypeZLongTypeZ ObjectTypeZNoneTypeZNotImplementedTypeZ SliceTypeZ StringTypeZ StringTypesZ TupleTypeZTypeTypeZ UnicodeTypeZ XRangeTypecCsg|] }d|qS)z)power< 'types' trailer< '.' name='%s' > >).0trr!/usr/lib64/python3.6/fix_types.py 3src@s"eZdZdZdjeZddZdS)FixTypesT|cCs&tj|dj}|r"t||jdSdS)Nname)prefix) _TYPE_MAPPINGgetvaluerr)selfZnoderesultsZ new_valuerrr transform9szFixTypes.transformN)__name__ __module__ __qualname__Z BM_compatiblejoin_patsZPATTERNr rrrrr5s rN) __doc__rZ fixer_utilrrr%ZBaseFixrrrrrs2