Skip to content

Commit 3d2f21e

Browse files
committed
Update noxfile to reuse common arguments
1 parent 1b53145 commit 3d2f21e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

noxfile.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
from __future__ import annotations
1515

16-
from shlex import split
17-
1816
import nox
1917

2018
nox.options.reuse_existing_virtualenvs = True
@@ -25,14 +23,13 @@ def docs(session: nox.Session) -> None:
2523
"""Build the documentation. Use `-- live` to build with a live server."""
2624
session.install("--group", "docs")
2725
session.install("-e", ".")
26+
common_args = '-M', 'html', 'docs/source', 'docs/build'
2827
if "live" in session.posargs:
2928
session.install("ipython")
3029
session.install("sphinx-autobuild")
31-
session.run(*split("sphinx-autobuild -b html docs/source docs/build/html"))
30+
session.run('sphinx-autobuild', *common_args)
3231
else:
33-
session.run(
34-
*split("sphinx-build -nW --keep-going -b html docs/source docs/build/html"),
35-
)
32+
session.run('sphinx-build', *common_args, '-nW', '--keep-going')
3633

3734

3835
@nox.session

0 commit comments

Comments
 (0)