restrict_elem

This class represents a single ebuild restrict token as per PMS 7.3.5.
It combines an enum of type properties_elem_type to discern between the properties defined by PMS, and the raw string representation, for use when the property not defined in PMS. The string representation is initialized for known property types aswell.
class pms_utils.ebuild.restrict_elem(self, expr: str)

Constructs a new restrict_elem object from the input expression.

Raises:

ValueError – The expression is invalid.

property string: str

(self) -> str

property type: pms_utils.ebuild.restrict_elem_type

(self) -> pms_utils::ebuild::restrict_elem::Type