Skip to content

Commit

Permalink
fix: provide a basic configuration for Ruff
Browse files Browse the repository at this point in the history
This reduces the number of complaints from Ruff
significantly
  • Loading branch information
candleindark committed Nov 11, 2024
1 parent 515b354 commit 488e255
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,26 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[tool.ruff]
line-length = 88
indent-width = 4
[tool.ruff.lint]
ignore = [
# Avoid use of `from __future__ import annotations`
# becaues it causes problem with Typer
"FA100"
]
[tool.ruff.lint.per-file-ignores]
"**/tests/**/*" = [
# === defaults recommended by hatch ===
# https://hatch.pypa.io/latest/config/internal/static-analysis/#per-file-ignored-rules
"PLC1901",
"PLR2004",
"PLR6301",
"S",
"TID252",

# Allow access to protected members in tests
"SLF001",
]

0 comments on commit 488e255

Please sign in to comment.