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

Reorder ParameterSource #2879

Open
madduck opened this issue Apr 5, 2025 · 0 comments
Open

Reorder ParameterSource #2879

madduck opened this issue Apr 5, 2025 · 0 comments

Comments

@madduck
Copy link

madduck commented Apr 5, 2025

Please consider sorting ParameterSource in order of "explicitness", as this
would make it easier to test for how explicit a parameter is.

Currently, the values are:

  1. COMMANDLINE
  2. ENVIRONMENT
  3. DEFAULT
  4. DEFAULT_MAP
  5. PROMPT

If I want to test whether a parameter has been explicitly provided, I need to
test whether that is not DEFAULT and not DEFAULT_MAP.

Consider this order instead:

  1. PROMPT
  2. COMMANDLINE
  3. ENVIRONMENT
  4. DEFAULT_MAP
  5. DEFAULT

Now I can test x < DEFAULT_MAP. And if #2878 goes anywhere, CONFIGFILE could be slotted in before DEFAULT_MAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant