+
    WBi&5                     >   R t ^ RIt^ RIt^ RIt^ RIHtHtHtHtHt ^RI	H
t
 ^ RIHtHt ^ RIHt ]
! R4      t]P#                  ]P%                  4       4      t. ROt ! R
 R]P*                  4      t ! R R]P,                  4      t ! R R	]P.                  4      t]tR# )a-  GOption command line parser.

Extends optparse to use the GOptionGroup, GOptionEntry and GOptionContext
objects. So it is possible to use the gtk, gnome_program and gstreamer command
line groups and contexts.

Use this interface instead of the raw wrappers of GOptionContext and
GOptionGroup in glib.
N)OptParseErrorOptionErrorOptionValueErrorBadOptionErrorOptionConflictError)get_introspection_module)_giPyGIDeprecationWarning)GErrorGLibOptionOptionGroupOptionParserc                      a  ] tR t^=t o Rt. ]P                  P                  ORN5t. ]P                  P                  ORNRNRNtR]	P                  ,           tR tR tR	 tR
tV tR# )r   an  Represents a command line option.

To use the extended possibilities of the GOption API Option
(and make_option) are extended with new types and attributes.

Types:
    filename   The supplied arguments are read as filename, GOption
               parses this type in with the GLib filename encoding.

:ivar optional_arg:
    This does not need a arguement, but it can be supplied.
:ivar hidden:
    The help list does not show this option
:ivar in_main:
    This option apears in the main group, this should only
    be used for backwards compatibility.

Use Option.REMAINING as option name to get all positional arguments.

.. NOTE::
    Every argument to an option is passed as utf-8 coded string, the only
    exception are options which use the 'filename' type, its arguments
    are passed as strings in the GLib filename encoding.

For further help, see optparse.Option.
filenamehiddenin_mainoptional_arg--c                   \         P                  ! R \        ^R7       \        P                  P
                  ! V .VO5/ VB  V P                  '       g   \        R4      h\        V P                  4      \        V P                  4      8  d   \        R4      hV P                  '       g   \        RV P                  ^ ,          4      hR# )zZgi.repository.GLib.option.Option is deprecated, use gi.repository.GLib.OptionEntry instead
stacklevelz!%s at least one long option name.z;%s at least more long option names than short option names.z%s needs a help message.N)warningswarnr	   optparser   __init__
_long_opts
ValueErrorlen_short_optshelpselfargskwargss   &*,//usr/lib/python3.14/site-packages/gi/_option.pyr   Option.__init___   s    h"	

 	  777@AAt#d&6&6"77M  yyy79KLL     c                    V P                   V9   d&   V P                  P                  V P                   4       \        P                  P                  W4       \        V P                  4      \        V P                  4      8  d   \        R 4      hR# )zCgoption.Option needs more long option names than short option namesN)		REMAININGr   appendr   r   _set_opt_stringr   r   r   )r"   optss   &&r%   r+   Option._set_opt_stringq   sg    >>T!OO""4>>2''3t 3t#77U  8r'   c              #    "   ^ pV P                   '       d"   V\        P                  P                  ,          pV P                  '       d"   V\        P                  P
                  ,          pV P                  4       '       d5   V P                  '       d"   V\        P                  P                  ,          pM!V\        P                  P                  ,          pV P                  R8X  d"   V\        P                  P                  ,          p\        V P                  V P                  4       FX  w  r#V^,          p\        V\         4      '       g   VP#                  R4      pVR,          WAV P$                  V P&                  3x  KZ  	  V P                  \)        V P                  4      R  F&  pVR,          RWP$                  V P&                  3x  K(  	  R# 5i)    r   zutf-8:   NNN    )r   r   OptionFlagsHIDDENr   IN_MAINtakes_valuer   OPTIONAL_ARGNO_ARGtypeFILENAMEzipr   r   
isinstancebytesencoder    metavarr   )r"   flags	long_name
short_nameshort_bytess   &    r%   _to_goptionentriesOption._to_goptionentriesz   sQ    ;;;T%%,,,E<<<T%%---E   ))666T%%,,,E99
"T%%...E%($:J:J%K!I$Q-Kk511)009R=+diiNN	 &L T-=-=)>)@AIR=%		4<<HH Bs   AG
6GGD?G N)__name__
__module____qualname____firstlineno____doc__r   r   TYPESATTRSr   OPTION_REMAININGr)   r   r+   rC   __static_attributes____classdictcell____classdict__s   @r%   r   r   =   so     6 1hoo##0Z0EIhoo##IXIyI.IEt,,,IM$I Ir'   c                   J   a  ] tR t^t o RtR	R ltR tR tR
R ltR t	Rt
V tR# )r   a  A group of command line options.

:param str name:
    The groups name, used to create the --help-{name} option
:param str description:
    Shown as title of the groups help view
:param str help_description:
    Shown as help to the --help-{name} option
:param list option_list:
    The options used in this group, must be option.Option()
