Skip to content

Commit 18f49e1

Browse files
chore: use nox built-in support for getting versions (#549)
Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: Eduardo Rodrigues <eduardo.rodrigues@cern.ch>
1 parent d9110f0 commit 18f49e1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

noxfile.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44

55
import nox
66

7-
nox.needs_version = ">=2024.4.15"
7+
nox.needs_version = ">=2025.02.09"
88
nox.options.default_venv_backend = "uv|virtualenv"
99

10-
ALL_PYTHONS = [
11-
c.split()[-1]
12-
for c in nox.project.load_toml("pyproject.toml")["project"]["classifiers"]
13-
if c.startswith("Programming Language :: Python :: 3.")
14-
]
10+
PYPROJECT = nox.project.load_toml("pyproject.toml")
11+
PYTHON_VERSIONS = nox.project.python_versions(PYPROJECT)
1512

1613

1714
@nox.session
@@ -29,7 +26,7 @@ def pylint(session: nox.Session) -> None:
2926
session.run("pylint", "src", *session.posargs)
3027

3128

32-
@nox.session(python=ALL_PYTHONS)
29+
@nox.session(python=PYTHON_VERSIONS)
3330
def tests(session):
3431
session.install(".", "--group=test")
3532
session.run("pytest", *session.posargs)

0 commit comments

Comments
 (0)