PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/alembic/testing/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/alembic/testing/__pycache__/util.cpython-312.pyc

�

���g
��`�ddlmZddlZddlmZddlmZddlmZd�Z	d�Z
dd	�Zd
d
�Zdd�Z
y)�)�annotationsN)�Union)�inspect_getfullargspec�)�sqla_2c
�P��ddlm}t�}|D]�|j���t	|�}|j
|D��cgc]2�dj
�fd�|D��ft�fd�|D��z��4c}ddt|�zzdj
|�d	��Scc}w)
aA facade around @testing.combinations() oriented towards boolean
    keyword-based arguments.

    Basically generates a nice looking identifier based on the keywords
    and also sets up the argument names.

    E.g.::

        @testing.flag_combinations(
            dict(lazy=False, passive=False),
            dict(lazy=True, passive=False),
            dict(lazy=False, passive=True),
            dict(lazy=False, passive=True, raiseload=True),
        )


    would result in::

        @testing.combinations(
            ('', False, False, False),
            ('lazy', True, False, False),
            ('lazy_passive', True, True, False),
            ('lazy_passive', True, True, True),
            id_='iaaa',
            argnames='lazy,passive,raiseload'
        )

    r��config�_c3�H�K�|]}�j|d�s�|���y�w�FN��get��.0�k�ds  ��C/opt/hc_python/lib/python3.12/site-packages/alembic/testing/util.py�	<genexpr>z$flag_combinations.<locals>.<genexpr>9s�����9��A����q�%��a��s�"�"c3�B�K�|]}�j|d����y�wr
rrs  �rrz$flag_combinations.<locals>.<genexpr>:s�����2�T��A�E�E�!�U�O�T�s��i�a�,)�id_�argnames)	�sqlalchemy.testingr
�set�update�sorted�combinations�join�tuple�len)r r
�keysrs   `r�flag_combinationsr%s����:*��5�D�
�����A����$�<�D��6���"�

�"���X�X�9��9�
9�;��2�T�2�2�
3�!�

�

�3��T��?�#����$�����

s�7B#c��t|�d}|D�cic]}||j|���}}t|j�}|j	|�tj|j|�}|di|��Scc}w)z�Given a no-arg lambda and a namespace, return a new lambda that
    has all the values filled in.

    This is used so that we can have module-level fixtures that
    refer to instance-level variables using lambdas.

    r�)r�pop�dict�__globals__r�types�FunctionType�__code__)�__fn�kw�pos_args�arg�
pass_pos_args�glb�new_fns       r�resolve_lambdar5Bsx��&�d�+�A�.�H�19�:��#�S�"�&�&��+�%��M�:�
�t���
 �C��J�J�r�N�
�
�
��
�
�s�
3�F��"�M�"�"��	;s�A<c�2����ddlm�ddlm����fd�}|S)z&Provide MetaData for a pytest fixture.rr	�)�fixture_functionsc�B�����fd�}�j���|�S)Nc3��K�ddlm}|j�x}|_	�||�}|j	�j
�|��|j
�j
�y#|j
�j
�wxYw�w)Nr)�schema)�
sqlalchemyr;�MetaData�metadata�
create_all�db�drop_all)�selfr;r>�resultr
�fns    ��r�run_ddlz3metadata_fixture.<locals>.decorate.<locals>.run_ddlZsk�����)�'-���'8�8�H�t�}�
-��D�(�+���#�#�F�I�I�.����!�!�&�)�)�,���!�!�&�)�)�,�s�B�(A&�
B�&B�B)�scope)�fixture)rDrEr
�ddlr8s` ���r�decoratez"metadata_fixture.<locals>.decorateYs&���	-�4� �(�(�s�(�3�G�<�<�)rr
�r8)rHrIr
r8s` @@r�metadata_fixturerLSs���*�#�=� �OrJc�,�	t|�S#|cYSxYw)N)�int)�values r�	_safe_intrPls����5�z������s�

�c��ddlm}ddlm}|s!t	|j
jdd�}ts	|rd|ini}ni}|||fi|��S)Nrr	)�testing_engine�
future_engineF�future)rr
�sqlalchemy.testing.enginesrR�getattr�_current�optionsr)�urlrXrTr
rRr/s      rrRrRssK��)�9������0�0�/�5�I���#)�h��
�r��
���#�w�-�"�-�-rJ)�function)rO�str�returnzUnion[int, str])NNF)�
__future__rr+�typingr�sqlalchemy.utilr�utilrr%r5rLrPrRr'rJr�<module>ras0��#���2��.�b#�"�2�.rJ

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic