+
    Îi6                    j   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
IHt ^ RIHtHt ]P>                  ! ] 4      t! ! R R]PD                  4      t# ! R R]#4      t$ ! R R]PJ                  4      t& ! R R]&4      t'R# )zBase option parser setup)annotationsN)	Generator)suppress)AnyNoReturnescape)Theme)UNKNOWN_ERROR)ConfigurationConfigurationError)
PipConsole)redact_auth_from_url	strtoboolc                     a  ] tR t^tRtRRRRRRRR	/tR
RRR/tR V 3R lltR R ltR R lt	R R lt
R R ltR R ltR R ltR V 3R lltR R ltR tV ;t# )!PrettyHelpFormatterz4A prettier/less verbose help formatter for optparse.zoptparse.shortargsgreenzoptparse.longargscyanzoptparse.groupsz	bold bluezoptparse.metavaryellowz\s(-{1}[\w]+[\w-]*)	shortargsz\s(-{2}[\w]+[\w-]*)longargsc               $    V ^8  d   QhRRRRRR/# )   argsr   kwargsreturnNone )formats   "g/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/pip/_internal/cli/parser.py__annotate__ PrettyHelpFormatter.__annotate__)   s!     * *c *S *T *    c                	   < ^VR&   ^VR&   \         P                  ! 4       ^ ,          ^,
          VR&   \        SV `  ! V/ VB  R# )   max_help_positionindent_incrementwidthN)shutilget_terminal_sizesuper__init__)selfr   r   	__class__s   &*,r   r+   PrettyHelpFormatter.__init__)   sG    &("#%&!" 224Q7!;w$)&)r"   c                    V ^8  d   QhRRRR/# r   optionoptparse.Optionr   strr   )r   s   "r   r    r!   0   s      O  r"   c                L   . pVP                   '       d'   VP                  RVP                   ^ ,           R24       VP                  '       d'   VP                  RVP                  ^ ,           R24       \        V4      ^8  d   VP	                  ^R4       VP                  4       '       dk   VP                  f   Q hVP                  ;'       g    VP                  P                  4       pVP                  R\        VP                  4       4       R24       RP                  V4      # )z=Return a comma-separated list of option strings and metavars.z[optparse.shortargs]z[/]z[optparse.longargs]z, z [optparse.metavar]<z>[/] )_short_optsappend
_long_optsleninserttakes_valuedestmetavarlowerr   join)r,   r1   optsr=   s   &&  r   format_option_strings)PrettyHelpFormatter.format_option_strings0   s    KK.v/A/A!/D.ESIJKK-f.?.?.B-C3GHt9q=KK4 ;;***nn;;(9(9(;GKK.vgmmo/F.GtLMwwt}r"   c                    V ^8  d   QhRRRR/# r0   r   )r   s   "r   r    r!   B   s      O  r"   c           	     N   . pV P                   V,          pV P                  V P                  ,
          ^,
          p\        P                  ! RRV4      p\        V4      \        V4      ,
          p\        V4      V8  d$   RV P                  RV3,          pV P                  pMRV P                  RWF,           V3,          p^ pVP                  V4       VP                  '       d   V P                  V4      p\        P                  ! WP                  4      p	VP                  RVRV	^ ,          3,          4       TP                  V	R,           U
u. uF  p
RV P                  RV
3,          NK  	  up
4       MVR,          R8w  d   VP                  R4       RP                  V4      # u up
i )z$Overridden method with Rich support.z(\[[a-z.]+\])|(\[\/\])r5   z%*s%s
z	%*s%-*s  :   NN
)option_stringshelp_positioncurrent_indentresubr9   r7   helpexpand_defaulttextwrapwrap
help_widthextendr?   )r,   r1   resultr@   	opt_widthstrippedstyle_tag_lengthindent_first	help_text
help_lineslines   &&         r   format_option!PrettyHelpFormatter.format_optionB   sp    ""6*&&)<)<<q@	 663R>t9s8}4x=9$ 3 3R>>D--L$"5"5r"+">"F FDLd;;;++F3I!y//BJMM)|RA&GGHMM'1"~7'5t %(:(:B'EEE'57 8"XMM$wwv	7s   F"c                    V ^8  d   QhRRRR/# )r   headingr3   r   r   )r   s   "r   r    r!   `   s     @ @c @c @r"   c                	F    VR 8X  d   R# R\        V4      ,           R,           # )Optionsr5   z[optparse.groups]z:[/]
r   )r,   r^   s   &&r   format_heading"PrettyHelpFormatter.format_heading`   s!    i"VG_4x??r"   c                    V ^8  d   QhRRRR/# )r   usager3   r   r   )r   s   "r   r    r!   e   s      # # r"   c                p    V P                  \        P                  ! V4      R4      pR\        V4       R2pV# )zb
Ensure there is only one newline between usage and the first heading
if there is no description.
  z
[optparse.groups]Usage:[/] rF   )indent_linesrO   dedentr   )r,   rd   contentsmsgs   &&  r   format_usage PrettyHelpFormatter.format_usagee   s8    
 $$X__U%;TB-fX.>-?rB
