Skip to content
Myr

Hint at the concepts carried by default

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 029bbed · Browse files · 1 file+10 added−0 removed
This commit

State

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

Diff stats

1 file+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:src/click/core.py+10 added
2078 unmodified lines
2079 self,2080 param_decls: cabc.Sequence[str] | None = None,2081 type: types.ParamType | t.Any | None = None,2082 required: bool = False,2083 # XXX The default historically embed two concepts:2084 # - the declaration of a Parameter object carrying the default (handy to2085 # arbitrage the default value of coupled Parameters sharing the same2086 # self.name, like flag options),2087 # - and the actual value of the default.2088 # It is confusing and is the source of many issues discussed in:2089 # https://github.com/pallets/click/pull/30302090 # In the future, we might think of splitting it in two, not unlike2091 # Option.is_flag and Option.flag_value: we could have something like2092 # Parameter.is_default and Parameter.default_value.2093 default: t.Any | t.Callable[[], t.Any] | None = UNSET,2094 callback: t.Callable[[Context, Parameter, t.Any], t.Any] | None = None,2095 nargs: int | None = None,2096 multiple: bool = False,
1248 unmodified lines