From f783042e28244409317e78243de36f8c381d5232 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:08:51 -0500 Subject: [PATCH] Only skip unused-import checks in __init__.py files (#2844) This will help catch unused imports in other files when using Ruff. --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 338be18a..1f12f0e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -194,7 +194,6 @@ select = [ ignore = [ "E701", # multiple-statements-on-one-line-colon "E722", # bare-except - "F401", # unused-import "PLW2901", # redefined-loop-name "UP006", # non-pep585-annotation "UP007", # non-pep604-annotation @@ -209,3 +208,6 @@ ignore = [ [tool.ruff.lint.mccabe] max-complexity = 40 + +[tool.ruff.lint.per-file-ignores] +"__init__.py" = ["F401"] # unused-import