Skip to content

Add option to skip session by default #686

@slavong

Description

@slavong

How would this feature be useful?

Currently nox supports the possibility to exclude some sessions from running by default using positive list nox.options.sessions = [session1, session3]. In this case session2 would not be executed by running nox and would need to be specified explicitly, e.g. nox -s session2

Describe the solution you'd like

Usually, this kind of tagging is expected to be found in negative lists. If someone forgets to add the session4 to the nox.options.sessions list, then it would run by default.

My proposal is to add an option to nox.sessions to skip the session by default

@nox.session(skip=True)
def session2(session):
   pass

Describe alternatives you've considered

Writing my own decorator would be an option, but a built-in solution would be preferrable.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions