From 5fec855c0a729e5eb3f82dc66220e507c038dd48 Mon Sep 17 00:00:00 2001 From: Sam <78538841+spwoodcock@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:57:54 +0000 Subject: [PATCH] docs: update README with info about projects in subdirectories https://github.com/astral-sh/uv-pre-commit/issues/15 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 05abaab..cf6c4d0 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,20 @@ To run the hook over multiple files at the same time: files: ^requirements-dev\.(in|txt)$ ``` +To run a hook on a project within a subdirectory (e.g. monorepo): + +```yaml +- repo: https://github.com/astral-sh/uv-pre-commit + # uv version. + rev: 0.5.18 + hooks: + # Update the uv lockfile + - id: uv-lock + # Change to your relative path + files: /pyproject.toml + args: [--project, ] +``` + To synchronize your dependencies upon branch checkout, pull or rebase: ```yaml