We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62ff846 commit 9518ad0Copy full SHA for 9518ad0
typemap/type_eval/_eval_operators.py
@@ -547,6 +547,13 @@ def _callable_type_to_signature(callable_type: object) -> inspect.Signature:
547
# Standard callable (no Params wrapping) — build simple
548
# positional parameters from the type list
549
if isinstance(param_types, (list, tuple)):
550
+ # Error if someone passes Param types without Params wrapper
551
+ for t in param_types:
552
+ if typing.get_origin(t) is Param:
553
+ raise TypeError(
554
+ f"Param types must be wrapped in Params[...], "
555
+ f"got Callable[[{t}, ...], ...]"
556
+ )
557
params = []
558
for i, t in enumerate(param_types):
559
params.append(
0 commit comments