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

feat: add explicit flag to list command #3760

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

SandrineP
Copy link
Collaborator

Adds one of the missing sub-command #3535

@SandrineP SandrineP marked this pull request as ready for review January 21, 2025 12:24
@JohanMabille JohanMabille added the release::enhancements For enhancements PRs or implementing features label Jan 21, 2025
@@ -228,6 +240,7 @@ namespace mamba
options.full_name = config.at("full_name").value<bool>();
options.no_pip = config.at("no_pip").value<bool>();
options.reverse = config.at("reverse").value<bool>();
options.explicit_ = config.at("explicit_").value<bool>();
Copy link
Member

Choose a reason for hiding this comment

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

Is the underscore required for this string? I understand explicit is a C++ keyword, but that doesn't apply to strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not, good catch!
Btw, is adding an underscore after explicit an acceptable way to write a variable name or is there a better practice?

Copy link
Member

@Klaim Klaim Jan 21, 2025

Choose a reason for hiding this comment

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

No best practice, if you ideally need to name something in a way that's already reserved as a keyword, you either add somethnig to it like you did, or change the name to mean the same thing but make it still readable. For example it could have been explicit_list or explicit_print or as_explicit etc. As long as it's clear in the code and easy to follow when reading it's ok.

@JohanMabille JohanMabille merged commit 9c856fd into mamba-org:main Jan 21, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::enhancements For enhancements PRs or implementing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants