Skip to content

Commit

Permalink
chore: Use Ruff lint config (#2381)
Browse files Browse the repository at this point in the history
* Use the Ruff lint config option as recommended in the Scientific
  Python Development Guide.
   - RF202: Use (new) lint config section.
   - c.f. https://learn.scientific-python.org/development/guides/style/#ruff
  • Loading branch information
matthewfeickert authored Nov 17, 2023
1 parent ba5543b commit f04796f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -284,25 +284,27 @@ module = [
ignore_errors = true

[tool.ruff]
src = ["src"]
line-length = 88

[tool.ruff.lint]
select = [
"E", "F", "W", # flake8
"UP", # pyupgrade
"RUF", # Ruff-specific
"TID", # flake8-tidy-imports
]
line-length = 88
ignore = [
"E402",
"E501",
"RUF001", # String contains ambiguous unicode character
"RUF005", # unpack-instead-of-concatenating-to-collection-literal
]
src = ["src"]
typing-modules = ["pyhf.typing"]
unfixable = [
"F841", # Removes unused variables
]
flake8-tidy-imports.ban-relative-imports = "all"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"docs/lite/jupyterlite.py" = ["F401", "F704"]

0 comments on commit f04796f

Please sign in to comment.