README#

class src.ansys.pre_commit_hooks.quality_rules.readme.README#

Bases: abc.ABC

README rule family.

Base class of the README quality rules. Each rule is a subclass named RM with a static check method that receives the repository root and the name of the detected README file.

Overview#

check

Evaluate a README rule.

Import detail#

from src.ansys.pre_commit_hooks.quality_rules.readme import README

Attribute detail#

README.family: ClassVar[str] = 'readme'#

Method detail#

static README.check(repository_root: pathlib.Path, readme_file: str | None) → ansys.pre_commit_hooks.quality_rules.common.RuleCheckResult#
Abstractmethod:

Evaluate a README rule.

Parameters:
repository_rootpathlib.Path

Repository root directory.

readme_filestr or None

Detected README path, or None when no supported README exists.

Returns:
bool or str

Raw rule result consumed by the quality-report runner.