Only skip unused-import checks in __init__.py files (#2844)

This will help catch unused imports in other files when using Ruff.
This commit is contained in:
correctmost 2024-11-16 20:08:51 -05:00 committed by GitHub
parent f13f3d53b6
commit f783042e28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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