File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-310.pyc
Back
o ;j�E � @ s d Z ddlmZ ddlZddlZddlZddlZddlmZ ddl m Z ddlmZm Z dZe�d e� d ��Ze�de� de� d ��Ze�dd�ZG dd� d�Zd#dd�Zdd� ejD �Zdd� Zdd� ZG dd� d�Zedkr�dZd D ]Zed!e� �� ed"� eee��� e� qtdS dS )$a6 distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object � )�annotationsN)�Sequence)�Any� )�DistutilsArgError�DistutilsGetoptErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)�^�$z^(z)=!(z)$�-�_c @ s� e Zd ZdZd!dd�Zdd� Zdd� Zd"d d �Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z d"d#dd�Zdd� Zd!dd�Zd"dd �ZdS )$�FancyGetopta� Wrapper around the standard 'getopt()' module that provides some handy extra functionality: * short and long options are tied together * options have help strings, and help text can be assembled from them * options set attributes of a passed-in object * boolean options can have "negative aliases" -- eg. if --quiet is the "negative alias" of --verbose, then "--quiet" on the command line sets 'verbose' to false Nc C sN || _ i | _| j r | �� i | _i | _g | _g | _i | _i | _i | _ g | _ d S �N)�option_table�option_index�_build_index�alias�negative_alias� short_opts� long_opts� short2long� attr_name� takes_arg�option_order��selfr � r �V/opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_distutils/fancy_getopt.py�__init__1 s zFancyGetopt.__init__c C s( | j �� | jD ] }|| j |d <