add some client work

This commit is contained in:
Andrew Herrington
2021-12-10 18:05:49 -06:00
parent 90233c568e
commit 2bfece1e56
14 changed files with 428 additions and 19 deletions

View File

@@ -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)