INNER CODE UNIT · Python
coverage
JasperSui/fastapi-injectable · noxfile.py:142
def coverage(session: nox.Session) -> None:
"""Produce the coverage report."""
args = session.posargs or ["report"]
session.install("coverage[toml]")
if not session.posargs and any(Path().glob(".coverage.*")):
session.run("coverage", "combine")
session.run("coverage", *args)
@nox.session(name="docs-build", python=latest_python_version)
def docs_build(session: nox.Session) -> None:
"""Build the documentation."""
args = session.posargs or ["docs", "docs/_build"]
if not session.posargs and "FORCE_COLOR" in os.environ:
args.insert(0, "--color")