Skip to content

Commit 82d876b

Browse files
chore: improve pyproject.toml from sp-repo-review checks (#2623)
* Update Ruff pre-commit hook to v0.12.0 to use ruff-check. * Apply revisions to pass more of sp-repo-review. - RF003 src directory doesn't need to be specified anymore (0.6+) - Use "INFO" to avoid Error: tool.pytest.ini_options.log_cli_level must be valid exactly by one definition. * Remove License trove classifier as using SPDX project license. --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: Matthew Feickert <[email protected]>
1 parent 316bcae commit 82d876b

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ repos:
3535
- id: rst-inline-touching-normal
3636

3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: "v0.8.1"
38+
rev: "v0.12.0"
3939
hooks:
40-
- id: ruff
40+
- id: ruff-check
4141
args: ["--fix", "--show-fixes"]
4242

4343
- repo: https://github.com/psf/black-pre-commit-mirror

pyproject.toml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "pyhf"
1010
dynamic = ["version"]
1111
description = "pure-Python HistFactory implementation with tensors and autodiff"
1212
readme = "README.rst"
13-
license = { text = "Apache-2.0" } # SPDX short identifier
13+
license = "Apache-2.0"
1414
requires-python = ">=3.8"
1515
authors = [
1616
{ name = "Lukas Heinrich", email = "[email protected]" },
@@ -29,7 +29,6 @@ classifiers = [
2929
"Development Status :: 4 - Beta",
3030
"Environment :: WebAssembly :: Emscripten",
3131
"Intended Audience :: Science/Research",
32-
"License :: OSI Approved :: Apache Software License",
3332
"Operating System :: OS Independent",
3433
"Programming Language :: Python :: 3",
3534
"Programming Language :: Python :: 3 :: Only",
@@ -172,7 +171,7 @@ addopts = [
172171
"--doctest-modules",
173172
"--doctest-glob='*.rst'",
174173
]
175-
log_cli_level = "info"
174+
log_cli_level = "INFO"
176175
testpaths = "tests"
177176
markers = [
178177
"fail_jax",
@@ -262,26 +261,20 @@ module = [
262261
ignore_errors = true
263262

264263
[tool.ruff]
265-
src = ["src"]
266264
line-length = 88
267265

268266
[tool.ruff.lint]
269-
select = [
270-
"E", "F", "W", # flake8
267+
extend-select = [
271268
"UP", # pyupgrade
272269
"RUF", # Ruff-specific
273270
"TID", # flake8-tidy-imports
274271
]
275272
ignore = [
276273
"E402",
277-
"E501",
278274
"RUF001", # String contains ambiguous unicode character
279275
"RUF005", # unpack-instead-of-concatenating-to-collection-literal
280276
]
281277
typing-modules = ["pyhf.typing"]
282-
unfixable = [
283-
"F841", # Removes unused variables
284-
]
285278
flake8-tidy-imports.ban-relative-imports = "all"
286279

287280
[tool.ruff.lint.per-file-ignores]

0 commit comments

Comments
 (0)