+
    JiE                         R t ^ RIt^ RIt^ RIHtHtHt ^RIHt ^RI	H
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R R lltR# )ac  
CLI parsing for :command:`pysemver` command.

Each command in :command:`pysemver` is mapped to a ``cmd_`` function.
The :func:`main <semver.cli.main>` function calls
:func:`createparser <semver.cli.createparser>` and
:func:`process <semver.cli.process>` to parse and process
all the commandline options.

The result of each command is printed on stdout.
N)castListOptional)Version)__version__c                D    V ^8  d   QhR\         P                  R\        /#    argsreturnargparse	Namespacestr)formats   "*lib/python3.14/site-packages/semver/cli.py__annotate__r      s       8%% #     c           
     $   RRRRRRRRR	R
/pV P                   f   V P                  P                  RR.4       \        P                  ! V P
                  4      p\        W!\        \        V P                   4      ,          4      p\        V! 4       4      # )z
Subcommand: Bumps a version.

Synopsis: bump <PART> <VERSION>
<PART> can be major, minor, patch, prerelease, or build

:param args: The parsed arguments
:return: the new, bumped version
major
bump_majorminor
bump_minorpatch
bump_patch
prereleasebump_prereleasebuild
bump_buildbumpz-h)	r   parser
parse_argsr   parseversiongetattrr   r   )r
   maptableverfuncs   &   r   cmd_bumpr(      s     	'H yy 	~.
--
%C3c499!567Dtv;r   c                <    V ^8  d   QhR\         P                  RR/# )r	   r
   r   N)r   r   )r   s   "r   r   r   1   s      
: 
:H&& 
:4 
:r   c                    \         P                  ! V P                  4      '       d   R# \        RV P                  ,          4      h)zy
Subcommand: Checks if a string is a valid semver version.

Synopsis: check <VERSION>

:param args: The parsed arguments
NzInvalid version %r)r   is_validr#   
ValueErrorr
   s   &r   	cmd_checkr.   1   s1     %%
)DLL8
99r   c                D    V ^8  d   QhR\         P                  R\        /# r   r   )r   s   "r   r   r   >   s      	, 	,h(( 	,S 	,r   c                    \         P                  ! V P                  4      p\        VP	                  V P
                  4      4      # )zo
Subcommand: Compare two versions.

Synopsis: compare <VERSION1> <VERSION2>

:param args: The parsed arguments
)r   r"   version1r   compareversion2)r
   ver1s   & r   cmd_comparer5   >   s.     =='Dt||DMM*++r   c                D    V ^8  d   QhR\         P                  R\        /# r   r   )r   s   "r   r   r   J   s      	0 	0h(( 	0S 	0r   c                    \         P                  ! V P                  4      p\        VP	                  V P
                  4      4      # )z
Subcommand: Determines the next version, taking prereleases into account.

Synopsis: nextver <VERSION> <PART>

:param args: The parsed arguments
)r   r"   r#   r   next_versionpart)r
   r#   s   & r   cmd_nextverr:   J   s0     mmDLL)Gw##DII.//r   c                8    V ^8  d   QhR\         P                  /# )r	   r   )r   ArgumentParser)r   s   "r   r   r   V   s     2 2h-- 2r   c            	        \         P                  ! \        \        R7      p V P	                  RRR\
        ,           R7       V P                  4       pVP                  RRR7      pVP                  \        R	7       VP	                  R
RR7       VP	                  RRR7       VP                  RRR7      pVP                  \        R	7       VP                  RRR7      pVP                  RRR7      VP                  RRR7      VP                  RRR7      VP                  RRR7      VP                  RRR7      3 F  pVP	                  RRR7       K  	  VP                  RRR7      pVP                  \        R	7       VP	                  RRR7       VP                  R R!R7      pVP                  \        R	7       VP	                  RRR7       VP	                  R"R#R7       V # )$zP
Create an :class:`argparse.ArgumentParser` instance.

:return: parser instance
)progdescriptionz	--versionr#   z	%(prog)s )actionr#   r2   zCompare two versions)help)r'   r1   zFirst versionr3   zSecond versionr   zBumps a versionzBump commands)titledestr   z"Bump the major part of the versionr   z"Bump the minor part of the versionr   z"Bump the patch part of the versionr   z'Bump the prerelease part of the versionr   z"Bump the build part of the versionzVersion to raisecheckz,Checks if a string is a valid semver versionzVersion to checknextverz=Determines the next version, taking prereleases into account.r9   z1One of 'major', 'minor', 'patch', or 'prerelease')r   r<   __package____doc__add_argumentr   add_subparsers
add_parserset_defaultsr5   r(   r.   r:   )r    sparser_compareparser_bumpsbpparser_checkparser_nextvers           r   createparserrS   V   s    $$+7KF
I{[/H   	A\\)2H\IN[1
A
1AB ,,v,=,>K(+		#	#/	#	GB 	g$HI
g$HI
g$HI
l)RS
g$HI 	
y'9: <<D   L 9-i.@A \\W " N [1	0BCH    Mr   c                D    V ^8  d   QhR\         P                  R\        /# r   r   )r   s   "r   r   r      s       ($$  r   c                    \        V R4      '       g%   V P                  P                  4        \        4       hV P	                  V 4      # )z
Process the input from the CLI.

:param args: The parsed arguments
:param parser: the parser instance
:return: result of the selected action
r'   )hasattrr    
print_help
SystemExitr'   r-   s   &r   processrY      s9     4   l 99T?r   c                \    V ^8  d   QhR\         \        \        ,          ,          R\        /# )r	   cliargsr   )r   r   r   int)r   s   "r   r   r      s#      (49%  r   c                     \        4       pVP                  V R7      pWn        \        V4      pVe   \	        V4       ^ #   \
        \        3 d(   p\	        RT\        P                  R7        Rp?^# Rp?ii ; i)z
Entry point for the application script.

:param list cliargs: Arguments to parse or None (=use :class:`sys.argv`)
:return: error code
r-   NERROR)file)	rS   r!   r    rY   printr,   	TypeErrorsysstderr)r[   r    r
   resulterrs   &    r   mainrf      sg      g .&M	" gs,s   <A   A8A33A8)N)rG   r   rb   typingr   r   r   r#   r   	__about__r   r(   r.   r5   r:   rS   rY   rf    r   r   <module>rj      sG   
  
 ' '  "8
:	,	02j  r   