0x1949 Team - FAZEMRX - MANAGER
Edit File: parser.cpython-310.pyc
o �(�f� � @ s~ d dl Z d dlmZ d dlmZ d dlmZmZ d dlm Z edde fdefd efg�ZG d d� de�Z G dd � d e j�ZdS )� N)�OrderedDict)�Enum)�List� NamedTuple)�messages� HelpEntry�position�name�help_stringc @ sj e Zd ZG dd� d�Zedej�Zedej�Zedej �Z edej�Zedej �Zdd � Zed d� �ZdS ) �HelpCategoryc @ s e Zd Zdedefdd�ZdS )zHelpCategory._Value�code�msgc C s || _ || _d S �N)r r )�selfr r � r �5/usr/lib/python3/dist-packages/uaclient/cli/parser.py�__init__ s zHelpCategory._Value.__init__N)�__name__� __module__�__qualname__�strr r r r r �_Value s r � quickstart�security�troubleshoot�other�flagsc C � | j jS r )�valuer �r r r r �__str__ s zHelpCategory.__str__c C r r )r r r r r r �header s zHelpCategory.headerN)r r r r r �CLI_HELP_HEADER_QUICK_START� QUICKSTART�CLI_HELP_HEADER_SECURITY�SECURITY�CLI_HELP_HEADER_TROUBLESHOOT�TROUBLESHOOT�CLI_HELP_HEADER_OTHER�OTHER� CLI_FLAGS�FLAGSr �propertyr! r r r r r s �r c s� e Zd Zeejg fejg fejg fejg fej g fg�Z e ddededede fdd��Zdd �d ef� fdd�Zd efdd�Z� fdd�Z� ZS )�ProArgumentParserr �categoryr r r c C s | j | �t|||d�� d S )N)r r r )�help_entries�appendr )�clsr. r r r r r r �add_help_entry/ s �z ProArgumentParser.add_help_entryT)� use_main_helpr3 c s t � j|i |�� || _d S r )�superr r3 )r r3 �args�kwargs�� __class__r r r ; s zProArgumentParser.__init__�commandc C s8 |� � }|�d� z| �|� W d S ty Y d S w )Nz--help)�splitr0 � parse_args� SystemExit)r r9 � args_listr r r �print_help_for_command? s �z(ProArgumentParser.print_help_for_commandc s� | j rt� �� S | �� }| j�� D ]1\}}|d7 }|d�|j�7 }|d7 }t|dd� d�D ]}|d7 }|d�|j |j �7 }q-|d7 }q| jrS|d7 }|| j7 }|d7 }|S )N� z{}:c S s | j S r )r )�itemr r r �<lambda>R s z/ProArgumentParser.format_help.<locals>.<lambda>)�keyz {:<17}{})r3 r4 �format_help�format_usager/ �items�formatr! �sortedr r �epilog)r �help_outputr. rE r@ r7 r r rC I s zProArgumentParser.format_help)r )r r r r r r# r% r'