Skip to content

Commit 7c27033

Browse files
authored
chore(deps): update and reduce dependencies, recommends using prek instead of pre-commit. (#26)
* chore(deps): update ruff to v0.14.3 and bump nonebot-plugin-uninfo and nonebot-plugin-alconna versions; remove unused dependencies from pyproject.toml * docs: update README with new installation command for prek and improve repository links; ci: modify test job to use ubuntu-latest and adjust coverage group naming * ci: remove Python 3.14 from CI matrix in workflow configuration
1 parent a61390b commit 7c27033

File tree

5 files changed

+161
-244
lines changed

5 files changed

+161
-244
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,26 @@ jobs:
1919
- uses: crate-ci/typos@master
2020

2121
test:
22-
name: Test
23-
runs-on: ${{ matrix.os }}
22+
name: Coverage
23+
# runs-on: ${{ matrix.os }}
24+
runs-on: ubuntu-latest
2425
permissions:
2526
id-token: write
2627
contents: read
2728
concurrency:
28-
group: test-coverage-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.os }}
29+
# group: test-coverage-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.os }}
30+
group: coverage-${{ github.ref }}-${{ matrix.python-version }}
2931
cancel-in-progress: true
3032

3133
strategy:
3234
fail-fast: false
3335
matrix:
3436
python-version: ["3.10", "3.11", "3.12", "3.13"]
35-
os: [ubuntu-latest, windows-latest, macos-latest]
37+
# os: [ubuntu-latest, windows-latest, macos-latest]
3638
# pydantic-version: ["v1", "v2"]
3739

3840
env:
39-
OS: ${{ matrix.os }}
41+
# OS: ${{ matrix.os }}
4042
PYTHON: ${{ matrix.python-version }}
4143
UV_NO_SYNC: 1
4244

@@ -60,11 +62,11 @@ jobs:
6062
if: ${{ !cancelled() }}
6163
uses: codecov/test-results-action@v1
6264
with:
63-
env_vars: OS,PYTHON
65+
env_vars: PYTHON
6466
use_oidc: true
6567

6668
- name: Upload coverage to Codecov
6769
uses: codecov/codecov-action@v5
6870
with:
69-
env_vars: OS,PYTHON
70-
use_oidc: true
71+
env_vars: PYTHON
72+
use_oidc: true

.pre-commit-config.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
default_install_hook_types: [pre-commit, prepare-commit-msg]
1+
default_install_hook_types: [pre-commit]
22
ci:
33
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
44
autofix_prs: true
@@ -7,16 +7,10 @@ ci:
77
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.13.3
10+
rev: v0.14.3
1111
hooks:
1212
- id: ruff-check
1313
args: [--fix]
1414
stages: [pre-commit]
1515
- id: ruff-format
1616
stages: [pre-commit]
17-
18-
# - repo: https://github.com/nonebot/nonemoji
19-
# rev: v0.1.4
20-
# hooks:
21-
# - id: nonemoji
22-
# stages: [prepare-commit-msg]

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,17 @@ possible values: major, minor, patch, stable, alpha, beta, rc, post, dev
121121
uv tool install pre-commit
122122

123123
pre-commit install
124+
或使用 `prek`
125+
126+
prek install
124127
添加到暂存区
125128

126129
git add <待提交文件>
127130
使用 `nonemoji` 编辑 `commit message`**提交**
128131

129132
nonemoji
130133

131-
仓库地址: [nonemoji](https://github.com/nonebot/nonemoji)
134+
仓库地址:
135+
- [`nonemoji`](https://github.com/nonebot/nonemoji)
136+
- [`prek`](https://github.com/j178/prek)
132137
</details>

pyproject.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ dependencies = [
1111
"nonebot-plugin-localstore>=0.7.4,<1.0.0", # 存储文件
1212
"nonebot-plugin-apscheduler>=0.5.0,<1.0.0", # 定时任务
1313

14-
"nonebot-plugin-uninfo>=0.9.0,<1.0.0", # 多平台用户信息获取
15-
"nonebot-plugin-alconna>=0.59.4,<1.0.0", # 跨平台命令解析拓展
14+
"nonebot-plugin-uninfo>=0.10.0,<1.0.0", # 多平台用户信息获取
15+
"nonebot-plugin-alconna>=0.60.0,<1.0.0", # 跨平台命令解析拓展
1616
# "nonebot-adapter-onebot>=2.4.6,<3.0.0"
1717

1818
"httpx>=0.27.0,<1.0.0",
@@ -27,10 +27,8 @@ Issues = "https://github.com/owner/nonebot-plugin-template/issues"
2727
[dependency-groups]
2828
dev = [
2929
"nonebot2[fastapi]>=2.4.2,<3.0.0",
30-
"ruff>=0.13.2,<1.0.0",
31-
"nonemoji>=0.1.4,<1.0.0",
32-
"pre-commit>=4.3.0",
33-
"bump-my-version>=1.2.3",
30+
"ruff>=0.14.3,<1.0.0",
31+
"bump-my-version>=1.2.4",
3432
]
3533

3634
test = [
@@ -44,7 +42,7 @@ test = [
4442
]
4543

4644
[tool.uv]
47-
required-version = ">=0.8.14"
45+
required-version = ">=0.9.0"
4846
default-groups = ["test", "dev"]
4947

5048
[tool.nonebot]

0 commit comments

Comments
 (0)