From 6d3459c25f0e35e168f625d01ac88b61bc817a04 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 1 Jul 2023 09:59:52 -0500 Subject: [PATCH] ci(ruff): Add additional rules --- pyproject.toml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e19f9c79..4043f908 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,6 +113,33 @@ files = [ "tests/", ] +[tool.ruff] +target-version = "py38" +select = [ + "E", # pycodestyle + "F", # pyflakes + "I", # isort + "UP", # pyupgrade + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "Q", # flake8-quotes + "PTH", # flake8-use-pathlib + "ERA", # eradicate + "SIM", # flake8-simplify + "TRY", # Trycertatops + "PERF", # Perflint + "RUF" # Ruff-specific rules +] + +[tool.ruff.isort] +known-first-party = ["unihan_etl", "cihai"] +combine-as-imports = true + +[tool.ruff.per-file-ignores] +"*/__init__.py" = ["F401"] + + + [tool.coverage.run] branch = true parallel = true