Skip to content

Commit c03724b

Browse files
committed
fix bad attribute access
1 parent 99161c6 commit c03724b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def __init__(
321321
optional: Optional[dict[T, SearchStrategy[Ex]]],
322322
):
323323
dict_type = type(mapping)
324+
self.mapping = mapping
324325
keys = tuple(mapping.keys())
325326
self.fixed = st.tuples(*[mapping[k] for k in keys]).map(
326327
lambda value: dict_type(zip(keys, value))
@@ -348,5 +349,5 @@ def calc_is_empty(self, recur):
348349

349350
def __repr__(self):
350351
if self.optional is not None:
351-
return f"fixed_dictionaries({self.keys!r}, optional={self.optional!r})"
352-
return f"fixed_dictionaries({self.keys!r})"
352+
return f"fixed_dictionaries({self.mapping!r}, optional={self.optional!r})"
353+
return f"fixed_dictionaries({self.mapping!r})"

0 commit comments

Comments
 (0)