Skip to content

Reorder ParameterSource #2879

@madduck

Description

@madduck

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions