Skip to content

Commit

Permalink
chore(deps): Update Python dependencies, pre-commits (#44)
Browse files Browse the repository at this point in the history
* 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 <1116720+GabDug@users.noreply.github.com>
Co-authored-by: Gabriel Dugny <git@dugny.me>
  • Loading branch information
3 people authored Nov 3, 2024
1 parent e307103 commit 76b1a6d
Show file tree
Hide file tree
Showing 5 changed files with 520 additions and 489 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-toml
- id: trailing-whitespace
Expand All @@ -15,7 +15,7 @@ repos:
- id: fix-byte-order-marker

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.4
hooks:
- id: check-github-workflows
args: ["--verbose"]
Expand All @@ -27,12 +27,12 @@ repos:
args: ["--write-changes", "--skip=pdm.lock"]

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: "1.4.1"
hooks:
- id: tox-ini-fmt

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

- rev: v0.6.6
- rev: v0.7.2
repo: https://github.com/astral-sh/ruff-pre-commit
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/pdm-project/pdm
rev: 2.18.2
rev: 2.19.3
hooks:
- id: pdm-lock-check
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,25 @@ poetry sync-pre-commit

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

### PDM Github Action support

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:

```yaml
# In your workflow
- name: Update dependencies
uses: pdm-project/update-deps-action@main
with:
# Whether to install PDM plugins before update (defaults to "false")
install-plugins: "true"
```
```toml
# In your pyproject.toml
[tool.pdm]
plugins = ["sync-pre-commit-lock"]
```

## Supported packages for pre-commits

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.
Expand Down
Loading

0 comments on commit 76b1a6d

Please sign in to comment.