관리-도구
편집 파일: cli.cpython-311.pyc
� �܋fE � � � d Z ddlZddlZddlmZmZmZ ddlmZ ddl m Z dej defd �Z dej ddfd �Zdej defd�Zdej defd�Zdej fd �Zdej defd�Zddeee defd�ZdS )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__�args�returnc � � dddddd�}| j �| j � dd g� � t j | j � � }t ||t t | j � � � � }t |� � � � S ) 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 � bump_major� bump_minor� bump_patch�bump_prerelease� bump_build)�major�minor�patch� prerelease�buildN�bumpz-h) r �parser� parse_argsr �parse�version�getattrr �str)r �maptable�ver�funcs �[/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/semver/cli.py�cmd_bumpr! s� � � ���'��� �H� �y�� ������~�.�.�.� �-��� %� %�C��3���c�4�9�!5�!5�6�7�7�D��t�t�v�v�;�;�� c �f � t j | j � � rdS t d| j z � � �)z� Subcommand: Checks if a string is a valid semver version. Synopsis: check <VERSION> :param args: The parsed arguments NzInvalid version %r)r �is_validr � ValueError�r s r � cmd_checkr'