관리-도구
편집 파일: fix_kwargs.cpython-311.pyc
� �܋fg � � � d Z ddlmZ ddlmZmZmZmZmZ ddl m Z mZmZ dZ dZdZdZd � Zefd �Zefd�Z G d� d ej � � ZdS )zg Fixer for Python 3 function parameter syntax This fixer is rather sensitive to incorrect py3k syntax. � )� fixer_base)�token�String�Newline�Comma�Name)�indentation�suitify� DoubleStarz=%(name)s = %(kwargs)s['%(name)s']; del %(kwargs)s['%(name)s']z'if '%(name)s' in %(kwargs)s: %(assign)szelse: %(name)s = %(default)s�_3to2kwargsc # � K � | d j t j k rt | � � dk sJ �d}t | � � }||k r�| | }|j }|j t j k r|dz }�0|�|j t j k rdS |j }|j }|�"|j t j k r |j }|dz }nd}||fV � |dz }||k ��dS dS )z� Generator that yields tuples of (name, default_value) for each parameter in the list If no default is given, then it is default_value is None (not Leaf(token.NAME, 'None')) r � � N) �typer �STAR�len�prev_sibling�NAME� DOUBLESTAR�value�next_sibling�EQUAL)� raw_params�curr_idx�max_idx� curr_item� prev_item�name�nxt� default_values �o/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/libpasteurize/fixes/fix_kwargs.py� gen_paramsr"