Your IP : 18.221.221.171
���]� � @ s� d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z m Z m
Z
m Z d d � Z Gd d � d e j
� Z d d
� Z d d � Z g d
d d � Z d d � Z d
S)� )�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number� Subscript�symsc C s) t | t j � o( | j d j t j k S)N� )�
isinstancer �Node�children�typer �STRING)�stmt� r �5/opt/alt/python35/lib64/python3.5/fix_tuple_params.py�is_docstring s r c @ s: e Z d Z d Z d Z d Z d d � Z d d � Z d S) �FixTupleParams� Ta
funcdef< 'def' any parameters< '(' args=any ')' >
['->' any] ':' suite=any+ >
|
lambda=
lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
':' body=any
>
c s- d | k r � j | | � Sg � | d } | d } | d j d j t j k ry d } | d j d j } t � � n! d } d } t j t j d � � d � � � f d
d � } | j t j
k r� | | � nZ | j t j k r.xE t | j � D]4 \ } } | j t j
k r� | | d | d k �q� W� s8d Sx � D] }
| d |
_
q?W| } | d k rxd
� d _ n. t | d j | � r�| � d _ | d } x � D] }
| d |
_
q�W� | d j | | � <x= t | d | t � � d � D] } | | d j | _ q�W| d j � d S)N�lambda�suite�argsr � r z; � Fc s� t � j � � } | j � } d | _ t | | j � � } | rK d | _ | j | � � j t j t j
| � j � g � � d S)Nr � )r �new_name�clone�prefixr �replace�appendr r
r
Zsimple_stmt)Z tuple_arg�
add_prefix�n�argr )�end� new_lines�selfr r �handle_tupleC s
z.FixTupleParams.transform.<locals>.handle_tupler"