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

chore: save session name in Func #718

Merged
merged 1 commit into from
Jul 12, 2023
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
1 change: 1 addition & 0 deletions nox/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(
self.func = func
self.python = python
self.reuse_venv = reuse_venv
self.name = name
self.venv_backend = venv_backend
self.venv_params = venv_params
self.should_warn = should_warn or {}
Expand Down
7 changes: 5 additions & 2 deletions nox/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ def session_decorator(
if python is None:
python = py

fn = Func(func, python, reuse_venv, name, venv_backend, venv_params, tags=tags)
_REGISTRY[name or func.__name__] = fn
final_name = name or func.__name__
fn = Func(
func, python, reuse_venv, final_name, venv_backend, venv_params, tags=tags
)
_REGISTRY[final_name] = fn
return fn


Expand Down