From 09ded958dc979c6bf9650a162c2a12b7c3c07e99 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 17 Nov 2023 02:15:32 -0600 Subject: [PATCH] chore: Use Ruff lint config * 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 --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index adcb9d4d5f..8161145a15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]