class documentation

Undocumented

Method __eq__ Returns a boolean representing whether or not the two Specifier-like objects are equal.
Method __hash__ Returns a hash value for this Specifier-like object.
Method __str__ Returns the str representation of this Specifier-like object. This should be representative of the Specifier itself.
Method contains Determines if the given item is contained within this specifier.
Method filter Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it.
Method prereleases.setter Setter for :attr:`prereleases`.
Property prereleases Whether or not pre-releases as a whole are allowed.
@abc.abstractmethod
def __eq__(self, other: object) -> bool: (source)

Returns a boolean representing whether or not the two Specifier-like objects are equal. :param other: The other object to check against.

@abc.abstractmethod
def __hash__(self) -> int: (source)

Returns a hash value for this Specifier-like object.

@abc.abstractmethod
def __str__(self) -> str: (source)

Returns the str representation of this Specifier-like object. This should be representative of the Specifier itself.

@abc.abstractmethod
def contains(self, item: str, prereleases: Optional[bool] = None) -> bool: (source)

Determines if the given item is contained within this specifier.

Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it.

@prereleases.setter
def prereleases(self, value: bool): (source)

Setter for :attr:`prereleases`. :param value: The value to set.

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.