Skip to content

Commit 0df70ec

Browse files
committed
use ir_kwargs_key for pooled kwargs key
1 parent 116bbd3 commit 0df70ec

File tree

1 file changed

+1
-12
lines changed
  • hypothesis-python/src/hypothesis/internal/conjecture

1 file changed

+1
-12
lines changed

hypothesis-python/src/hypothesis/internal/conjecture/data.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2374,18 +2374,7 @@ def _pooled_kwargs(self, ir_type, kwargs):
23742374
if self.provider.avoid_realization:
23752375
return kwargs
23762376

2377-
key = []
2378-
for k, v in kwargs.items():
2379-
if ir_type == "float" and k in ["min_value", "max_value"]:
2380-
# handle -0.0 vs 0.0, etc.
2381-
v = float_to_int(v)
2382-
elif ir_type == "integer" and k == "weights":
2383-
# make hashable
2384-
v = v if v is None else tuple(v)
2385-
key.append((k, v))
2386-
2387-
key = (ir_type, *sorted(key))
2388-
2377+
key = (ir_type, *ir_kwargs_key(ir_type, kwargs))
23892378
try:
23902379
return POOLED_KWARGS_CACHE[key]
23912380
except KeyError:

0 commit comments

Comments
 (0)