precommit#
Helper functions for modifying .pre-commit.config.yaml
.
- class Precommit(document: PrecommitConfig, parser: YAML, source: IO | Path | None = None)[source]#
Bases:
object
Read-only representation of a
.pre-commit-config.yaml
file.- property document: PrecommitConfig[source]#
- classmethod load(source: IO | Path | str = PosixPath('.pre-commit-config.yaml')) T [source]#
Load a
pyproject.toml
file from a file, I/O stream, orstr
.
- class ModifiablePrecommit(document: PrecommitConfig, parser: YAML, source: IO | Path | None = None)[source]#
Bases:
Precommit
,AbstractContextManager
Submodules and Subpackages