:class:`Labels` =============== .. py:class:: src.ansys.pre_commit_hooks.quality_rules.labels.Labels Bases: :py:obj:`abc.ABC` GitHub label rule family. Base class of the label quality rules. Each rule is a subclass named ``LB`` with a static ``check`` method that evaluates the label configuration independently. Missing or unreadable configuration is reported as an error rather than skipped. .. !! processed by numpydoc !! .. py:currentmodule:: Labels Overview -------- .. tab-set:: .. tab-item:: Abstract methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~check` - Evaluate a label rule. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~family` - Import detail ------------- .. code-block:: python from src.ansys.pre_commit_hooks.quality_rules.labels import Labels Attribute detail ---------------- .. py:attribute:: family :type: ClassVar[str] :value: 'labels' Method detail ------------- .. py:method:: check(repository_root: pathlib.Path, readme_file: str | None) -> ansys.pre_commit_hooks.quality_rules.common.RuleCheckResult :staticmethod: :abstractmethod: Evaluate a label rule. :Parameters: **repository_root** : :obj:`pathlib.Path` Repository root directory. **readme_file** : :class:`python:str` or :data:`python:None` Detected README path, unused by this rule family. :Returns: :ref:`bool ` or :class:`python:str` ``True`` when the rule passes, ``False`` for an error, or a string prefixed with ``"ERROR: "``, ``"WARNING: "``, or ``"RECOMMENDATION: "``. .. !! processed by numpydoc !!