From db8aed3d674ca406e47ba6201b7f31c007eb892e Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Tue, 26 Mar 2024 19:59:12 +0800 Subject: [PATCH] chore: update ruff lint rules --- pyproject.toml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 47cedb6..b876da5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,12 +55,32 @@ force_sort_within_sections = true extra_standard_library = ["typing_extensions"] [tool.ruff] -select = ["E", "W", "F", "UP", "C", "T", "PYI", "PT", "Q"] -ignore = ["E402", "C901", "UP037"] - line-length = 88 target-version = "py311" +[tool.ruff.lint] +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.extend-per-file-ignores] "./scripts/*" = ["T201"] "./docker/*" = ["T201"]