+
    i3  c                   sh    ^ RI Ht ^ RIHt R tR t ! R R4      t ! R R]4      t ! R	 R
4      tR# )    )Action)ConfigParserc                sH    \        V 4      pV\        J ;'       g	    V\        J # )z@Return true if val is an instance of a known sequence type.
    )typelisttuple)valZval_type   & 0/usr/lib/python3.14/site-packages/sos/options.py_is_seqr	      s%     CyHt00x500    c                 sJ    V P                  4       pVR9   d   R# VR9   d   R# R# )trueTFN)r   ZonZyes)ZfalseZoffZno)Zlower)r   Z_valr   r   str_to_boolr      s(    99;D$$%%r
   c                   s   a  ] tR t^t o R tR tRR ltR tR t/ 3R lt	]
/ 3R l4       t]
R 4       tR	 tR
 tRR ltRR ltR tRtV tR# )
SoSOptionsc                s   R  p\        W!4      '       d   \        W!4      p\        W4      pV! V4      '       d   V! V4      '       d2   V'       g*   WP                  9  d   \        V4      '       d	   V'       dO   \	        WV4       V'       d   V P                  P                  V4       R# V P                  P                  V4       R# \        V4      '       d   \	        WWg,           4       R# R# R# )c                 s$    V R 8H  ;'       g    V RJ # ) N )r      &r   _unsetZ%SoSOptions._merge_opt.<locals>._unset    s    2I,,-r
   N)hasattrgetattr_nondefaultr	   setattrZdiscardZadd)selfoptsrc
