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

Add --force-python option as shorthand for --python and --extra-python #427

Merged
merged 5 commits into from May 27, 2021

Conversation

cjolowicz
Copy link
Collaborator

This PR adds an option --force-python / --force-pythons which functions as a shorthand for when the same interpreter spec should be passed to both --python and --extra-python. This has the effect of running sessions on the specified interpreter instead of those listed for each session.

In other words, these two are equivalent:

  • nox --python=X.Y --extra-python=X.Y
  • nox --force-python=X.Y

By comparison, --extra-python on its own adds an interpreter to those listed for a session. The sessions will be run on the original Python versions as well as the extra version.

This came up a few times in the past:

Copy link
Collaborator

@theacodes theacodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you. :)

@cjolowicz cjolowicz merged commit e9945ef into wntrblm:main May 27, 2021
@cjolowicz cjolowicz deleted the force-python branch May 27, 2021 14:55
@cjolowicz cjolowicz mentioned this pull request Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants