From fb7ebc2f79ff964686b3c8f9a325cefc93668843 Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Sat, 27 Nov 2021 07:22:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20[nox]=20Do=20not=20hardcode=20Py?= =?UTF-8?q?thon=20versions=20in=20`@session`=20decorators=20(#711)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noxfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"]