diff --git a/.gitignore b/.gitignore index 17fd1cf6..bbe414da 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,5 @@ cython_debug/ plugin_test/ .vscode/ + +node_modules/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f02e2cc..594714e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index fe85f9af..d3a6165d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/tests/publish/utils/test_re.py b/tests/publish/utils/test_re.py index deff9c7a..ae105a40 100644 --- a/tests/publish/utils/test_re.py +++ b/tests/publish/utils/test_re.py @@ -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 (