Skip to content

Commit be582ac

Browse files
authored
Merge pull request #4433 from emmanuel-ferdman/master
Fix error message formatting
2 parents e358c5c + e6fbdc0 commit be582ac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

hypothesis-python/RELEASE.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RELEASE_TYPE: patch
2+
3+
This patch corrects the f-string formatting of a few array-related error messages.

hypothesis-python/src/hypothesis/extra/_array_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ def _hypothesis_parse_gufunc_signature(signature):
328328
raise InvalidArgument(
329329
f"Got dimension {name!r}, but handling of frozen optional dimensions "
330330
"is ambiguous. If you known how this should work, please "
331-
"contact us to get this fixed and documented ({signature=})."
331+
f"contact us to get this fixed and documented ({signature=})."
332332
)
333333
except ValueError:
334334
names_in = {n.strip("?") for shp in input_shapes for n in shp}
335335
names_out = {n.strip("?") for n in result_shape}
336336
if name.strip("?") in (names_out - names_in):
337337
raise InvalidArgument(
338-
"The {name!r} dimension only appears in the output shape, and is "
339-
"not frozen, so the size is not determined ({signature=})."
338+
f"The {name!r} dimension only appears in the output shape, and is "
339+
f"not frozen, so the size is not determined ({signature=})."
340340
) from None
341341
return _GUfuncSig(input_shapes=input_shapes, result_shape=result_shape)
342342

0 commit comments

Comments
 (0)