feat: support default=False#810
Merged
henryiii merged 1 commit intowntrblm:mainfrom Apr 8, 2024
Merged
Conversation
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
3f6b3f1 to
5b45956
Compare
cjolowicz
approved these changes
Apr 7, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #686 and fix #654. I looked over #232 (comment), and that doesn't seem to preclude this as an option. It looks like very early nox adopted
nox.optionsas a general solution, but I don't think that means there can't be a per-session option to remove it from the default list.Personally, I generally do the inverse - I only have a small set of "default" sessions, and most sessions for me are helpers, etc. But it seems a decent number of projects like this mechanism, and it's also very discoverable. It also reads well inline. An added idea would be a
nox.options.default = Falsemechanism to switch the default for default, so that you'd list the sessions you wanted to run withdefault = True(which I think would match my usage better), but that could always be added later if people want it, and there probably should be some discussion of the name - default on a session is clear, not so much onnox.options. And I don't see a reason to have it on the command line.I choose
default=Falseoverskip=True. Though either would be fine.All
default=Falseis not special cased, it behaves like an empty file (in other words, it's likenox.options.sessions = Nonenotnox.options.sessions = [], which prints the list of sessions if nothing is specified). Maybe that would be better, though.