build: add seperate session for typechecking

This commit is contained in:
Daylin Morgan 2023-08-22 22:00:29 -05:00
parent cd0f4d5c95
commit 495ac80cbd
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -5,7 +5,7 @@ from pathlib import Path
import nox
nox.options.sessions = ["lint"]
nox.options.sessions = ["lint", "types"]
nox.options.reuse_existing_virtualenvs = True
os.environ.update({"PDM_IGNORE_SAVED_PYTHON": "1"})
@ -18,6 +18,11 @@ def pdm_install(session, group):
def lint(session):
pdm_install(session, "dev")
session.run("pre-commit", "run")
@nox.session
def typecheck(session):
pdm_install(session, "dev")
session.run("mypy", "src/")