Skip to content

Commit

Permalink
simplify ir_value_key computation
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Jan 9, 2025
1 parent 74864d9 commit dd27f2d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions hypothesis-python/src/hypothesis/internal/conjecture/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,7 @@ def __stoppable_test_function(self, data: ConjectureData) -> None:
raise

def _cache_key(self, choices: Sequence[ChoiceT]) -> tuple[int, ...]:
# TODO drop after #4229
def ir_type(choice):
return {
str: "string",
float: "float",
int: "integer",
bool: "boolean",
bytes: "bytes",
}[type(choice)]

return tuple(ir_value_key(ir_type(choice), choice) for choice in choices)
return tuple(ir_value_key(choice) for choice in choices)

def _cache(self, data: ConjectureData) -> None:
result = data.as_result()
Expand Down

0 comments on commit dd27f2d

Please sign in to comment.