Edit File: actions.cpython-311.pyc
� Q�d� � �B � d dl mZ d dlmZmZ G d� d� � Zd� Zd� Zd� Zd� Z e � � e _ dd �Z ee� � d� � � Z ee� � d� � � Z ee � � d � � � Z ee� � d� � � Z ee� � d� � � ZdS )� )�ParseException)�col�replaced_by_pep8c �$ � e Zd ZdZd� Zd� Zd� ZdS )�OnlyOncezI Wrapper for parse actions, to ensure they are only called once. c �@ � ddl m} ||� � | _ d| _ d S )Nr )�_trim_arityF)�corer �callable�called)�self�method_callr s �n/builddir/build/BUILD/cloudlinux-venv-1.0.2/venv/lib/python3.11/site-packages/pip/_vendor/pyparsing/actions.py�__init__zOnlyOnce.__init__ s0 � �%�%�%�%�%�%�#��K�0�0�� ������ c �r � | j s | � |||� � }d| _ |S t ||d� � �)NTz.OnlyOnce obj called multiple times w/out reset)r r r )r �s�l�t�resultss r �__call__zOnlyOnce.__call__ s@ � ��{� ��m�m�A�q�!�,�,�G��D�K��N��Q��#S�T�T�Tr c � � d| _ dS )zK Allow the associated parse action to be called once more. FN)r )r s r �resetzOnlyOnce.reset s � � ����r N)�__name__� __module__�__qualname__�__doc__r r r � r r r r sN � � � � � �� �� � �U� U� U�� � � � r r c � � � � fd�}|S )zt Helper method for defining parse actions that require matching at a specific column in the input text. c �X �� t || � � �k rt | |d�� �� � �d S )Nzmatched token not at column )r r )�strg�locn�toks�ns �r � verify_colz%match_only_at_col.<locals>.verify_col'