+
     hI*  c                   s2   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHtHt ]P0                  ! ]4      t ! R R]P6                  4      t ! R	 R
]4      t ! R R]P<                  4      t ! R R]4      t R# )zBase option parser setupN)suppress)AnyDict	GeneratorListNoReturnOptionalTuple)UNKNOWN_ERROR)ConfigurationConfigurationError)redact_auth_from_url	strtoboolc                   s   a a ] tR t^t oRtV3R lV 3R lltV3R lR ltRV3R lR lltV3R lR	 ltV3R
 lR lt	V3R lR lt
V3R lR ltV3R lR ltRtVtV ;t# )PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.c                s*   < V ^8  d   QhRS[ RS[ RR/# )   argskwargsreturnN)r   format__classdict__   "=/usr/lib/python3.14/site-packages/pip/_internal/cli/parser.py__annotate__ PrettyHelpFormatter.__annotate__   s"     * *c *S *T *    c                s   < ^VR&   ^VR&   \         P                  ! 4       ^ ,          ^,
          VR&   \        SV `  ! V/ VB  R# )i   Zmax_help_positionZindent_incrementZwidthN)shutilZget_terminal_sizesuper__init__)selfr   r   	__class__s   &*,r   r   ZPrettyHelpFormatter.__init__   sG    &("#%&!" 224Q7!;w$)&)r   c                :   < V ^8  d   QhRS[ P                  RS[/# r   optionr   optparseOptionstrr   r   r   r   r      s     3 3HOO 3 3r   c                s$    V P                  V4      # N)_format_option_strings)r   r!      &&r   format_option_stringsZ)PrettyHelpFormatter.format_option_strings   s    **622r   c                sF   < V ^8  d   QhRS[ P                  RS[RS[RS[/# )r   r!   mvarfmtoptsepr   r"   r   r   r   r   r      s1      oo03GJ	r   c                s    . pVP                   '       d#   VP                  VP                   ^ ,          4       VP                  '       d#   VP                  VP                  ^ ,          4       \        V4      ^8  d   VP	                  ^V4       VP                  4       '       d]   VP                  ;'       g    VP                  P                  4       pVP                  VP                  VP                  4       4      4       RP                  V4      # )z
Return a comma-separated list of option strings and metavars.

:param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
:param mvarfmt: metavar format string
:param optsep:  separator
 )Z_short_optsappendZ
_long_optsZleninsertZtakes_valuemetavardestZlowerr   join)r   r!   r*   r+   Zoptsr/   s   &&&&  r   r'   Z*PrettyHelpFormatter._format_option_strings   s     KK**1-.KK))!,-t9q=KK6"nn;;(9(9(;GKKw}}78wwt}r   c                &   < V ^8  d   QhRS[ RS[ /# )r   headingr   r%   r   r   r   r   r   9   s      c c r   c                s&    VR 8X  d   R# VR,           # )ZOptionsr,   :
 )r   r3   r(   r   format_headingZ"PrettyHelpFormatter.format_heading9   s    ir   c                r2   )r   usager   r4   r   r   r   r   r   >   s      # # r   c                sp    RP                  V P                  \        P                  ! V4      R4      4      pV# )zb
Ensure there is only one newline between usage and the first heading
if there is no description.
z
Usage: {}
  )r   indent_linestextwrapdedent)r   r8   msg   && r   format_usageZ PrettyHelpFormatter.format_usage>   s/    
 $$T%6%6xu7Mt%TU
r   c                6   < V ^8  d   QhRS[ S[,          RS[/# )r   descriptionr   r   r%   r   r   r   r   r   F   s      hsm  r   c                s    V'       ds   \        V P                  R 4      '       d   RpMRpVP                  R4      pVP                  4       pV P	                  \
        P                  ! V4      R4      pV RV R2pV# R# )ZmainZCommandsZDescription
r9   r5   r,   )ZhasattrparserZlstripZrstripr:   r;   r<   )r   rA   Zlabelr>   r   format_descriptionZ&PrettyHelpFormatter.format_descriptionF   st    t{{F++"%%,,T2K%,,.K++HOOK,H$OK"G3{m26Kr   c                r@   )r   epilogr   rB   r   r   r   r   r   X   s      HSM c r   c                s    V'       d   V# R # )r,   r6   )r   rF   r(   r   format_epilogZ!PrettyHelpFormatter.format_epilogX   s    Mr   c                s,   < V ^8  d   QhRS[ RS[ RS[ /# )r   textindentr   r4   r   r   r   r   r   _   s"     $ $ $c $c $r   c                sz    VP                  R 4       Uu. uF  q2V,           NK  	  ppR P                  V4      # u upi )rC   )splitr1   )r   rH   rI   ZlineZ	new_liness   &&&  r   r:   Z PrettyHelpFormatter.indent_lines_   s:    /3zz$/?@/?td]]/?	@yy## As   8r6   )z <{}>z, )__name__
__module____qualname____firstlineno____doc__r   r)   r'   r7   r?   rE   rG   r:   __static_attributes____classdictcell____classcell__r   r      @@r   r   r      s]     >* *3 3 4 
  $ $ $ $r   r   c                   sB   a a ] tR t^dt oRtV3R lV 3R lltRtVtV ;t# )UpdatingDefaultsHelpFormatterzCustom help formatter for use in ConfigOptionParser.

This is updates the defaults before expanding them, allowing
them to show up correctly in the help listing.

Also redact auth from url type options
c                r   r    r"   r   r   r   r   Z*UpdatingDefaultsHelpFormatter.__annotate__m   s      X__  r   c                s  < R pV P                   e_   V P                   P                  V P                   P                  4       V P                   P                  P                  VP                  4      p\
        SV `  V4      pV'       dg   VP                  R8X  dV   \        V\        4      '       d   V.p\        V\        4      '       g   . pV F  pVP                  V\        V4      4      pK   	  V# )NZURL)rD   _update_defaultsdefaultsgetr0   r   expand_defaultr/   
