Skip to content

Commit be0fc33

Browse files
committed
Clarify error message
1 parent 055f9e2 commit be0fc33

File tree

1 file changed

+2
-1
lines changed
  • hypothesis-python/src/hypothesis/strategies/_internal

1 file changed

+2
-1
lines changed

hypothesis-python/src/hypothesis/strategies/_internal/core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,8 @@ def builds(
891891
if to_infer - set(hints):
892892
badargs = ", ".join(sorted(to_infer - set(hints)))
893893
raise InvalidArgument(
894-
f"passed ... for {badargs}, but there is no type annotation"
894+
f"passed ... for {badargs}, but we cannot infer a strategy "
895+
"because these arguments have no type annotation"
895896
)
896897
infer_for = {k: v for k, v in hints.items() if k in (required | to_infer)}
897898
if infer_for:

0 commit comments

Comments
 (0)