r"   c                    V ^8  d   QhRRRR/# )r   description
str | Noner   r3   r   )r   s   "r   r    r!   n   s      j S r"   c                	    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# )mainz[optparse.groups]Commands:[/]z [optparse.groups]Description:[/]rF   rf   r5   )hasattrparserlstriprstriprg   rO   rh   )r,   rn   labels   && r   format_description&PrettyHelpFormatter.format_descriptionn   sv    t{{F++7: &,,T2K%,,.K++HOOK,H$OK"G2k]"5Kr"   c                    V ^8  d   QhRRRR/# )r   epilogro   r   r3   r   )r   s   "r   r    r!      s      J 3 r"   c                	,    V'       d   \        V4      # R # )r5   r   )r,   rz   s   &&r   format_epilog!PrettyHelpFormatter.format_epilog   s    &>!r"   c                    V ^8  d   QhRRRR/# r0   r   )r   s   "r   r    r!      s      _  r"   c                   < \        \        SV `	  V4      4      pV P                  P	                  4        F!  w  r4\
        P                  ! VRV R2V4      pK#  	  V# )z@Overridden HelpFormatter.expand_default() which colorizes flags.z
[optparse.z] \1[/])r   r*   rN   
highlightsitemsrK   rL   )r,   r1   rM   regexstyler-   s   &&   r   rN   "PrettyHelpFormatter.expand_default   sP    eg,V45 OO113LE66%JugW!=tDD 4r"   c               $    V ^8  d   QhRRRRRR/# )r   textr3   indentr   r   )r   s   "r   r    r!      s!     $ $ $c $c $r"   c                	z    VP                  R 4       Uu. uF  q2V,           NK  	  ppR P                  V4      # u upi )rF   )splitr?   )r,   r   r   rZ   	new_liness   &&&  r   rg    PrettyHelpFormatter.indent_lines   s:    /3zz$/?@/?td]]/?	@yy## As   8r   )__name__
__module____qualname____firstlineno____doc__stylesr   r+   rA   r[   ra   rk   rw   r|   rN   rg   __static_attributes____classcell__r-   s   @r   r   r      ss    > 	gV;H	F 	
J
* *$<@
& $ $r"   r   c                  2   a  ] tR t^tRtR V 3R lltR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                    V ^8  d   QhRRRR/# r0   r   )r   s   "r   r    *UpdatingDefaultsHelpFormatter.__annotate__   s      _  r"   c                	B  < R pV P                   e   \        V P                   \        4      '       g   Q hV P                   P                  V P                   P                  4       VP
                  f   Q h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# )NURL)rs   
isinstanceConfigOptionParser_update_defaultsdefaultsr<   getr*   rN   r=   r3   listreplacer   )r,   r1   default_valuesrX   valr-   s   &&   r   rN   ,UpdatingDefaultsHelpFormatter.expand_default   s    ;;"dkk+=>>>>KK(()=)=>;;***![[1155fkkBNG*62	fnn5.#.."0!1 nd33!#%%--c3G3LM	 & r"   r   )r   r   r   r   r   rN   r   r   r   s   @r   r   r      s     r"   r   c                  8    ] tR t^tR R lt]R R l4       tRtR# )CustomOptionParserc               (    V ^8  d   QhRRRRRRRR/# )r   idxintr   r   r   r   zoptparse.OptionGroupr   )r   s   "r   r    CustomOptionParser.__annotate__   s,     	 		"	.1			r"   c                    V P                   ! V/ VB pV P                  P                  4        V P                  P                  W4       V# )z*Insert an OptionGroup at a given position.)add_option_groupoption_groupspopr:   )r,   r   r   r   groups   &&*, r   insert_option_group&CustomOptionParser.insert_option_group   sD     %%t6v6 !!#-r"   c                   V ^8  d   QhRR/# )r   r   zlist[optparse.Option]r   )r   s   "r   r    r      s      !6 r"   c                    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)option_listr   rR   )r,   resis   &  r   option_list_all"CustomOptionParser.option_list_all   s;     q!##AJJq}}% $ 
r"   r   N)r   r   r   r   r   propertyr   r   r   r"   r   r   r      s    	  r"   r   c                     a  ] tR t^tRtRR/R V 3R llltR R ltR R	 ltR
 R ltR R lt	R R lt
RR R lltRtV ;t# )r   zoCustom option parser which updates its defaults by checking the
configuration files and environmental variablesisolatedFc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   r   namer3   r   boolr   r   r   r   )r   s   "r   r    ConfigOptionParser.__annotate__   s<     * ** * 	*
 * 
