Skip to content

Commit 110422a

Browse files
committed
feat: update uv sync commands and improve Ruff configuration
Update the install and upgrade scripts to use the uv-sync.sh wrapper when available, ensuring consistent environment synchronization. Also enhance the Ruff configuration by ignoring the EXE001 rule for non-executable files with shebangs and clean up trailing comma in the ignore list. These changes improve the reliability of dependency management and refine the linting setup for better developer experience.
1 parent 413bd7b commit 110422a

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

template/.config/copier/mise-tasks/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [[ -f 'pixi.lock' ]]; then
1616
fi
1717

1818
if [[ -f 'uv.lock' ]]; then
19-
uv='uv'
20-
if has uv-wrapper.sh; then uv='uv-wrapper.sh'; fi
21-
"$uv" sync "$@"
19+
uv_sync=(uv sync)
20+
if has uv-sync.sh; then uv_sync=(uv-sync.sh); fi
21+
"${uv_sync[@]}" "$@"
2222
fi

template/.config/copier/mise-tasks/lint.sh renamed to template/.config/copier/mise-tasks/lint/_default

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
# This file is @generated by <https://github.com/liblaf/copier-python>.
33
# DO NOT EDIT!
44
# [MISE] depends=["lint:python", "lint:toml"]
5-
set -o errexit
6-
set -o nounset
7-
set -o pipefail

template/.config/copier/mise-tasks/upgrade.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [[ -f 'pixi.lock' ]]; then
1717
fi
1818

1919
if [[ -f 'uv.lock' ]]; then
20-
uv='uv'
21-
if has uv-wrapper.sh; then uv='uv-wrapper.sh'; fi
22-
"$uv" sync --upgrade "$@"
20+
uv_sync=(uv sync)
21+
if has uv-sync.sh; then uv_sync=(uv-sync.sh); fi
22+
"${uv_sync[@]}" --upgrade "$@"
2323
fi

template/.config/linters/.ruff.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ignore = [
2727
"D107",
2828
"E501",
2929
"ERA001",
30+
"EXE001",
3031
"FIX002",
3132
"INP001",
3233
"PLC0415",
@@ -42,7 +43,7 @@ ignore = [
4243
"TD002",
4344
"TD003",
4445
"TD004",
45-
"TD005",
46+
"TD005"
4647
]
4748
select = ["ALL"]
4849

0 commit comments

Comments
 (0)