Skip to content

Commit 5d51d40

Browse files
committed
chore: Template upgrade
1 parent b4afabe commit 5d51d40

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.1.3
2+
_commit: 1.2.1
33
_src_path: gh:pawamoy/copier-pdm
44
author_email: pawamoy@pm.me
55
author_fullname: Timothée Mazzucotelli

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.vscode/
23
__pycache__/
34
*.py[cod]
45
dist/

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
SHELL := bash
33
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
44
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12
5+
export PDM_MULTIRUN_USE_VENVS ?= $(if $(shell pdm config python.use_venv | grep True),1,0)
56

67
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
78
check_quality_args = files

config/ruff.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
target-version = "py38"
2-
line-length = 132
2+
line-length = 120
33
exclude = [
44
"fixtures",
55
"site",
@@ -102,3 +102,7 @@ known-first-party = ["griffe_typingdoc"]
102102

103103
[pydocstyle]
104104
convention = "google"
105+
106+
[format]
107+
docstring-code-format = true
108+
docstring-code-line-length = 80

config/vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"configurations": [
44
{
55
"name": "python (current file)",
6-
"type": "python",
6+
"type": "debugpy",
77
"request": "launch",
88
"program": "${file}",
99
"console": "integratedTerminal",
1010
"justMyCode": false
1111
},
1212
{
1313
"name": "test",
14-
"type": "python",
14+
"type": "debugpy",
1515
"request": "launch",
1616
"module": "pytest",
1717
"justMyCode": false,

duties.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import TYPE_CHECKING, Iterator
1111

1212
from duty import duty
13-
from duty.callables import black, coverage, lazy, mkdocs, mypy, pytest, ruff, safety
13+
from duty.callables import coverage, lazy, mkdocs, mypy, pytest, ruff, safety
1414

1515
if TYPE_CHECKING:
1616
from duty.context import Context
@@ -211,7 +211,7 @@ def format(ctx: Context) -> None:
211211
ruff.check(*PY_SRC_LIST, config="config/ruff.toml", fix_only=True, exit_zero=True),
212212
title="Auto-fixing code",
213213
)
214-
ctx.run(black.run(*PY_SRC_LIST, config="config/black.toml"), title="Formatting code")
214+
ctx.run(ruff.format(*PY_SRC_LIST, config="config/ruff.toml"), title="Formatting code")
215215

216216

217217
@duty(post=["docs-deploy"])

scripts/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ if ! pdm self list 2>/dev/null | grep -q pdm-multirun; then
1212
fi
1313

1414
if [ -n "${PDM_MULTIRUN_VERSIONS}" ]; then
15+
if [ "${PDM_MULTIRUN_USE_VENVS}" -eq "1" ]; then
16+
for version in ${PDM_MULTIRUN_VERSIONS}; do
17+
if ! pdm venv --path "${version}" &>/dev/null; then
18+
pdm venv create --name "${version}" "${version}"
19+
fi
20+
done
21+
fi
1522
pdm multirun -v pdm install -G:all
1623
else
1724
pdm install -G:all

0 commit comments

Comments
 (0)