:param dict defaults:
    A dicitionary of default values
:param translation_domain:
       Sets the translation domain for gettext().

.. NOTE::
    This OptionGroup does not exactly map the optparse.OptionGroup
    interface. There is no parser object to supply, but it is possible
    to set default values and option_lists. Also the default values and
    values are not shared with the OptionParser.

To pass a OptionGroup into a function which expects a GOptionGroup (e.g.
gnome_program_init() ). OptionGroup.get_option_group() can be used.

For further help, see optparse.OptionGroup.
Nc                0   \         P                  ! R \        ^R7       \        P                  P                  V \        RV4       Wn        RV n        W0n	        V'       d   WPn
        RV n        W`n        V'       d   V F  pV P                  V4       K  	  R# R# )zagi.repository.GLib.option.OptionGroup is deprecated, use gi.repository.GLib.OptionContext insteadr   errorN)r   r   r	   r   OptionContainerr   r   nameparserhelp_descriptiondefaultsvaluestranslation_domain
add_option)r"   rV   descriptionrX   option_listrY   r[   options   &&&&&&& r%   r   OptionGroup.__init__   sz     	o"	

 	  ))$M	 0$M"4%' & r'   c                4    . V n         V P                  4        R # N)r^   _create_option_mappings)r"   s   &r%   _create_option_listOptionGroup._create_option_list   s    $$&r'   c                j  a a VV 3R  lp\         P                  ! S P                  S P                  S P                  V4      pS P
                  '       d   VP                  S P
                  4       . pS P                   F"  pVP                  VP                  4       4       K$  	  VP                  V4       V# )c                   < V P                  R 4      '       d   SP                  V ,          pMSP                  V ,          p VP                  WSP                  S4       R#   \
         dn    \        P                  ! 4       ^,          p\        \        T4      4      p\        Tn        \        P                  P                  Tn        \        T4      Tn        Thi ; ir   N)
startswith	_long_opt
_short_optprocessrZ   r   sysexc_infor
   strOPTION_CONTEXT_ERROR_QUARKdomainr   r   	BAD_VALUEcodemessage)option_nameoption_valuegroupoptrT   gerrorrW   r"   s   &&&   r%   callback.OptionGroup._to_goptiongroup.<locals>.callback   s    %%d++nn[1ook2Kt{{FK# q)E
+ :"..88!$Us   A   A8C)r   r   rV   r]   rX   r[   set_translation_domainr^   extendrC   add_entries)r"   rW   rz   rw   entriesr_   s   ff    r%   _to_goptiongroupOptionGroup._to_goptiongroup   s    	  IIt'')>)>
 """(()@)@A&&FNN64467 ' 	'"r'   c                D    V P                  4        V P                  V4      # )zoReturns the corresponding GOptionGroup object.

Can be used as parameter for gnome_program_init(), gtk_init().
)set_values_to_defaultsr   )r"   rW   s   &&r%   get_option_groupOptionGroup.get_option_group   s!    
 	##%$$V,,r'   c                `   V P                    Fx  pV P                  P                  VP                  4      p\	        V\
        4      '       g   K@  VP                  4       pVP                  W24      V P                  VP                  &   Kz  	  \        P                  ! V P                  4      V n
        R # rb   )r^   rY   getdestr;   ro   get_opt_stringcheck_valuer   ValuesrZ   )r"   r_   defaultopt_strs   &   r%   r   "OptionGroup.set_values_to_defaults   sx    &&Fmm''4G'3'' //1-3-?-?-Qfkk*	 '
 oodmm4r'   )rY   rX   rV   r^   rW   r[   rZ   ) NNNrb   )rF   rG   rH   rI   rJ   r   rd   r   r   r   rN   rO   rP   s   @r%   r   r      s(     6(:'>-5 5r'   c                   R   a  ] tR tRt o RtR tR tR tR tR t	R t
RR
 ltRtV tR	# )r   i  a  Command line parser with GOption support.

:param bool help_enabled:
    The --help, --help-all and --help-{group} options are enabled (default).
:param bool ignore_unknown_options:
    Do not throw a exception when a option is not knwon, the option
    will be in the result list.

.. NOTE::
    The OptionParser interface is not the exactly the same as the
    optparse.OptionParser interface. Especially the usage parameter
    is only used to show the metavar of the arguements.

OptionParser.add_option_group() does not only accept OptionGroup instances
but also glib.OptionGroup, which is returned by gtk_get_option_group().

Only glib.option.OptionGroup and glib.option.Option instances should
be passed as groups and options.

For further help, see optparse.OptionParser.
c                   \         P                  ! R \        ^R7       RV9  d
   \        VR&   VP	                  RR4      V n        VP	                  RR4      V n        \        P                  P                  ! V .VO5RR/VB  R# )	zbgi.repository.GLib.option.OptionParser is deprecated, use gi.repository.GLib.OptionContext insteadr   option_classhelp_enabledTignore_unknown_optionsFadd_help_optionN)
