Skip to content

Commit

Permalink
chore: update pre-commit hooks and use ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Jan 30, 2024
1 parent 3b9673a commit 95a5abd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,5 @@ cython_debug/

plugin_test/
.vscode/

node_modules/
15 changes: 2 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,12 @@ ci:
autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.1.15
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
stages: [commit]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
Expand Down
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ pytest-asyncio = "^0.21.0"
pytest-xdist = "^3.3.1"
respx = "^0.20.1"

[tool.black]
line-length = 88

[tool.isort]
profile = "black"
line_length = 88
skip_gitignore = true

[tool.ruff]
select = ["E", "W", "F", "UP", "C", "T", "PYI", "Q"]
ignore = ["E402", "E501", "C901", "UP037"]
Expand Down
5 changes: 4 additions & 1 deletion tests/publish/utils/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ async def test_missing_info():
assert name.group(1).strip() == "监测群事件"

assert desc is not None
assert desc.group(1).strip() == "监测群成员变动、文件上传、红包运气王、管理员变动等等..."
assert (
desc.group(1).strip()
== "监测群成员变动、文件上传、红包运气王、管理员变动等等..."
)

assert homepage is not None
assert (
Expand Down

0 comments on commit 95a5abd

Please sign in to comment.