Skip to content
Myr

Make `uv run --all-extras pyright --verifytypes click` pass

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

I am not familiar with the CI setup of this project, so if there is a wish to have this in CI, I'd like to be instructed, or leave that to someone else please.

authored by Adam Dangoor · committed by Adam Dangoor · parent 81a482f · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/click/core.py+2 added-2 removed
2142 unmodified lines
2143 self.callback = callback2144 self.nargs = nargs2145 self.multiple = multiple2146 self.expose_value = expose_value2147 self.default = default2147 self.default: t.Any | t.Callable[[], t.Any] | None = default2148 self.is_eager = is_eager2149 self.metavar = metavar2150 self.envvar = envvar2151 self._custom_shell_complete = shell_complete
580 unmodified lines
2732 # Auto-detect the type of the flag based on the flag_value.2733 if type is None:2734 # A flag without a flag_value is a boolean flag.2735 if flag_value is UNSET:2736 self.type = types.BoolParamType()2736 self.type: types.ParamType = types.BoolParamType()2737 # If the flag value is a boolean, use BoolParamType.2738 elif isinstance(flag_value, bool):2739 self.type = types.BoolParamType()2740 # Otherwise, guess the type from the flag value.
607 unmodified lines