r   r   r	   r   popr   r   r   r   r   r!   s   &*,r%   r   OptionParser.__init__  su    p"	

 '%+F>""JJ~t<&,jj1I5&Q#&&tTTTUTVTr'   c                    Vf
   RV n         R # VP                  R4      '       d   V\        R4      R  V n         R # Wn         R # )Nr   z%prog)usageri   r   )r"   r   s   &&r%   	set_usageOptionParser.set_usage&  s6    =DJg&&s7|~.DJJr'   c                  a a S P                   '       d&   S P                  R ,           S P                   ,           pMS P                  p\        P                  ! V4      pVP	                  S P
                  4       VP                  S P                  4       S P                   FH  p\        V\        P                  4      '       d   TpMVP                  S 4      pVP                  V4       KJ  	  V V3R lp\        P                  ! RRRV4      p. pS P                   F"  p	VP                  V	P                  4       4       K$  	  VP!                  V4       VP#                  V4       V# )z - c                    < V P                  R 4      '       d   SP                  V ,          pMSP                  V ,          pVP                  WSS4       R# rh   )ri   rj   rk   rl   )ru   rv   rw   rx   r"   rZ   s   &&& r%   rz   1OptionParser._to_goptioncontext.<locals>.callback>  s@    %%d++nn[1ook2KK64@r'   N)r]   r   r   OptionContextset_help_enabledr   set_ignore_unknown_optionsr   option_groupsr;   r   r   	add_groupr^   r}   rC   r~   set_main_group)
r"   rZ   parameter_stringcontextoption_groupg_grouprz   
main_groupmain_entriesr_   s
   ff        r%   _to_goptioncontextOptionParser._to_goptioncontext.  s   #zzE1D4D4DD#zz##$45  !2!23**4+F+FG ..L,88&&77=g& /	A __T4x@
&&F 9 9 ;< '|,z*r'   c                v   \        V^ ,          \        4      '       d0   \        P                  P	                  V \        V .VO5/ VB 4       R# \        V4      ^8X  d   V'       g   \        V^ ,          \
        4      '       dI   V^ ,          P                  '       g   W^ ,          n        V^ ,          P                  V Jd   \        R4      h\        V^ ,          \        P
                  4      '       d%   V P                  P                  V^ ,          4       R# \        P                  P                  ! V .VO5/ VB  R# )r/   Nz"invalid OptionGroup (wrong parser))r;   ro   r   r   add_option_groupr   r   rW   r   r   r   r*   r!   s   &*,r%   r   OptionParser.add_option_groupN  s    d1gs##!!22k$888 t9>&$q';//Aw~~~%)GN7>>-$%IJJ$q'3??33""))$q'2..tEdEfEr'   c                    V P                   R ,          pV P                   F@  p\        V\        P                  4      '       g   K%  VP                  VP                   4       KB  	  V# )NNN)r^   r   r;   r   r   r}   )r"   optionsrw   s   &  r%   _get_all_optionsOptionParser._get_all_options_  sN    ""1%''E%!5!566u001 ( r'   c                    V P                  V4      pVP                  \        P                  ^ ,          .VO4      R,          VR&   R# )r/   :   NNr   N)r   parserm   argv)r"   largsrargsrZ   r   s   &&&& r%   _process_argsOptionParser._process_argsf  s;    ))&1
 ==#((1+!6!67;ar'   Nc                    \         P                  P                  WV4      w  r1T P$                   FA  pTP&                  P(                  P+                  4        F  w  rgTP-                  Yg4       K  	  KC  	  Y13#   \         d    \        P
                  ! 4       ^,          pTP                  \        8w  d   h TP                  \        P                  P                  8X  d   \        TP                  4      hTP                  \        P                  P                  8X  d   \        TP                  4      hTP                  \        P                  P                   8X  d   \#        TP                  4      hh i ; i)r   )r   r   
parse_argsr
   rm   rn   rq   rp   rs   r   r   rr   r   rt   UNKNOWN_OPTIONr   FAILEDr   r   rZ   __dict__itemsensure_value)r"   r#   rZ   r   rT   rw   keyvalues   &&&     r%   r   OptionParser.parse_argsn  s   	$11<<TPMG ''E#ll3399;
$$S0 < ( }!  
	LLN1%E||99zzT--777&u}}55zzT--<<<$U]]33zzT--444#EMM22
	s   "A8 8C9E1)r   r   r   )NN)rF   rG   rH   rI   rJ   r   r   r   r   r   r   r   rN   rO   rP   s   @r%   r   r     s5     ,
U@F"< r'   )	r   r   r   r   r   r   r   r   make_option)rJ   rm   r   r   r   r   r   r   r   moduler   gir   r	   	gi._errorr
   r   quark_to_stringoption_error_quarkrp   __all__r   r   r   r   rE   r'   r%   <module>r      s   &     - * '!11$2I2I2KL 
VIX__ VIrj5(&& j5Z~8(( ~B r'   