Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run nox with uv as the backend when available #1915

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nox==2024.4.15
nox[uv]==2024.4.15
11 changes: 11 additions & 0 deletions pipelines/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,19 @@

from pipelines import config as _pipelines_config

try:
import uv

del uv

venv_backend = "uv"
except ModuleNotFoundError:
venv_backend = "venv"


# Default sessions should be defined here
_options.sessions = ["reformat-code", "pytest-all-features", "flake8", "slotscheck", "mypy", "verify-types"]
_options.default_venv_backend = venv_backend

_NoxCallbackSig = _typing.Callable[[Session], None]

Expand Down
Loading