Skip to content

Commit 3e2d92c

Browse files
committed
Eliminate one type ignore
Refs #3371 (comment)
1 parent 6e981ed commit 3e2d92c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/click/types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def convert(
129129
:param ctx: The current context that arrived at this value. May
130130
be ``None``.
131131
"""
132-
return value # type: ignore[no-any-return]
132+
# The default returns the value as-is so subclasses that only customize
133+
# metadata are not forced to redeclare ``convert``.
134+
return t.cast("ParamTypeValue", value)
133135

134136
def split_envvar_value(self, rv: str) -> cabc.Sequence[str]:
135137
"""Given a value from an environment variable this splits it up

0 commit comments

Comments
 (0)