Skip to content
Myr

Make the source selection logic clearer

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kevin Deldycke · committed by Kevin Deldycke · parent 60feda3 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Address: https://github.com/pallets/click/pull/3030/files#r2288971948

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:src/click/core.py+3 added-1 removed
2248 unmodified lines
2249 default value. In that order of precedence.22502251 If no value is found, an internal sentinel value is returned.2252 """2253 # If the value is set, it means the parser produced a value from user input.2253 # Collect from the parse the value passed by the user to the CLI.2254 value = opts.get(self.name, UNSET) # type: ignore2255 # If the value is set, it means it was sourced from the command line by the2256 # parser, otherwise it left unset by default.2257 source = (2258 ParameterSource.COMMANDLINE2259 if value is not UNSET2260 else ParameterSource.DEFAULT
1014 unmodified lines