-
-
Notifications
You must be signed in to change notification settings - Fork 167
Description
How would this feature be useful?
The session name manually provided at @nox.session(name="foo")
does get sent to nox._decorators.Func(name="foo")
, but it's then ignored, and not saved to the instance.
Also, if the session name isn't manually provided, it'll be inferred from the function name, but then won't even be sent to Func
.
Line 60 in 720f1ea
name: str | None = None, |
Lines 88 to 89 in 720f1ea
fn = Func(func, python, reuse_venv, name, venv_backend, venv_params, tags=tags) | |
_REGISTRY[name or func.__name__] = fn |
Saving the session name, be it manually provided or automatically inferred, would make it easier for other developers to extend Nox functionality with other libraries.
Describe the solution you'd like
I'd like for the session name, regardless of whether it was manually provided, to be sent to Func
and saved as an instance variable there.
Describe alternatives you've considered
No response
Anything else?
I believe this is a simple and quick enough change, so I'll be sending a PR with a possible implementation.