File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/packaging/__pycache__/specifiers.cpython-310.pyc
Back
o �hw� � @ s d Z ddlmZ ddlZddlZddlZddlmZmZm Z m Z mZ ddlm Z ddlmZ eeef Ze ded �Zeeegef Zd*dd�ZG dd� de�ZG dd� dejd�ZG dd� de�Ze�d�Zd+dd�Zd,dd�Zd-d!d"�Zd.d&d'�Z G d(d)� d)e�Z!dS )/z� .. testsetup:: from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier from packaging.version import Version � )�annotationsN)�Callable�Iterable�Iterator�TypeVar�Union� )�canonicalize_version)�Version�UnparsedVersionVar)�bound�version�UnparsedVersion�returnr c C s t | t�s t| �} | S �N)� isinstancer )r � r �J/usr/local/CyberPanel/lib/python3.10/site-packages/packaging/specifiers.py�_coerce_version s r c @ s e Zd ZdZdS )�InvalidSpecifiera Raised when attempting to create a :class:`Specifier` with a specifier string that is invalid. >>> Specifier("lolwat") Traceback (most recent call last): ... packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' N)�__name__� __module__�__qualname__�__doc__r r r r r s r c @ s� e Zd Zejddd��Zejddd��Zejddd��Zeejd dd���Z e j d!dd��Z ejd"d#dd��Zej d"d$dd��ZdS )%� BaseSpecifierr �strc C � dS )z� Returns the str representation of this Specifier-like object. This should be representative of the Specifier itself. Nr ��selfr r r �__str__- � zBaseSpecifier.__str__�intc C r )zF Returns a hash value for this Specifier-like object. Nr r r r r �__hash__4 r zBaseSpecifier.__hash__�other�object�boolc C r )z� Returns a boolean representing whether or not the two Specifier-like objects are equal. :param other: The other object to check against. Nr �r r# r r r �__eq__: r zBaseSpecifier.__eq__�bool | Nonec C r )z�Whether or not pre-releases as a whole are allowed. This can be set to either ``True`` or ``False`` to explicitly enable or disable prereleases or it can be set to ``None`` (the default) to use default semantics. Nr r r r r �prereleasesC r zBaseSpecifier.prereleases�value�Nonec C r )zQSetter for :attr:`prereleases`. :param value: The value to set. Nr �r r* r r r r) L r N�itemr) c C r )zR Determines if the given item is contained within this specifier. Nr )r r- r) r r r �containsS r zBaseSpecifier.contains�iterable�Iterable[UnparsedVersionVar]�Iterator[UnparsedVersionVar]c C r )z� Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. Nr )r r/ r) r r r �filterY r zBaseSpecifier.filter�r r �r r! �r# r$ r r% �r r( �r* r% r r+ r )r- r r) r( r r% �r/ r0 r) r( r r1 ) r r r �abc�abstractmethodr r"