관리-도구
편집 파일: configuration.cpython-311.pyc
� �3O��z� �� � d dl Z d dlZd dlZd dlmZ d dlmZmZmZ d dl m Z d dlmZm Z d dlmZmZmZmZ d dlmZ d dlmZ d d lmZmZ e j e� � Z G d � de � � ZdS )� N)�Values)�Any�List�Optional)�Command)�ERROR�SUCCESS)� Configuration�Kind�get_configuration_files�kinds)�PipError)� indent_log)�get_prog�write_outputc �v � e Zd ZdZdZdZdd�Zdedee de fd �Zded ede e fd�Zdedee ddfd�Zdedee ddfd �Zdedee ddfd�Zdedee ddfd�Zdedee ddfd�Zdeddfd�Zdd�Zdedee ddfd�Zdee de de defd�Zdd�Zdede fd�ZdS )�ConfigurationCommanda� Manage local and global configuration. Subcommands: - list: List the active configuration (or from the file specified) - edit: Edit the configuration file in an editor - get: Get the value associated with command.option - set: Set the command.option=value - unset: Unset the value associated with command.option - debug: List the configuration files and values defined under them Configuration keys should be dot separated command and option name, with the special prefix "global" affecting any command. For example, "pip config set global.index-url https://example.org/" would configure the index url for all commands, but "pip config set download.timeout 10" would configure a 10 second timeout only for "pip download" commands. If none of --user, --global and --site are passed, a virtual environment configuration file is used if one is active and the file exists. Otherwise, all modifications happen to the user file by default. Ta$ %prog [<file-option>] list %prog [<file-option>] [--editor <editor-path>] edit %prog [<file-option>] get command.option %prog [<file-option>] set command.option value %prog [<file-option>] unset command.option %prog [<file-option>] debug �returnNc �> � | j � dddd d�� � | j � dddd d �� � | j � dddd d �� � | j � dddd d�� � | j � d| j � � d S )Nz--editor�editor�storez\Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided.)�dest�action�default�helpz--global�global_file� store_trueFz+Use the system-wide configuration file onlyz--user� user_filez$Use the user configuration file onlyz--site� site_filez3Use the current environment configuration file onlyr )�cmd_opts� add_option�parser�insert_option_group��selfs ��/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/commands/configuration.py�add_optionsz ConfigurationCommand.add_options: s� � �� � � �����9� !� � � � � � � �����>� !� � � � � � � �����7� !� � � � � � � �����F� !� � � � ��'�'��4�=�9�9�9�9�9� �options�argsc �� � | j | j | j | j | j | j d�}|r |d |vrBt � dd� t |� � � � � � t S |d } | � ||dv �� � }nC# t $ r6}t � |j d � � t cY d }~S d }~ww xY wt |j |�� � | _ | j � � � || ||dd � � � nC# t $ r6}t � |j d � � t cY d }~S d }~ww xY wt$ S ) N)�list�edit�get�set�unset�debugr zNeed an action (%s) to perform.z, )r. r/ r0 r- )� need_value)�isolated� load_only� )�list_values�open_in_editor�get_name�set_name_value� unset_name�list_config_values�logger�error�join�sortedr �_determine_filer r* r � isolated_mode� configuration�loadr )r% r) r* �handlersr r4 �es r&