pre_commit
ruff_sync.pre_commit ¶
Pre-commit hook synchronization logic.
resolve_ruff_version ¶
Resolve the Ruff version for the project from lockfile or pyproject.toml.
Source code in src/ruff_sync/pre_commit.py
sync_pre_commit ¶
Sync the local .pre-commit-config.yaml with the project's Ruff version.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if in sync, False if out of sync (and optionally updated). |