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 committed Jan 5, 2024
1 parent 9f7b895 commit dbab4df
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 @@ -275,26 +275,28 @@ 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"]
"**.ipynb" = ["F821", "F401", "F841", "F811", "E703"]

0 comments on commit dbab4df

Please sign in to comment.