Skip to content

Commit

Permalink
pre-commit matches pyproject.toml in subdirs (#7242)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmiglio committed Apr 16, 2023
1 parent 99f106c commit b1fcfc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
language: python
language_version: python3
pass_filenames: false
files: ^pyproject.toml$
files: ^(.*/)?pyproject.toml$

- id: poetry-lock
name: poetry-lock
Expand Down
3 changes: 3 additions & 0 deletions docs/pre-commit-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ to make sure the poetry configuration does not get committed in a broken state.
The hook takes the same arguments as the poetry command.
For more information see the [check command]({{< relref "cli#check" >}}).

{{% note %}}
If the `pyproject.toml` file is not in the root directory, you can specify `args: ["-C", "./subdirectory"]`.
{{% /note %}}

## poetry-lock

Expand Down

0 comments on commit b1fcfc0

Please sign in to comment.