AlkantarClanX12

Your IP : 3.128.226.128


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/libpasteurize/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/libpasteurize/__pycache__/main.cpython-311.pyc

�

�܋f���v�dZddlmZmZmZddlZddlZddlZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZd	d�Z	dS)
a�
pasteurize: automatic conversion of Python 3 code to clean 2/3 code
===================================================================

``pasteurize`` attempts to convert existing Python 3 code into source-compatible
Python 2 and 3 code.

Use it like this on Python 3 code:

  $ pasteurize --verbose mypython3script.py

This removes any Py3-only syntax (e.g. new metaclasses) and adds these
import lines:

    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    from __future__ import unicode_literals
    from future import standard_library
    standard_library.install_hooks()
    from builtins import *

To write changes to the files, use the -w flag.

It also adds any other wrappers needed for Py2/3 compatibility.

Note that separate stages are not available (or needed) when converting from
Python 3 with ``pasteurize`` as they are when converting from Python 2 with
``futurize``.

The --all-imports option forces adding all ``__future__`` imports,
``builtins`` imports, and standard library aliases, even if they don't
seem necessary for the current state of each module. (This can simplify
testing, and can reduce the need to think about Py2 compatibility when editing
the code further.)

�)�absolute_import�print_function�unicode_literalsN)�main�warn�StdoutRefactoringTool)�refactor)�__version__)�	fix_namesc�*��tjd���}|�dddd���|�dd	dd
���|�ddd
gd���|�dddddd���|�ddd
gd���|�dddd���|�dddd���|�d dd!���|�d"d#dd$���|�d%d&dd'd(���d'}i}|�|��\}}d)}t}d*|d+<|js|jrtd,��|js|jr|�	d-��|j
rtt��d.S|j
r4td/��t|��D]}t|���|sd.S|s8td0tj�1��td2tj�1��d3Sd4|vr&d*}|jrtd5tj�1��d3S|jrt$jnt$j}t%jd6|�7��t-��}	|jD]NJd8�vr|	������fd9�|D��}
t3|
��dkr>td:d;�d<�|
D����ztj�1��d3St3|
��d.krtd=tj�1��d3S|	�|
d.����t-��}|jrJd>}|�|d?z��|�|d@z��|�|dAz��t-��}
|j�rJd'}|jD]Њ�dBkrd*}�d8�vr|
�����%�fdC�|D��}
t3|
��dkr>td:d;�dD�|
D����ztj�1��d3St3|
��d.krtd=tj�1��d3S|
�|
d.����t3|
|	z��d.kr@tdEd;�dF�|
|	zD����ztj�1��d3S|r|�|
��n|
}n|�|
��}|||	z
z}t=t|��|t-��|j|j��}|js�|r|� ��nb	|�!||jdG|j"��n>#tBj#$r,|j"dksJ�tdHtj�1��YdSwxYw|�$��tKtM|j����S)IzBMain program.

    Returns a suggested exit status (0, 1, 2).
    z!pasteurize [options] file|dir ...)�usagez-Vz	--version�
