mirror of
https://github.com/andrewthetechie/py-healthchecks.io.git
synced 2026-01-06 17:13:08 +01:00
add some client work
This commit is contained in:
12
noxfile.py
12
noxfile.py
@@ -26,6 +26,7 @@ python_versions = ["3.10", "3.9", "3.8", "3.7"]
|
||||
nox.needs_version = ">= 2021.6.6"
|
||||
nox.options.sessions = (
|
||||
"pre-commit",
|
||||
"bandit",
|
||||
"safety",
|
||||
"mypy",
|
||||
"tests",
|
||||
@@ -139,13 +140,18 @@ def safety(session: Session) -> None:
|
||||
@session(python=python_versions)
|
||||
def mypy(session: Session) -> None:
|
||||
"""Type-check using mypy."""
|
||||
args = session.posargs or ["src", "docs/conf.py"]
|
||||
args = session.posargs or ["src"]
|
||||
session.install(".")
|
||||
session.install("mypy", "pytest")
|
||||
session.install(*mypy_type_packages)
|
||||
session.run("mypy", *args)
|
||||
if not session.posargs:
|
||||
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
|
||||
|
||||
|
||||
@session(python=python_versions[0])
|
||||
def bandit(session: Session) -> None:
|
||||
"""Run bandit security tests"""
|
||||
args = session.posargs or ["-r", "./src"]
|
||||
session.run("bandit", *args)
|
||||
|
||||
|
||||
@session(python=python_versions)
|
||||
|
||||
Reference in New Issue
Block a user