Skip to content

Commit 6b44b8d

Browse files
committed
Chore: Improve Ruff linter rules
- Enforce `import typing as t` alias - Ban imports such as `from typing import Any`
1 parent 868e614 commit 6b44b8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ extend-ignore = [
218218
extend-exclude = [
219219
]
220220

221+
[tool.ruff.lint.flake8-import-conventions]
222+
banned-from = ["typing"]
223+
224+
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
225+
typing = "t"
226+
221227
[tool.ruff.per-file-ignores]
222228
"*/tests/*" = [
223229
"S101", # Allow use of `assert`, and `print`.

0 commit comments

Comments
 (0)