Skip to content

Commit 9772d0e

Browse files
committed
feat(ruff): ignore unused imports in __init__.py
1 parent 127634f commit 9772d0e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ ignore = [
123123
"TRY003", # long message in except
124124
]
125125

126+
[tool.ruff.lint.per-file-ignores]
127+
"__init__.py" = [
128+
"F401", # Ignore seemingly unused imports (they're meant for re-export)
129+
]
130+
126131
[tool.ruff.lint.pydocstyle]
127132
convention = "google"
128133

@@ -145,7 +150,12 @@ known-first-party = ["rust_graph", "bio_data_to_db", "reduce_binary", "slack_hel
145150
# Ban certain modules from being imported at module level, instead requiring
146151
# that they're imported lazily (e.g., within a function definition, if TYPE_CHECKING, etc.)
147152
# NOTE: Ruff code TID is currently disabled, so this settings doesn't do anything.
148-
banned-module-level-imports = ["torch", "tensorflow"]
153+
banned-module-level-imports = ["torch"]
154+
155+
# [tool.ruff.lint.flake8-tidy-imports.banned-api]
156+
# "os.getenv".msg = "Use os.environ instead"
157+
# "os.putenv".msg = "Use os.environ instead"
158+
# "os.unsetenv".msg = "Use os.environ instead"
149159

150160
[tool.ruff.lint.pylint]
151161
max-args = 10

0 commit comments

Comments
 (0)