Skip to content

Void nox.options.sessions when tags are specified #683

@avylove

Description

@avylove

Current Behavior

Setting nox.options.sessions makes '--tags' not work.

Expected Behavior

Just like --sessions and --keywords, --tags should clear the related nox.options values.

Steps To Reproduce

  1. With two sessions (pylint and flake8), both with tag lint, set nox.options.sessions = ('flake8', )
nox.options.sessions = ('flake8', )

@nox.session(tags=['lint'])
def pylint(session: nox.Session) :
    pass

@nox.session(tags=['lint'])
def flake8(session: nox.Session) :
    pass
  1. Run nox -lt lint, pylint is not selected even though it matches the tag
- pylint -> Run Pylint
* flake8 -> Run Flake8

Environment

- OS: Fedora 37
- Python: 3.11
- Nox: 2022.11.21

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions