diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a9d9971..afbfeb52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: tests/packages/dynamic_metadata/src/dynamic/__init__.py| tests/packages/.*/setup.py ) - files: ^(src|tests) + files: ^(src|tests|noxfile.py) args: [] additional_dependencies: - build @@ -81,6 +81,7 @@ repos: - importlib-resources - markdown-it-py<3 # Python 3.7 compat needed for mypy check - ninja + - nox - packaging - pyproject_metadata - pytest diff --git a/noxfile.py b/noxfile.py index f5cb8ad1..cef823bb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -36,7 +36,7 @@ def pylint(session: nox.Session) -> None: def _run_tests( session: nox.Session, *, - install_args: Sequence[str], + install_args: Sequence[str] = (), run_args: Sequence[str] = (), extras: Sequence[str] = (), ) -> None: @@ -147,7 +147,7 @@ def build(session: nox.Session) -> None: """ session.install("build") - session.run("python", "-m", "build", **session.posargs) + session.run("python", "-m", "build", *session.posargs) EXAMPLES = ["c", "abi3", "pybind11", "nanobind", "swig", "cython"] @@ -204,7 +204,7 @@ def downstream(session: nox.Session) -> None: "clone", args.project, *remaining, - proj_dir, + str(proj_dir), "--recurse-submodules", external=True, ) diff --git a/pyproject.toml b/pyproject.toml index ed07fd84..6193fb3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,7 +136,7 @@ markers = [ [tool.mypy] -files = ["src", "tests"] +files = ["src", "tests", "noxfile.py"] mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"] python_version = "3.7" warn_unused_configs = true