store_truez'Report the version number of pasteurize)�action�helpz-az
--all-importsz5Adds all __future__ and future imports to each modulez-fz--fix�appendz1Each FIX specifies a transformation; default: all)r�defaultrz-jz--processes�store��intzRun 2to3 concurrently)rr�typerz-xz--nofixzPrevent a fixer from being run.z-lz--list-fixeszList available transformationsz-vz	--verbosezMore verbose loggingz
--no-diffsz#Don't show diffs of the refactoringz-wz--writezWrite back modified filesz-nz--nobackupsFz'Don't write backups for modified files.zlibpasteurize.fixesTrz@not writing files and not printing diffs; that's not very usefulzCan't use -n without -wrz2Available transformations for the -f/--fix option:z1At least one file or directory argument required.)�filezUse --help to show usage.��-zCan't write to stdin.z%(name)s: %(message)s)�format�levelz.fix_c�d��g|],}|�d�������*|��-S�zfix_{0}��endswithr��.0�f�fixs  ��c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/libpasteurize/main.py�
<listcomp>zmain.<locals>.<listcomp>}sG���;�;�;�1��
�
�9�#3�#3�C�#8�#8�9�9�;�Q�;�;�;�zOAmbiguous fixer name. Choose a fully qualified module name instead from these:
�
c3� K�|]	}d|zV��
dS�z  N��r!�myfs  r$�	<genexpr>zmain.<locals>.<genexpr>�s&����<�<�s��s�
�<�<�<�<�<�<r&z1Unknown fixer. Use --list-fixes or -l for a list.zlibpasteurize.fixes.�fix_add_all__future__imports�&fix_add_future_standard_library_import�fix_add_all_future_builtins�allc�d��g|],}|�d�������*|��-Srrr s  �r$r%zmain.<locals>.<listcomp>�sN���C�C�C�1� !�
�
�9�+;�+;�C�+@�+@� A� A�C�Q�C�C�Cr&c3� K�|]	}d|zV��
dSr)r*r+s  r$r-zmain.<locals>.<genexpr>�s&����'D�'D�s��s�
�'D�'D�'D�'D�'D�'Dr&z[Conflicting usage: the following fixers have been simultaneously requested and disallowed:
c3� K�|]	}d|zV��
dSr)r*r+s  r$r-zmain.<locals>.<genexpr>�s&����N�N�3�D�3�J�N�N�N�N�N�Nr&Nz+Sorry, -j isn't supported on this platform.)'�optparse�OptionParser�
add_option�
parse_argsr�write�no_diffsr�	nobackups�error�version�printr
�
list_fixes�sorted�sys�stderr�verbose�logging�DEBUG�INFO�basicConfig�set�nofix�add�len�join�all_importsr#�unionr�errors�refactor_stdinr	�	processes�MultiprocessingUnsupported�	summarizer�bool)�args�parserrP�flags�options�	fixer_pkg�avail_fixes�fixnamer�unwanted_fixes�found�extra_fixes�prefix�explicit�all_present�	requested�fixer_names�rtr#s                  @r$rr3s�����
"�)L�
M�
M�
M�F�
���d�K��D��F�F�F�
���d�O�L�R��T�T�T�
���d�G�H�b�N��P�P�P�
���d�M�'�1� �'>��@�@�@�
���d�I�h��<��>�>�>�
���d�N�<�;��=�=�=����d�K��1��3�3�3�
���l�<�@��B�B�B�
���d�I�l�6��8�8�8�
���d�M�,��D��F�F�F��N��E��%�%�d�+�+�M�G�T�%�I��K�"�E�
���=�Q�W�-�Q��
O�P�P�P��=�0�W�.�0����.�/�/�/����
�k�����q����
�B�C�C�C��k�*�*�	�	�G��'�N�N�N�N��	��1���
�A��:�	�	�	�	�
�)��
�;�;�;�;��q�
�d�{�{����=�	��)��
�;�;�;�;��1�%�_�>�G�M�M�'�,�E���6�e�D�D�D�D��U�U�N��}�)�)���c�>�>����s�#�#�#�#�
;�;�;�;��;�;�;�E��5�z�z�A�~�~��:��i�i�<�<�e�<�<�<�<�<�=��:�'�'�'�'��q�q��U���q����I��:�'�'�'�'��q�q����u�Q�x�(�(�(�(��%�%�K���@�'������!?�?�@�@�@�����!I�I�J�J�J�����!>�>�?�?�?��u�u�H��{�!0����;�	+�	+�C��e�|�|�"����c�>�>��L�L��%�%�%�%�
C�C�C�C��C�C�C�E��5�z�z�A�~�~��B�"�i�i�'D�'D�e�'D�'D�'D�D�D�E�$'�:�/�/�/�/� !�q�q��U���q����Q�#&�:�/�/�/�/� �q�q��L�L��q��*�*�*�*��x�.�(�)�)�A�-�-��?��)�)�N�N�8�n�3L�N�N�N�N�N�O��z�
#�
#�
#�
#��1�3>�L�K�%�%�h�/�/�/�H�	�	��%�%�h�/�/�	��k�N�:�:�K�
�v�k�2�2�E�3�5�5�&�0�g�6F�2F�
H�
H�B��9���
	��������
����D�'�-��#�-�/�/�/�/���6�
�
�
��(�1�,�,�,�,��4�:=�*�F�F�F�F��q�q�	
����
	�������t�B�I�����s�?"V"�"7W�W)N)�__doc__�
__future__rrrrArDr5�lib2to3.mainrrr�lib2to3r	�futurer
�libpasteurize.fixesrr*r&r$�<module>rks���$�$�LK�J�J�J�J�J�J�J�J�J�
�
�
�
���������:�:�:�:�:�:�:�:�:�:�������������)�)�)�)�)�)�Y �Y �Y �Y �Y �Y r&