diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 205a0351..58027a6c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,3 +16,4 @@ repos: rev: v1.1.334 hooks: - id: pyright + args: ["--warnings"] diff --git a/noxfile.py b/noxfile.py index 83a602da..129d9683 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,11 +1,11 @@ import nox -@nox.session +@nox.session(reuse_venv=True) def tests(session: nox.Session): session.install("-e", ".[test]", "-e", "./test/_submodules/HexMod") - session.run("pyright", "src/hexdoc", "--warnings") + session.run("pre-commit") # test cookiecutter last so the extra package install doesn't interfere session.run("pytest", *session.posargs) diff --git a/pyproject.toml b/pyproject.toml index 83027096..5a63c7cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,13 +66,13 @@ test = [ "pytest-cookies~=0.7", "pytest-dependency~=0.5", "syrupy~=4.6", + "pre-commit", ] dev = [ "hexdoc[pdoc,test]", "ruff==0.1.4", "hatch", "nox", - "pre-commit", ] [project.urls]