Skip to content

Commit f04796f

Browse files
chore: Use Ruff lint config (#2381)
* 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
1 parent ba5543b commit f04796f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,25 +284,27 @@ module = [
284284
ignore_errors = true
285285

286286
[tool.ruff]
287+
src = ["src"]
288+
line-length = 88
289+
290+
[tool.ruff.lint]
287291
select = [
288292
"E", "F", "W", # flake8
289293
"UP", # pyupgrade
290294
"RUF", # Ruff-specific
291295
"TID", # flake8-tidy-imports
292296
]
293-
line-length = 88
294297
ignore = [
295298
"E402",
296299
"E501",
297300
"RUF001", # String contains ambiguous unicode character
298301
"RUF005", # unpack-instead-of-concatenating-to-collection-literal
299302
]
300-
src = ["src"]
301303
typing-modules = ["pyhf.typing"]
302304
unfixable = [
303305
"F841", # Removes unused variables
304306
]
305307
flake8-tidy-imports.ban-relative-imports = "all"
306308

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

0 commit comments

Comments
 (0)