Skip to content

Commit

Permalink
use ir_kwargs_key for pooled kwargs key
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Oct 14, 2024
1 parent 116bbd3 commit 0df70ec
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions hypothesis-python/src/hypothesis/internal/conjecture/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2374,18 +2374,7 @@ def _pooled_kwargs(self, ir_type, kwargs):
if self.provider.avoid_realization:
return kwargs

key = []
for k, v in kwargs.items():
if ir_type == "float" and k in ["min_value", "max_value"]:
# handle -0.0 vs 0.0, etc.
v = float_to_int(v)
elif ir_type == "integer" and k == "weights":
# make hashable
v = v if v is None else tuple(v)
key.append((k, v))

key = (ir_type, *sorted(key))

key = (ir_type, *ir_kwargs_key(ir_type, kwargs))
try:
return POOLED_KWARGS_CACHE[key]
except KeyError:
Expand Down

0 comments on commit 0df70ec

Please sign in to comment.