Skip to content

Commit e27b307

Browse files
authored
Make uv run --all-extras pyright --verifytypes click pass (#3072)
2 parents a92c573 + 9cc2fe3 commit e27b307

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ description = "run static type checkers"
174174
dependency_groups = ["typing"]
175175
commands = [
176176
["mypy"],
177+
["pyright", "--ignoreexternal", "--verifytypes", "click"],
177178
]
178179

179180
[tool.tox.env.docs]

src/click/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ def __init__(
21672167
self.nargs = nargs
21682168
self.multiple = multiple
21692169
self.expose_value = expose_value
2170-
self.default = default
2170+
self.default: t.Any | t.Callable[[], t.Any] | None = default
21712171
self.is_eager = is_eager
21722172
self.metavar = metavar
21732173
self.envvar = envvar
@@ -2762,7 +2762,7 @@ def __init__(
27622762
if type is None:
27632763
# A flag without a flag_value is a boolean flag.
27642764
if flag_value is UNSET:
2765-
self.type = types.BoolParamType()
2765+
self.type: types.ParamType = types.BoolParamType()
27662766
# If the flag value is a boolean, use BoolParamType.
27672767
elif isinstance(flag_value, bool):
27682768
self.type = types.BoolParamType()

0 commit comments

Comments
 (0)