Skip to content

Commit

Permalink
Chore: Improve Ruff linter rules
Browse files Browse the repository at this point in the history
- Enforce `import typing as t` alias
- Ban imports such as `from typing import Any`
  • Loading branch information
amotl committed Dec 21, 2023
1 parent 868e614 commit 6b44b8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ extend-ignore = [
extend-exclude = [
]

[tool.ruff.lint.flake8-import-conventions]
banned-from = ["typing"]

[tool.ruff.lint.flake8-import-conventions.extend-aliases]
typing = "t"

[tool.ruff.per-file-ignores]
"*/tests/*" = [
"S101", # Allow use of `assert`, and `print`.
Expand Down

0 comments on commit 6b44b8d

Please sign in to comment.