Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pip/_vendor/pyparsing/__pycache__/actions.cpython-37.pyc
Назад
B �5�g� � @ s� d dl mZ d dlmZmZ G dd� d�Zdd� Zdd� Zd d � Zdd� Z e � e _ddd�Zee�dd� �Z ee�dd� �Zee �dd� �Zee�dd� �Zee�dd� �ZdS )� )�ParseException)�col�replaced_by_pep8c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �OnlyOncezI Wrapper for parse actions, to ensure they are only called once. c C s ddl m} ||�| _d| _d S )Nr )�_trim_arityF)�corer �callable�called)�selfZmethod_callr � r �>/tmp/pip-install-251nq386/pip/pip/_vendor/pyparsing/actions.py�__init__ s zOnlyOnce.__init__c C s. | j s| �|||�}d| _ |S t||d��d S )NTz.OnlyOnce obj called multiple times w/out reset)r r r )r �s�l�t�resultsr r r �__call__ s zOnlyOnce.__call__c C s d| _ dS )zK Allow the associated parse action to be called once more. FN)r )r r r r �reset s zOnlyOnce.resetN)�__name__� __module__�__qualname__�__doc__r r r r r r r r s r c s � fdd�}|S )zt Helper method for defining parse actions that require matching at a specific column in the input text. c s$ t || �� kr t| |d� � ���d S )Nzmatched token not at column )r r )�strg�locn�toks)�nr r � verify_col'