D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
python3.9
/
site-packages
/
argcomplete
/
__pycache__
/
Filename :
my_argparse.cpython-39.opt-1.pyc
back
Copy
a �]�; � @ sv d dl mZmZmZmZ d dl mZmZmZmZm Z d dl m Z mZ i Zdd� Z dd� Zdd d �ZG dd� de�Zd S )� )�ArgumentParser� ArgumentError�SUPPRESS�_SubParsersAction)�OPTIONAL�ZERO_OR_MORE�ONE_OR_MORE� REMAINDER�PARSER)�_get_action_name�_c C s\ t �| d�}| jtttfv r dS | jtkr2|dkS | jtkr@dS | jdu rR|dkS || jkS )zt Returns False if the parse would raise an error if no more arguments are given to this action, True otherwise. r T� FN)�_num_consumed_args�get�nargsr r r r r ��action�num_consumed_args� r �;/usr/lib/python3.9/site-packages/argcomplete/my_argparse.py�action_is_satisfied s r c C sH t �| d�}| jttttfv r"dS | jtks6| jdu r>|dkS || jk S )zV Returns True if action could consume more arguments (i.e., its pattern is open). r TN)r r r r r r r r r r r r �action_is_open s r Fc C sB t �| d�}| jr,|s"t| �s"dS | jtkS | jtko<|dkS dS )z� Returns True if action will necessarily consume the next argument. isoptional indicates whether the argument is an optional (starts with -). r Tr N)r r �option_stringsr r r )r Z isoptionalr r r r �action_is_greedy- s r c @ s e Zd ZdZdd� ZdS )�IntrospectiveArgumentParserz� The following is a verbatim copy of ArgumentParser._parse_known_args (Python 2.7.3), except for the lines that contain the string "Added by argcomplete". c s� t �� �� _g � _� jd ur(� ����i � � � _� jD ]R}|j}t |j�D ]<\}}� � |g �}|�|d |� � |�||d d � � qLq8i �g }t��} t | �D ]^\}} | dkr�|� d� | D ]} |� d� q�q�� �| �}|d u r�d}n|�|<