is_default
prefer_newr   ZnewvalueZoldvalues   &&&&&   r   
_merge_optZSoSOptions._merge_opt   s    	. 3s(Ht)H x  )9)9,,,wx7H7H8,$$,,S1$$((-""8#67 #% r
   c                s    \        V\        4      '       g   \        V4      pV P                   F  pV P	                  WAW#4       K  	  R # N)
isinstancedictvars	arg_namesr   )r   r   r   r   arg   &&&& r   _merge_optsZSoSOptions._merge_opts9   s4    #t$$s)C>>COOCj= "r
   c                s   TpRpV P                    F  pWWV,           V,           ,          pK  	  VP                  V4       V P                    Uu. uF  p\        W4      NK  	  ppV'       g5   V U	u. uF'  p	\        V	4      '       d   RP	                  V	4      MT	NK)  	  pp	M-V U	u. uF!  p	\        V	\        4      '       d   RV	 R2MT	NK#  	  pp	V\        V4      ,          P                  V4      V,           # u upi u up	i u up	i )a  Format a SoSOptions object as a human or machine readable string.

:param quote: quote option values
:param sep: list separator string
:param prefix: arbitrary prefix string
:param suffix: arbitrary suffix string
:param literal: print values as Python literals
z=%s,')r    Zstripr   r	   joinr   strr   )
r   quotesepprefixsuffixargsZarg_fmtr!   Zvalsvs
   &&&&&     r   Z__strZSoSOptions.__str?   s     >>C'MC''D "

3.2nn=ns"n=>BCd71::CHHQK14dDCD DHH4a
1c 2 2as!H94DHuT{"))#.77 > D Is   C4/-C9#'C>c                s"    V P                  4       # r   _SoSOptions__strr   r   r   __str__ZSoSOptions.__str__X   s    zz|r
   c                s,    V P                  R RRRR7      # )Tz, zSoSOptions(Z))r(   r)   r*   r+   r.   r0   r   r   __repr__ZSoSOptions.__repr__[   s!    zz$}!$  & 	&r
   c                sL   Wn         \        VP                  4       4      V n        \	        4       V n        V P                    F   p\        WV P                   V,          4       K"  	  VP                  4        F,  w  r4V P                  P                  V4       \        WV4       K.  	  R# )a  Initialise a new ``SoSOptions`` object from keyword arguments.

Initialises the new object with values taken from keyword
arguments matching the names of ``SoSOptions`` attributes.

A ``ValueError`` is raised is any of the supplied keyword
arguments does not correspond to a known ``SoSOptions`
attribute name.

:param *kwargs: a list of ``SoSOptions`` keyword args.
:returns: the new ``SoSOptions`` object.
N)	arg_defaultsr   keysr    Zsetr   r   itemsappend)r   r3   Zkwargsr!   Zkwargs   &&,  r   __init__ZSoSOptions.__init___   s~     )l//125$$CDt0056 % !,,.JCNN!!#&Du% )r
   c                s\    \        R/ \        V4      BRV/B pVP                  VRR4       V# )zInitialise a new SoSOptions object from a ``Namespace``
obtained by parsing command line arguments.

:param args: parsed command line arguments
:returns: an initialised SoSOptions object
:returntype: SoSOptions
r3   TFr   )r   r   r#   )clsr,   r3   Zoptss   &&& r   	from_argsZSoSOptions.from_argsw   s1     BDJB\BtU+r
   c                s    RpRpW9   d   RV 2.# W9   d)   \        ^ \        V4      4       Uu. uF  pRV 2NK
  	  up# RV RV 2.# u upi )zConvert a named option and optional value to command line
argument notation, correctly handling options that take
no value or that have special representations (e.g. verify
and verbose).
--=)Z
alloptionszallow-system-changeszall-logsZbatchZbuildZdebugZexperimentalzlist-pluginszlist-presetszlist-profilesz	no-reportzno-env-varsZquietZverify)verbose)Zrangeint)r8   r   r   Zno_valueZcountZds   &&&   r   _opt_to_argsZSoSOptions._opt_to_args   sk    

 ?J<<(-aS(:;(:1bJ(:;;SE3% !! <s   Ac                s   \        V P                  V,          \        V4      4      '       d   V# \        V P                  V,          \        4      '       d   \        VP	                  R4      4      # \        V P                  V,          \
        4      '       d$   \        V4      pVf   \        RV RV R24      hV# \        V P                  V,          \        4      '       d   \        V4      # V# )an  Ensure that the value read from a config file is the proper type
for consumption by the component, as defined by arg_defaults.

Params:
    :param key:         The key in arg_defaults we need to match the
                        type of
    :param val:         The value to be converted to a particular type
    :param conf:        File values are being loaded from
r$   z
Value of 'z' in z# must be True or False or analagous)	r   r3   r   r   splitZboolr   Z	Exceptionr=   )r   keyr   Zconfs   &&&&r   _convert_to_typeZSoSOptions._convert_to_type   s     d'',d3i88Jd'',d33		#''d'',d33c"C{ U4& 1   ! ! Jd'',c22s8O
r
   c                s  a a VV 3R lp\        4       p \        SRR7      ;_uu_ 4       pVP                  VS4       RRR4       T! RT4       T! Y$4       TP                  R4      '       d   \        S R	4      '       d   \        S R
4      '       do   TP                  R4       FW  w  rxTP                  R4      ^ ,          S P                  9   d   K.  S P                  P                  TR,           T,           4       KY  	  R# R# R# R#   + '       g   i     L; i  \         d.   p\	        RS RTP
                  ^,           24        Rp?ELRp?ii ; i)zRead the provided config_file and update options from that.

Positional arguments:

    :param config_file:             Filepath to the config file
    :param component:               Which component (section) to load
c                 s  < VP                  V 4      '       Ed@   \        VP                  V 4      4      pR VP                  4       9   d   \	        VP                  R 4      4      VR&   RRRRRR/p\        V4       FO  pRV9   d$   VP                  V4      W$P                  RR	4      &   WC9   g   K5  VP                  V4      W#V,          &   KQ  	  VP                  4        Fw  w  rE\        V\        4      '       d   VR
8w  d   VP                  RR4      pVSP                  9  d   \        RV RV  R24       KY  SP                  WES4      p\        SWE4       Ky  	  R# R# )r<   	verbositynameZlabelZplugin_optionplugoptsZprofileZprofiles-_Zkeywords r   zUnknown option 'z' in section 'r%   N)has_sectionr   r5   r4   r=   Zpopr   replacer   r'   r3   printrA   r   )ZsectionconfigodictZrename_optsr@   r   config_filer   s   &&    r   _update_from_sectionZ9SoSOptions.update_from_conf.<locals>._update_from_section   s8   !!'**V\\'23

,),UYYy-A)BE+&
 G#Zz
  ;Ccz7<yy~kk#s34)27))C.#./	 ' !&HC "#s++z0A!kk#r2$"3"33  0^G9ANO //+FCD#+ !.' +r
   zutf-8)ZencodingNz+WARNING: Unable to read configuration file z : ZglobalZplugin_optionsrD   skip_pluginsZ.r;   )r   ZopenZ	read_fileZOSErrorrJ   r,   rH   r   r5   r?   rO   rD   r6   )	r   rM   Z	componentrN   rK   ZfZer@   r   s	   ff&      r   update_from_confZSoSOptions.update_from_conf   s    	,D 	kG44  K0 5 	Xv.Y/.//GD*4M4MD.11"LL)9:yy~a(D,=,==MM((sS9 ; 2 5N/ 54 	=k]#66!9+ 	s3   D DD D	D D E#"EEc                s    V P                    FA  p\        W4      '       g   K  \        W4      f   V'       d   K-  V P                  WARVR7       KC  	  R# )aT  Merge another set of ``SoSOptions`` into this object.

Merge two ``SoSOptions`` objects by setting unset or default
values to their value in the ``src`` object.

:param src: the ``SoSOptions`` object to copy from
:param is_default: ``True`` if new default values are to be set.
:param prefer_new: ``False`` if new default is not preferred.
NF)r   )r    r   r   r   )r   r   Zskip_defaultr   r!   r"   r   mergeZSoSOptions.merge   sA     >>C3$$s ,LL%JG	 "r
   c                sp    / pV P                    F#  p\        W4      pV'       d
   VR9   d   RpWBV&   K%  	  V# )zReturn this ``SoSOptions`` option values as a dictionary of
argument name to value mappings.

:returns: a name:value dictionary of option values.
NZ
add_presetZ
del_presetZdescZnote)r    r   )r   Zpreset_filterrL   r!   values   &&   r   r   ZSoSOptions.dict   s@     >>CD&EFF E#J " r
   c                s   a a V 3R loV3R lpR p\        S P                  4       P                  4       R R7      pV UUu. uF  w  rEV! WE4      '       g   K  V! WE4      NK  	  upp# u uppi )zReturn command arguments for this object.

Return a list of the non-default options of this ``SoSOptions``
object in ``sos report`` command line argument notation:

    ``["--all-logs", "-vvv"]``

c                s   < RpV'       d   W9   d   R# V R8X  d   V'       d   R# V SP                   9   d-   \        V4      \        SP                   V ,          4      8X  d   R# R# )z-Test for non-null option values.
            FrD   T)ZFalseZNonez[]z""z''Z0)r3   r'   )rC   rS   Znull_valuesr   s   && r   	has_valueZ%SoSOptions.to_args.<locals>.has_value  sS     CKE0z!et(((u:T%6%6t%<!== r
   c                sF   < V R9   d   R# V R9   d
   V^ 8X  d   R# S! W4      # )z7Filter out preset and null-valued options.
            FTrR   )Zlog_sizeZplugin_timeoutZcmd_timeoutr   )rC   rS   rT   s   &&r   
filter_optZ&SoSOptions.to_args.<locals>.filter_opt$  s/     CCDDA:T))r
   c                s>   V P                  R4      '       d   R\        V4      R,          ,           pV# V P                  RR4      p \        V4      '       d   RP	                  V4      MTpVRJd	   V  RV 2pMT p\        V4      ^8  d   RV,           pV# RV,           pV# )	zCConvert sos option notation to command line arguments.
            rB   rE   r-   rF   r$   TrG   r:   )Z
startswithr=   rI   r	   r&   Zlen)rC   rS   r!   r   s   &&  r   argifyZ"SoSOptions.to_args.<locals>.argify/  s     {++CJ,,
<<S)D'.u~~CHHUO5ED aw' #C1$*CJ 36)CJr
   c                 s    V ^ ,          # )r    r   )Zxr   r   Z<lambda>Z$SoSOptions.to_args.<locals>.<lambda>C  s    adr
   )r@   )Zsortedr   r5   )r   rU   rV   Z	opt_itemsZnr-   rT   s   f     @r   to_argsZSoSOptions.to_args  sV    			*	( 499;,,.NC	+4I9!
18Hq9IIIs   A(A()r   r3   r    N)FrG   r   r   )TF)T)__name__
__module____qualname____firstlineno__r   r#   r/   r1   r2   r7   Zclassmethodr9   r>   rA   rP   rQ   r   rW   __static_attributes____classdictcell__Z__classdict__   @r   r   r      su     84>82& %' &0 *, 
 
 " "$2<:|H  6J 6Jr
   r   c                   .   a  ] tR tRt o RtRR ltRtV tR# )SosListOptioniG  z0Allow to specify comma delimited list of pluginsNc                s    \        VP                  R 4      4      p\        W P                  4      '       d   V\        W P                  4      ,          p\	        W P                  V4       R# )r$   N)r   r?   r   Zdestr   )r   ZparserZ	namespaceZvaluesZoption_stringr5   s   &&&&& r   __call__ZSosListOption.__call__K  sE    V\\#&'9ii((WY		22E	99e,r
   r   r   )rX   rY   rZ   r[   __doc__rb   r\   r]   r^   r_   r   ra   ra   G  s     :- -r
   ra   c                   r`   )ClusterOptioniR  z6Used to store/manipulate options for cluster profiles.Nc                sB    Wn         W n        W0n        W@n        WPn        R # r   )rC   rS   opt_typeclusterdescription)r   rC   rS   re   rf   rg   s   &&&&&&r   r7   ZClusterOption.__init__U  s    	
 &r
   )rf   rg   rC   re   rS   r   )rX   rY   rZ   r[   rc   r7   r\   r]   r^   r_   r   rd   rd   R  s     @' 'r
   rd   N)	Zargparser   Zconfigparserr   r	   r   r   ra   rd   r   r
   r   <module>rh      s<     %1gJ gJT	-F -' 'r
   