*r"   c               	|   < Wn         \        V4      V n        V P                   '       g   Q h\        SV `  ! V/ VB  R # N)r   r   configr*   r+   )r,   r   r   r   r   r-   s   &$$*,r   r+   ConfigOptionParser.__init__   s6     	#H-yyyy$)&)r"   c               (    V ^8  d   QhRRRRRRRR/# )r   r1   r2   keyr3   r   r   r   r   )r   s   "r   r    r      s(      O # C C r"   c                	     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_valueoptparseOptionValueErrorprintsysexit)r,   r1   r   r   excs   &&&& r   check_default ConfigOptionParser.check_default   sK    	%%c//(( 	<SEBCHHQKK	s    A$AAc                   V ^8  d   QhRR/# )r   r   z&Generator[tuple[str, Any], None, None]r   )r   s   "r   r    r      s     . .	/.r"   c              #  	   "   R V P                   R.pV Uu/ uF  q"/ bK  	  ppV P                  P                  4        FE  w  rEVP                  4        F,  w  rgVP                  R^4      w  rW9   g   K!  WsV,          V	&   K.  	  KG  	  V UU
Uu/ uF9  pY#V,          P                  4        U
Uu. uF  w  rV'       g   K  W3NK  	  upp
bK;  	  pp
ppV F  pW,           Rj  xL
  K  	  R# u upi u upp
i u upp
pi  L5i)globalz:env:.N)r   r   r   r   )r,   override_orderr   section_items_dict_valuesection_keyr   sectionr   kvsection_itemss   &            r    _get_ordered_configuration_items3ConfigOptionParser._get_ordered_configuration_items   s     #DIIw7 "09
!/"H 	 9
 ))+HA$)KKM *00a8,7:w/4	 %2 , '
& &>&D&D&FL&Fda!6A6&FLL& 	 
 &G$--- &'9
 M
 .sL   C>C*AC>3C>C5+C/<C/C5C>C< C>/C55C>c                    V ^8  d   QhRRRR/# )r   r   zdict[str, Any]r   r   )r   s   "r   r    r     s     > > >N >r"   c           	     l   \         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                  f   Q h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"                  f   Q h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.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.r7   callback)
store_truestore_falser   )r   Valuesr   valuessetr   
get_optionr<   actionr   
ValueErrorerrorr   r   r   r   r   r   addget_opt_stringconvert_valuecallback_argscallback_kwargsgetattr)
r,   r   	late_evalr   r   r1   r   opt_strr   r   s
   &&        r   r   #ConfigOptionParser._update_defaults  sM    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*,222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   I!;J	&JJ1!"JJ	JJ.c                   V ^8  d   QhRR/# )r   r   zoptparse.Valuesr   )r   s   "r   r    r   A  s     ) )O )r"   c                   V P                   '       g!   \        P                  ! V P                  4      #  V P                  P                  4        V P                  V P                  P                  4       4      pV P                  4        Fs  pVP                  f   Q hVP                  VP                  4      p\        V\        4      '       g   KF  VP!                  4       pVP#                  WT4      W#P                  &   Ku  	  \        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)process_default_valuesr   r   r   r   loadr   r   r
   r3   r   copy_get_all_optionsr<   r   r   r   r   )r,   errr   r1   defaultr   s   &     r   get_default_values%ConfigOptionParser.get_default_valuesA  s     ***??4==11	/KK ((););)=>++-F;;***ll6;;/G'3'' //1(.(:(:7(L% . x(( " 	/IImSX..	/s   D EEEc                    V ^8  d   QhRRRR/# )r   rj   r3   r   r   r   )r   s   "r   r    r   W  s     - - - -r"   c                	v    V P                  \        P                  4       V P                  \        V R 24       R# )rF   N)print_usager   stderrr   r
   )r,   rj   s   &&r   r   ConfigOptionParser.errorW  s(    $		-C5,r"   c                    V ^8  d   QhRRRR/# )r   filer   r   r   r   )r   s   "r   r    r   [  s     D Ds Dd Dr"   c                	   R \         P                  9   ;'       gX    \        \        \        P
                  P                  RR4      ;'       g    R4      4      ;'       g    R\        P
                  9   p\        \        \        P                  4      W!R7      pVP                  V P                  4       P                  4       RR7       R# )z
--no-colorPIP_NO_COLORnoNO_COLOR)themeno_colorr  F)	highlightN)r   argvr   r   osenvironr   r   r	   r   r   r   format_helpru   )r,   r  r  consoles   &&  r   
print_helpConfigOptionParser.print_help[  s     CHH$ ( (Ibjjnn^TBJJdKL( (RZZ' 	
 +223h
 	d&&(//1UCr"   )r   r   r   r   )r   r   r   r   r   r+   r   r   r   r   r   r  r   r   r   s   @r   r   r      sB    7* 	* *.>>@),-D Dr"   r   )(r   
__future__r   loggingr   r  rK   r(   r   rO   collections.abcr   
contextlibr   typingr   r   pip._vendor.rich.markupr   pip._vendor.rich.themer	   pip._internal.cli.status_codesr
   pip._internal.configurationr   r   pip._internal.utils.loggingr   pip._internal.utils.miscr   r   	getLoggerr   loggerIndentedHelpFormatterr   r   OptionParserr   r   r   r"   r   <module>r#     s     "   	 	  
  %    * ( 8 I 2 D			8	$v$(88 v$r$7 @.. ,\D+ \Dr"   