Skip to content

Commit

Permalink
Fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Sep 2, 2023
1 parent 8ca6c34 commit 49b0b80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hypothesis-python/src/hypothesis/strategies/_internal/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2035,11 +2035,11 @@ def register_type_strategy(
)
elif not (isinstance(strategy, SearchStrategy) or callable(strategy)):
raise InvalidArgument(
"strategy=%r must be a SearchStrategy, or a function that takes "
f"{strategy=} must be a SearchStrategy, or a function that takes "
"a generic type and returns a specific SearchStrategy"
)
elif isinstance(strategy, SearchStrategy) and strategy.is_empty:
raise InvalidArgument("strategy=%r must not be empty")
raise InvalidArgument(f"{strategy=} must not be empty")
elif types.has_type_arguments(custom_type):
raise InvalidArgument(
f"Cannot register generic type {custom_type!r}, because it has type "
Expand Down

0 comments on commit 49b0b80

Please sign in to comment.