From e7295c226cb684fc350202aaff7451ebfd9f17f1 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Mon, 28 Oct 2024 16:06:59 +0800 Subject: [PATCH] :construction_worker: try fixing tests --- pyproject.toml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d4a395..e3f294d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,9 @@ werkzeug = ">=2.3.6,<4.0.0" nb-autodoc = { git = "https://github.com/nonebot/nb-autodoc.git" } [tool.pytest.ini_options] -addopts = "--cov=nonebot/adapters/feishu --cov-report term-missing" +asyncio_mode = "auto" +addopts = "--cov=nonebot/adapters/feishu --cov-report=term-missing" +filterwarnings = ["error", "ignore::DeprecationWarning"] [tool.black] line-length = 88 @@ -69,8 +71,27 @@ line-length = 88 target-version = "py39" [tool.ruff.lint] -select = ["E", "W", "F", "UP", "C", "T", "PYI", "PT", "Q"] -ignore = ["E402", "C901", "UP037", "PYI021"] +select = [ + "F", # Pyflakes + "W", # pycodestyle warnings + "E", # pycodestyle errors + "UP", # pyupgrade + "ASYNC", # flake8-async + "C4", # flake8-comprehensions + "T10", # flake8-debugger + "T20", # flake8-print + "PYI", # flake8-pyi + "PT", # flake8-pytest-style + "Q", # flake8-quotes + "RUF", # Ruff-specific rules +] +ignore = [ + "E402", # module-import-not-at-top-of-file + "UP037", # quoted-annotation + "RUF001", # ambiguous-unicode-character-string + "RUF002", # ambiguous-unicode-character-docstring + "RUF003", # ambiguous-unicode-character-comment +] [tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false