[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.138.174.53: ~ $
U

��,a��@s�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
d�Zdd
�Zgdfdd�Zdd�ZdS)a:Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�C/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_tuple_params.py�is_docstrings�rc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr��||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}t�tjd��d���fd
d�	}|jt	j
kr�||�n<|jt	jkr�t|j�D]$\}}	|	jt	j
kr�||	|dkd�q��s�dS�D]}
|d|
_
q�|}|dk�r
d
�d_n&t|dj|��r0|�d_|d}�D]}
|d|
_
�q4�|dj||�<t|d|t��d�D]}||dj|_�qr|d��dS)N�lambda�suite�argsr�rz; �Fcs\t����}|��}d|_t||���}|r2d|_|�|���t�t	j
|���g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr��endZ	new_lines�selfrr�handle_tupleCs

�z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�lineZafterrr%r�	transform.sF


zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|��}d|_|�|�dSt|�}t|�}|�	t
|��}t|dd�}	|�|	���|��D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}t�tj|	��g|�}|
j|_|
�|�q�dS)Nr�body�innerr)rcSsg|]}|���qSr)r��.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr7r8ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns*
�zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr6r)rrrrrs

@rcCsN|jtjtjfkr|S|jtjkr>|jtjkr:|jd}q"|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError�r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?r9rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+rHrrrr?�s
r?NcCsZ|dkri}t|�D]@\}}ttt|���g}t|t�rHt|||d�q||||<q|S)N)�d)r,r	r�strr�listr@)�
param_listrrJr4�objZtrailerrrrr@�s
r@cCs<g}|D](}t|t�r&|�t|��q|�|�qd�|�S)N�_)rrLr!rA�join)rM�lrNrrrrA�s
rA)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s l

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 150 B 0644
__init__.cpython-38.opt-2.pyc File 150 B 0644
__init__.cpython-38.pyc File 150 B 0644
fix_apply.cpython-38.opt-1.pyc File 1.62 KB 0644
fix_apply.cpython-38.opt-2.pyc File 1.54 KB 0644
fix_apply.cpython-38.pyc File 1.65 KB 0644
fix_asserts.cpython-38.opt-1.pyc File 1.26 KB 0644
fix_asserts.cpython-38.opt-2.pyc File 1.19 KB 0644
fix_asserts.cpython-38.pyc File 1.26 KB 0644
fix_basestring.cpython-38.opt-1.pyc File 671 B 0644
fix_basestring.cpython-38.opt-2.pyc File 626 B 0644
fix_basestring.cpython-38.pyc File 671 B 0644
fix_buffer.cpython-38.opt-1.pyc File 816 B 0644
fix_buffer.cpython-38.opt-2.pyc File 747 B 0644
fix_buffer.cpython-38.pyc File 816 B 0644
fix_dict.cpython-38.opt-1.pyc File 3.2 KB 0644
fix_dict.cpython-38.opt-2.pyc File 2.32 KB 0644
fix_dict.cpython-38.pyc File 3.26 KB 0644
fix_except.cpython-38.opt-1.pyc File 2.76 KB 0644
fix_except.cpython-38.opt-2.pyc File 2.32 KB 0644
fix_except.cpython-38.pyc File 2.76 KB 0644
fix_exec.cpython-38.opt-1.pyc File 1.1 KB 0644
fix_exec.cpython-38.opt-2.pyc File 965 B 0644
fix_exec.cpython-38.pyc File 1.13 KB 0644
fix_execfile.cpython-38.opt-1.pyc File 1.64 KB 0644
fix_execfile.cpython-38.opt-2.pyc File 1.51 KB 0644
fix_execfile.cpython-38.pyc File 1.67 KB 0644
fix_exitfunc.cpython-38.opt-1.pyc File 2.26 KB 0644
fix_exitfunc.cpython-38.opt-2.pyc File 2.19 KB 0644
fix_exitfunc.cpython-38.pyc File 2.26 KB 0644
fix_filter.cpython-38.opt-1.pyc File 2.39 KB 0644
fix_filter.cpython-38.opt-2.pyc File 1.95 KB 0644
fix_filter.cpython-38.pyc File 2.39 KB 0644
fix_funcattrs.cpython-38.opt-1.pyc File 984 B 0644
fix_funcattrs.cpython-38.opt-2.pyc File 916 B 0644
fix_funcattrs.cpython-38.pyc File 984 B 0644
fix_future.cpython-38.opt-1.pyc File 792 B 0644
fix_future.cpython-38.opt-2.pyc File 689 B 0644
fix_future.cpython-38.pyc File 792 B 0644
fix_getcwdu.cpython-38.opt-1.pyc File 796 B 0644
fix_getcwdu.cpython-38.opt-2.pyc File 730 B 0644
fix_getcwdu.cpython-38.pyc File 796 B 0644
fix_has_key.cpython-38.opt-1.pyc File 2.85 KB 0644
fix_has_key.cpython-38.opt-2.pyc File 2.29 KB 0644
fix_has_key.cpython-38.pyc File 2.88 KB 0644
fix_idioms.cpython-38.opt-1.pyc File 3.76 KB 0644
fix_idioms.cpython-38.opt-2.pyc File 3.28 KB 0644
fix_idioms.cpython-38.pyc File 3.84 KB 0644
fix_import.cpython-38.opt-1.pyc File 2.73 KB 0644
fix_import.cpython-38.opt-2.pyc File 2.43 KB 0644
fix_import.cpython-38.pyc File 2.73 KB 0644
fix_imports.cpython-38.opt-1.pyc File 4.3 KB 0644
fix_imports.cpython-38.opt-2.pyc File 4.24 KB 0644
fix_imports.cpython-38.pyc File 4.3 KB 0644
fix_imports2.cpython-38.opt-1.pyc File 554 B 0644
fix_imports2.cpython-38.opt-2.pyc File 453 B 0644
fix_imports2.cpython-38.pyc File 554 B 0644
fix_input.cpython-38.opt-1.pyc File 958 B 0644
fix_input.cpython-38.opt-2.pyc File 889 B 0644
fix_input.cpython-38.pyc File 958 B 0644
fix_intern.cpython-38.opt-1.pyc File 1.12 KB 0644
fix_intern.cpython-38.opt-2.pyc File 1.05 KB 0644
fix_intern.cpython-38.pyc File 1.12 KB 0644
fix_isinstance.cpython-38.opt-1.pyc File 1.52 KB 0644
fix_isinstance.cpython-38.opt-2.pyc File 1.21 KB 0644
fix_isinstance.cpython-38.pyc File 1.52 KB 0644
fix_itertools.cpython-38.opt-1.pyc File 1.52 KB 0644
fix_itertools.cpython-38.opt-2.pyc File 1.17 KB 0644
fix_itertools.cpython-38.pyc File 1.52 KB 0644
fix_itertools_imports.cpython-38.opt-1.pyc File 1.51 KB 0644
fix_itertools_imports.cpython-38.opt-2.pyc File 1.43 KB 0644
fix_itertools_imports.cpython-38.pyc File 1.55 KB 0644
fix_long.cpython-38.opt-1.pyc File 713 B 0644
fix_long.cpython-38.opt-2.pyc File 649 B 0644
fix_long.cpython-38.pyc File 713 B 0644
fix_map.cpython-38.opt-1.pyc File 3.03 KB 0644
fix_map.cpython-38.opt-2.pyc File 2.25 KB 0644
fix_map.cpython-38.pyc File 3.03 KB 0644
fix_metaclass.cpython-38.opt-1.pyc File 5.19 KB 0644
fix_metaclass.cpython-38.opt-2.pyc File 3.84 KB 0644
fix_metaclass.cpython-38.pyc File 5.23 KB 0644
fix_methodattrs.cpython-38.opt-1.pyc File 946 B 0644
fix_methodattrs.cpython-38.opt-2.pyc File 870 B 0644
fix_methodattrs.cpython-38.pyc File 946 B 0644
fix_ne.cpython-38.opt-1.pyc File 819 B 0644
fix_ne.cpython-38.opt-2.pyc File 774 B 0644
fix_ne.cpython-38.pyc File 819 B 0644
fix_next.cpython-38.opt-1.pyc File 2.99 KB 0644
fix_next.cpython-38.opt-2.pyc File 2.93 KB 0644
fix_next.cpython-38.pyc File 3.02 KB 0644
fix_nonzero.cpython-38.opt-1.pyc File 931 B 0644
fix_nonzero.cpython-38.opt-2.pyc File 872 B 0644
fix_nonzero.cpython-38.pyc File 931 B 0644
fix_numliterals.cpython-38.opt-1.pyc File 1.01 KB 0644
fix_numliterals.cpython-38.opt-2.pyc File 969 B 0644
fix_numliterals.cpython-38.pyc File 1.01 KB 0644
fix_operator.cpython-38.opt-1.pyc File 4.13 KB 0644
fix_operator.cpython-38.opt-2.pyc File 3.66 KB 0644
fix_operator.cpython-38.pyc File 4.13 KB 0644
fix_paren.cpython-38.opt-1.pyc File 1.37 KB 0644
fix_paren.cpython-38.opt-2.pyc File 1.23 KB 0644
fix_paren.cpython-38.pyc File 1.37 KB 0644
fix_print.cpython-38.opt-1.pyc File 2.22 KB 0644
fix_print.cpython-38.opt-2.pyc File 1.94 KB 0644
fix_print.cpython-38.pyc File 2.3 KB 0644
fix_raise.cpython-38.opt-1.pyc File 2.21 KB 0644
fix_raise.cpython-38.opt-2.pyc File 1.6 KB 0644
fix_raise.cpython-38.pyc File 2.21 KB 0644
fix_raw_input.cpython-38.opt-1.pyc File 803 B 0644
fix_raw_input.cpython-38.opt-2.pyc File 736 B 0644
fix_raw_input.cpython-38.pyc File 803 B 0644
fix_reduce.cpython-38.opt-1.pyc File 1.11 KB 0644
fix_reduce.cpython-38.opt-2.pyc File 1006 B 0644
fix_reduce.cpython-38.pyc File 1.11 KB 0644
fix_reload.cpython-38.opt-1.pyc File 1.13 KB 0644
fix_reload.cpython-38.opt-2.pyc File 1.06 KB 0644
fix_reload.cpython-38.pyc File 1.13 KB 0644
fix_renames.cpython-38.opt-1.pyc File 1.97 KB 0644
fix_renames.cpython-38.opt-2.pyc File 1.89 KB 0644
fix_renames.cpython-38.pyc File 1.97 KB 0644
fix_repr.cpython-38.opt-1.pyc File 853 B 0644
fix_repr.cpython-38.opt-2.pyc File 789 B 0644
fix_repr.cpython-38.pyc File 853 B 0644
fix_set_literal.cpython-38.opt-1.pyc File 1.65 KB 0644
fix_set_literal.cpython-38.opt-2.pyc File 1.58 KB 0644
fix_set_literal.cpython-38.pyc File 1.65 KB 0644
fix_standarderror.cpython-38.opt-1.pyc File 728 B 0644
fix_standarderror.cpython-38.opt-2.pyc File 674 B 0644
fix_standarderror.cpython-38.pyc File 728 B 0644
fix_sys_exc.cpython-38.opt-1.pyc File 1.39 KB 0644
fix_sys_exc.cpython-38.opt-2.pyc File 1.22 KB 0644
fix_sys_exc.cpython-38.pyc File 1.39 KB 0644
fix_throw.cpython-38.opt-1.pyc File 1.77 KB 0644
fix_throw.cpython-38.opt-2.pyc File 1.55 KB 0644
fix_throw.cpython-38.pyc File 1.77 KB 0644
fix_tuple_params.cpython-38.opt-1.pyc File 4.49 KB 0644
fix_tuple_params.cpython-38.opt-2.pyc File 4.17 KB 0644
fix_tuple_params.cpython-38.pyc File 4.49 KB 0644
fix_types.cpython-38.opt-1.pyc File 1.8 KB 0644
fix_types.cpython-38.opt-2.pyc File 1.34 KB 0644
fix_types.cpython-38.pyc File 1.8 KB 0644
fix_unicode.cpython-38.opt-1.pyc File 1.52 KB 0644
fix_unicode.cpython-38.opt-2.pyc File 1.35 KB 0644
fix_unicode.cpython-38.pyc File 1.52 KB 0644
fix_urllib.cpython-38.opt-1.pyc File 5.87 KB 0644
fix_urllib.cpython-38.opt-2.pyc File 5.32 KB 0644
fix_urllib.cpython-38.pyc File 5.87 KB 0644
fix_ws_comma.cpython-38.opt-1.pyc File 1.1 KB 0644
fix_ws_comma.cpython-38.opt-2.pyc File 941 B 0644
fix_ws_comma.cpython-38.pyc File 1.1 KB 0644
fix_xrange.cpython-38.opt-1.pyc File 2.48 KB 0644
fix_xrange.cpython-38.opt-2.pyc File 2.42 KB 0644
fix_xrange.cpython-38.pyc File 2.48 KB 0644
fix_xreadlines.cpython-38.opt-1.pyc File 1.1 KB 0644
fix_xreadlines.cpython-38.opt-2.pyc File 1002 B 0644
fix_xreadlines.cpython-38.pyc File 1.1 KB 0644
fix_zip.cpython-38.opt-1.pyc File 1.55 KB 0644
fix_zip.cpython-38.opt-2.pyc File 1.23 KB 0644
fix_zip.cpython-38.pyc File 1.55 KB 0644