class ParameterSource(enum.Enum):
This is an ~enum.Enum
that indicates the source of a
parameter's value.
Use click.Context.get_parameter_source
to get the
source for a parameter by name.
~enum.Enum
and drop the validate method.Constant | COMMANDLINE |
The value was provided by the command line args. |
Constant | DEFAULT |
Used the default specified by the parameter. |
Constant | DEFAULT​_MAP |
Used a default provided by Context.default_map . |
Constant | ENVIRONMENT |
The value was provided with an environment variable. |
Constant | PROMPT |
Used a prompt to confirm a default or provide a value. |