isinstancer%   ZlistZreplacer   )r   r!   Zdefault_valuesZ	help_textvalr   s   &&   r   rY   Z,UpdatingDefaultsHelpFormatter.expand_defaultm   s    ;;"KK(()=)=>![[1155fkkBNG*62	fnn5.#.."0!1 nd33!#%%--c3G3LM	 & r   r6   )	rK   rL   rM   rN   rO   rY   rP   rQ   rR   rS   rT   r   rU   rU   d   s       r   rU   c                   sN   a  ] tR t^t o V 3R lR lt]V 3R lR l4       tRtV tR# )CustomOptionParserc                sF   < V ^8  d   QhRS[ RS[RS[RS[P                  /# )r   idxr   r   r   )intr   r#   ZOptionGroupr   r   r   r   CustomOptionParser.__annotate__   s3     	 		"	.1					r   c                s    V P                   ! V/ VB pV P                  P                  4        V P                  P                  W4       V# )z*Insert an OptionGroup at a given position.)Zadd_option_groupoption_groupsZpopr.   )r   r]   r   r   Zgroups   &&*, r   insert_option_groupZ&CustomOptionParser.insert_option_group   sD     %%t6v6 !!#-r   c                sD   < V ^8  d   QhRS[ S[P                  ,          /# r   r   )r   r#   r$   r   r   r   r   r_      s      hoo!6 r   c                s    V P                   R,          pV P                   F  pVP                  VP                   4       K   	  V# )z<Get a list of all options, including those in option groups.:NNN)Zoption_listr`   Zextend)r   ZresZis   &  r   option_list_allZ"CustomOptionParser.option_list_all   s;     q!##AJJq}}% $ 
r   r6   N)	rK   rL   rM   rN   ra   Zpropertyrc   rP   rQ   )r   s   @r   r\   r\      s#     	 	  r   r\   c                   s   a a ] tR t^t oRtRR/V3R lV 3R llltV3R lR ltV3R lR	 ltV3R
 lR ltV3R lR lt	V3R lR lt
RtVtV ;t# )ConfigOptionParserzoCustom option parser which updates its defaults by checking the
configuration files and environmental variablesisolatedFc          
      s6   < V ^8  d   QhRS[ RS[RS[RS[ RR/# )r   r   namere   r   r   N)r   r%   Zboolr   r   r   r   ConfigOptionParser.__annotate__   s=     * ** * 	*
 * 
*r   c               sT   < Wn         \        V4      V n        \        SV `  ! V/ VB  R # r&   )rf   r	   configr   r   )r   rf   re   r   r   r   s   &$$*,r   r   ZConfigOptionParser.__init__   s*     	#H- 	$)&)r   c                sF   < V ^8  d   QhRS[ P                  RS[RS[RS[/# )r   r!   keyr[   r   )r#   r$   r%   r   r   r   r   r   rg      s-      HOO # C C r   c                s     VP                  W#4      #   \        P                   d0   p\        R T 24       \        P
                  ! ^4        Rp?R# Rp?ii ; i)z(An error occurred during configuration: N)check_valuer#   ZOptionValueErrorZprintsysexit)r   r!   ri   r[   Zexcs   &&&& r   check_defaultZ ConfigOptionParser.check_default   sK    	%%c//(( 	<SEBCHHQKK	s    A$AAc                sL   < V ^8  d   QhRS[ S[S[S[3,          RR3,          /# )r   r   N)r   r   r%   r   r   r   r   r   rg      s)      	5c?D$.	/r   c              #  s  "   R V P                   R.pV Uu/ uF  q". bK  	  ppV P                  P                  4        FY  w  rEV'       g   \        P	                  RV4       K%  VP                  R^4      w  rgWa9   g   KA  W6,          P                  Wu34       K[  	  V F  pW6,           F
  w  ruWu3x  K  	  K  	  R# u upi 5i)Zglobalz:env:z7Ignoring configuration key '%s' as it's value is empty.Z.N)rf   rh   ZitemsloggerZdebugrJ   r-   )r   Zoverride_orderrf   Zsection_itemsZsection_keyr[   Zsectionri   s   &       r    _get_ordered_configuration_itemsZ3ConfigOptionParser._get_ordered_configuration_items   s      #DIIw7 "0;
!/"H 	 ;
 !% 1 1 3KM &,,S!4LG(&--sj9 !4 &G)22h 3 &#;
s   C B;AC >AC c                sR   < V ^8  d   QhRS[ S[S[3,          RS[ S[S[3,          /# )r   rW   r   )r   r%   r   r   r   r   r   rg      s+     > >c3h >DcN >r   c           	     s,   \         P                  ! V P                  4      V n        \	        4       pV P                  4        EF  w  r4V P                  RV,           4      pVf   K$  VP                  R	9   d    \        V4      pEMVP                  R8X  d   \        \        4      ;_uu_ 4        \        V4      pRRR4       \        \        4      ;_uu_ 4        \        V4      pRRR4       \        V\        4      '       d   V^ 8  d   V P                  V RV R24       MVP                  R8X  d2   VP                  4       pV Uu. uF  q`P                  WSV4      NK  	  ppMVP                  R8X  d   VP!                  VP"                  4       VP%                  4       pVP'                  Wt4      pVP(                  ;'       g    R
pVP*                  ;'       g    / p	VP,                  ! WWW@.VO5/ V	B  MV P                  WSV4      pWAVP"                  &   EK  	  V F  p\/        V P                  V4      W&   K  	  RV n        V#   \         d    T P                  T RT R24        Lai ; i  + '       g   i     EL; i  + '       g   i     EL; iu upi )zUpdates the given defaults with values from the config files and
the environ. Does a little special handling for certain types of
options (lists).z--Nz is not a valid value for zO option, please specify a boolean value like yes/no, true/false or 1/0 instead.Zcountz option, please instead specify either a non-negative integer or a boolean value like yes/no or false/true which is equivalent to 1/0.r-   callback)Z
store_trueZstore_falser6   )r#   ValuesrW   valuesZsetro   Z
get_optionZactionr   Z
ValueErrorerrorr    r^   rZ   rJ   rm   Zaddr0   get_opt_stringZconvert_valueZcallback_argsZcallback_kwargsrp   Zgetattr)
r   rW   Z	late_evalri   r[   r!   Zvopt_strr   r   s
   &&        r   rV   Z#ConfigOptionParser._update_defaults   s/    oodmm4E	==?HC__TCZ0F
 ~ }} ==#C.C ')j))#C.C *j))c(C *!#s++sQwJJ%9# ?6 6 (*iikCFG3a))&q93G*,fkk* //1**78++11r//552LTLVL((c:$'V[[!a @d C#DKK5HM M " JJ%9# ?5 5 *))))) Hs0   6I+I)I=J"I&%I&)I:=Jc                s4   < V ^8  d   QhRS[ P                  /# rb   )r#   rq   r   r   r   r   rg     s     ) )HOO )r   c                sv   V P                   '       g!   \        P                  ! V P                  4      #  V P                  P                  4        V P                  V P                  P                  4       4      pV P                  4        Fc  pVP                  VP                  4      p\        V\        4      '       g   K6  VP!                  4       pVP#                  WT4      W#P                  &   Ke  	  \        P                  ! V4      #   \         d*   pT P                  \        \        T4      4        Rp?LRp?ii ; i)zOverriding to make updating the defaults after instantiation of
the option parser possible, _update_defaults() does the dirty work.N)Zprocess_default_valuesr#   rq   rW   rh   Zloadr
   rl   r   r%   rV   ZcopyZ_get_all_optionsrX   r0   rZ   rt   rj   )r   ZerrrW   r!   Zdefaultru   s   &     r   get_default_valuesZ%ConfigOptionParser.get_default_values  s     ***??4==11	/KK ((););)=>++-Fll6;;/G'3'' //1(.(:(:7(L% . x(( " 	/IImSX..	/s   D D8D33D8c                s&   < V ^8  d   QhRS[ RS[/# )r   r=   r   )r%   r   r   r   r   r   rg   $  s     - - - -r   c                sv    V P                  \        P                  4       V P                  \        V R 24       R# )rC   N)Zprint_usagerk   Zstderrrl   r   )r   r=   r(   r   rs   ZConfigOptionParser.error$  s(    $		-C5,r   )rh   rf   rr   )rK   rL   rM   rN   rO   r   rm   ro   rV   rv   rs   rP   rQ   rR   rS   rT   r   rd   rd      sV     7* 	* *  8> >@) ),- - -r   rd   )!rO   Zloggingr#   r   rk   r;   Z
contextlibr    Ztypingr   r   r   r   r   r   r   Zpip._internal.cli.status_codesr   Zpip._internal.configurationr	   r
   Zpip._internal.utils.miscr   r   Z	getLoggerrK   rn   ZIndentedHelpFormatterr   rU   ZOptionParserr\   rd   r6   r   r   <module>rw      s        
   H H H 8 I D			8	$O$(88 O$d$7 @.. ,L-+ L-r   