diff --git a/noxfile.py b/noxfile.py index ea65e25a..fa524629 100644 --- a/noxfile.py +++ b/noxfile.py @@ -84,7 +84,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None: hook.write_text("\n".join(lines)) -@session(name="pre-commit", python="3.10") +@session(name="pre-commit", python=python_versions[0]) def precommit(session: Session) -> None: """Lint using pre-commit.""" args = session.posargs or ["run", "--all-files", "--show-diff-on-failure"] @@ -107,7 +107,7 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@session(python="3.10") +@session(python=python_versions[0]) def safety(session: Session) -> None: """Scan dependencies for insecure packages.""" requirements = session.poetry.export_requirements() @@ -174,7 +174,7 @@ def xdoctest(session: Session) -> None: session.run("python", "-m", "xdoctest", *args) -@session(name="docs-build", python="3.10") +@session(name="docs-build", python=python_versions[0]) def docs_build(session: Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "docs/_build"] @@ -191,7 +191,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", *args) -@session(python="3.10") +@session(python=python_versions[0]) def docs(session: Session) -> None: """Build and serve the documentation with live reloading on file changes.""" args = session.posargs or ["--open-browser", "docs", "docs/_build"]