Skip to content

Commit 76b1a6d

Browse files
chore(deps): Update Python dependencies, pre-commits (#44)
* chore(deps): Update pdm.lock Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update pre-commit deps * chore: add PDM 2.20 to tox config * refactor: simplify useless type-check * docs: explain how to use with PDM Github Action --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: GabDug <[email protected]> Co-authored-by: Gabriel Dugny <[email protected]>
1 parent e307103 commit 76b1a6d

File tree

5 files changed

+520
-489
lines changed

5 files changed

+520
-489
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33
python: python3.11
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.5.0
6+
rev: v5.0.0
77
hooks:
88
- id: check-toml
99
- id: trailing-whitespace
@@ -15,7 +15,7 @@ repos:
1515
- id: fix-byte-order-marker
1616

1717
- repo: https://github.com/python-jsonschema/check-jsonschema
18-
rev: 0.29.2
18+
rev: 0.29.4
1919
hooks:
2020
- id: check-github-workflows
2121
args: ["--verbose"]
@@ -27,12 +27,12 @@ repos:
2727
args: ["--write-changes", "--skip=pdm.lock"]
2828

2929
- repo: https://github.com/tox-dev/tox-ini-fmt
30-
rev: "1.3.1"
30+
rev: "1.4.1"
3131
hooks:
3232
- id: tox-ini-fmt
3333

3434
- repo: https://github.com/tox-dev/pyproject-fmt
35-
rev: "2.2.1"
35+
rev: "v2.5.0"
3636
hooks:
3737
- id: pyproject-fmt
3838
additional_dependencies: ["tox>=4.14.1"]
@@ -46,14 +46,14 @@ repos:
4646
verbose: true
4747
files: ^db\.py|README\.md$
4848

49-
- rev: v0.6.6
49+
- rev: v0.7.2
5050
repo: https://github.com/astral-sh/ruff-pre-commit
5151
hooks:
5252
- id: ruff
5353
args: [--fix, --exit-non-zero-on-fix]
5454
- id: ruff-format
5555

5656
- repo: https://github.com/pdm-project/pdm
57-
rev: 2.18.2
57+
rev: 2.19.3
5858
hooks:
5959
- id: pdm-lock-check

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,25 @@ poetry sync-pre-commit
115115

116116
Both commands support `--dry-run` and verbosity options.
117117

118+
### PDM Github Action support
119+
120+
If you use [pdm-project/update-deps-actions](https://github.com/pdm-project/update-deps-action) Github Action, you can get automatically update `your .pre-commit-config.yaml` file by adding the plugin in your `pyproject.toml` and setting a flag in your workflow:
121+
122+
```yaml
123+
# In your workflow
124+
- name: Update dependencies
125+
uses: pdm-project/update-deps-action@main
126+
with:
127+
# Whether to install PDM plugins before update (defaults to "false")
128+
install-plugins: "true"
129+
```
130+
131+
```toml
132+
# In your pyproject.toml
133+
[tool.pdm]
134+
plugins = ["sync-pre-commit-lock"]
135+
```
136+
118137
## Supported packages for pre-commits
119138

120139
Here is the list of default packages supported by this plugin, from [`db.py`](https://github.com/GabDug/sync-pre-commit-lock/blob/main/src/sync_pre_commit_lock/db.py). You can add more packages using the `dependency-mapping` configuration.

0 commit comments

Comments
 (0)