Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
pdm = "2.24"
python = ["3.12", "3.13.3", "3.11", "3.10", "3.9"]
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ repos:
verbose: true
files: ^db\.py|README\.md$

- rev: v0.8.0
- rev: v0.11.6
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.20.1
rev: 2.24.0
hooks:
- id: pdm-lock-check
2 changes: 0 additions & 2 deletions .tool-versions

This file was deleted.

11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ PDM and Poetry plugin to sync your pre-commit versions with your lockfile and au
## Supported versions

- Python 3.9+
- PDM 2.7.4+
- Poetry 1.6.0+
- PDM 2.7.4 to 2.24
- Python 3.12.7+ requires PDM 2.20.1+
- Poetry 1.6 to 2.1

> ℹ️ While we only test these versions, it should work with more recent versions.
>
> ⚠️ Only the latest patch version for each minor version is tested.
>
> 👉 We recommend using a recent version of Python, and a recent version of PDM/Poetry.

## Installation

Expand Down
1,536 changes: 853 additions & 683 deletions pdm.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sync_pre_commit_lock/poetry_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


class PoetryPrinter(Printer):
success_list_token: str = "<fg=green;options=bold>•</>"
success_list_token: str = "<fg=green;options=bold>•</>" # noqa: S105

def __init__(self, io: IO, with_prefix: bool = True) -> None:
self.io = io
Expand Down
41 changes: 26 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ requires =
env_list =
clean
report
py{313, 312, 311, 310, 39}-pdm{220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}
py{313, 312, 311, 310, 39}-poetry{18, 17, 16, HEAD}
py{313, 312}-pdm{224, 223, 222, 221, 220, HEAD}
py{311, 310, 39}-pdm{224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}
py{313, 312, 311, 310, 39}-poetry{21, 20, 18, 17, 16, HEAD}

[testenv]
set_env =
py{39,310,311,312,313}-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220, HEAD}: COVERAGE_FILE = .coverage.{envname}
py{39,310,311,312,313}-poetry{16, 17, 18, HEAD}: COVERAGE_FILE = .coverage.{envname}
py{312,313}-pdm{220,221,222,223,224,HEAD}: COVERAGE_FILE = .coverage.{envname}
py{39,310,311,312,313}-poetry{21, 20, 18, 17, 16, HEAD}: COVERAGE_FILE = .coverage.{envname}
py{39,310,311}-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,HEAD}: COVERAGE_FILE = .coverage.{envname}
commands =
pytest --cov --cov-append --cov-report=term-missing {posargs:-vv} --cov-config=pyproject.toml
allowlist_externals =
coverage
pdm
pytest
depends =
report: py{313, 312, 311, 310, 39}-pdm{220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}
report: py{313, 312, 311, 310, 39}-poetry{18, 17, 16, HEAD}
py{313, 312, 311, 310, 39}-pdm{220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}: clean
py{313, 312, 311, 310, 39}-poetry{18, 17, 16, HEAD}: clean
report: py{313, 312, 311, 310, 39}-pdm{224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}
report: py{313, 312, 311, 310, 39}-poetry{21, 20, 18, 17, 16, HEAD}
py{313, 312, 311, 310, 39}-pdm{224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 29, 28, 27, HEAD}: clean
py{313, 312, 311, 310, 39}-poetry{21, 20, 18, 17, 16, HEAD}: clean

[testenv:clean]
skip_install = true
Expand All @@ -41,10 +43,13 @@ commands =
coverage html
coverage xml

[testenv:py{39,310,311,312,313}-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,HEAD}]
[testenv:py{39,310,311,312,313}-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,HEAD}]
package = editable
deps =
-r requirements-tox.txt
py310-pdm214: httpx<0.28
py311-pdm214: httpx<0.28
py39-pdm214: httpx<0.28
py39-pdm27: importlib-metadata<8
pdm210: pdm<2.11,>=2.10
pdm211: pdm<2.12,>=2.11
Expand All @@ -57,25 +62,31 @@ deps =
pdm218: pdm<2.19,>=2.18
pdm219: pdm<2.20,>=2.19
pdm220: pdm<2.21,>=2.20
pdm221: pdm<2.22,>=2.21
pdm222: pdm<2.23,>=2.22
pdm223: pdm<2.24,>=2.23
pdm224: pdm<2.25,>=2.24
pdm27: pdm<2.8,>=2.7
pdm28: pdm<2.9,>=2.8
pdm29: pdm<2.10,>=2.9
pdmHEAD: pdm@ git+https://github.com/pdm-project/pdm.git

[testenv:py{313,312, 311, 310, 39}-poetry{16, 17, 18, HEAD}]
[testenv:py{313,312, 311, 310, 39}-poetry{16, 17, 18, 20, 21,HEAD}]
package = editable
deps =
-r requirements-tox.txt
poetry16: poetry<1.7,>=1.6
poetry17: poetry<1.8,>=1.7
poetry18: poetry<1.9,>=1.8
poetry20: poetry<2.1,>=2
poetry21: poetry<2.2,>=2.1
poetryHEAD: poetry@ git+https://github.com/python-poetry/poetry.git

[gh]
python =
3.9= py39-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,HEAD},py39-poetry{16, 17, 18, HEAD}, report, clean
3.10= py310-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,HEAD}, py310-poetry{16, 17, 18, HEAD}, report, clean
3.11= py311-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,HEAD}, py311-poetry{16, 17, 18, HEAD}, report, clean
3.12= py312-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,HEAD}, py312-poetry{16, 17, 18, HEAD}, report, clean
3.13= py313-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,HEAD}, py313-poetry{16, 17, 18, HEAD}, report, clean
3.9= py39-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,HEAD},py39-poetry{21, 20, 18, 17, 16, HEAD}, report, clean
3.10= py310-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,HEAD}, py310-poetry{21, 20, 18, 17, 16, HEAD}, report, clean
3.11= py311-pdm{27,28,29,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,HEAD}, py311-poetry{21, 20, 18, 17, 16, HEAD}, report, clean
3.12= py312-pdm{220,221,222,223,224,HEAD}, py312-poetry{21, 20, 18, 17, 16, HEAD}, report, clean
3.13= py313-pdm{220,221,222,223,224,HEAD}, py313-poetry{21, 20, 18, 17, 16, HEAD}, report, clean
fail_on_no_env = True
Loading