Skip to content

Commit

Permalink
Move ruff config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-hartono committed Feb 28, 2024
1 parent 0ee4203 commit a29027c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 39 deletions.
39 changes: 0 additions & 39 deletions .ruff.toml

This file was deleted.

41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,44 @@ exclude_lines = [
]
skip_covered = true
skip_empty = true

[tool.ruff]
include = ["ensysmod/**/*.py", "tests/**/*.py"]

line-length = 150
target-version = "py311"

[tool.ruff.lint]
select = ["ALL"]
ignore = ["N", "D", "ANN", "S", "BLE", "A", "EM", "TD", "FIX", "PL", "TRY"]

# conflicting lint rules: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
extend-ignore = [
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"I001", # allow unsorted imports in __init__.py
"F401", # allow unused imports in __init__.py
]
"tests/*" = [
"S101", # allow assert statements for pytest
"ARG", # allow unused arguments for pytest fixtures
]
"ensysmod/api/endpoints/*" = [
"B008", # allow function calls (Depends, File) in API endpoints
]

0 comments on commit a29027c

Please sign in to comment.