From 4e435a865d5afdfb7d50ae7b44a376b90aafae8c Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Wed, 8 May 2024 14:54:20 -0400 Subject: [PATCH] linting --- .../src/hypothesis/internal/conjecture/engine.py | 3 +-- hypothesis-python/tests/conjecture/test_engine.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hypothesis-python/src/hypothesis/internal/conjecture/engine.py b/hypothesis-python/src/hypothesis/internal/conjecture/engine.py index 047100f911..d154fdc28e 100644 --- a/hypothesis-python/src/hypothesis/internal/conjecture/engine.py +++ b/hypothesis-python/src/hypothesis/internal/conjecture/engine.py @@ -254,7 +254,7 @@ def _cache_key_ir(self, *, nodes=None, data=None): # intentionally drop was_forced from equality here, because the was_forced # of node prefixes on ConjectureData has no impact on that data's result - key = tuple( + return tuple( ( node.ir_type, ir_value_key(node.ir_type, node.value), @@ -262,7 +262,6 @@ def _cache_key_ir(self, *, nodes=None, data=None): ) for node in nodes + extension ) - return key def _cache(self, data): result = data.as_result() diff --git a/hypothesis-python/tests/conjecture/test_engine.py b/hypothesis-python/tests/conjecture/test_engine.py index ab842c0c0e..807e385880 100644 --- a/hypothesis-python/tests/conjecture/test_engine.py +++ b/hypothesis-python/tests/conjecture/test_engine.py @@ -28,7 +28,8 @@ from hypothesis.errors import FailedHealthCheck, Flaky from hypothesis.internal.compat import int_from_bytes from hypothesis.internal.conjecture import engine as engine_module -from hypothesis.internal.conjecture.data import ConjectureData, Overrun, Status, IRNode +from hypothesis.internal.conjecture.data import ConjectureData, IRNode, Overrun, Status +from hypothesis.internal.conjecture.datatree import compute_max_children from hypothesis.internal.conjecture.engine import ( MIN_TEST_CALLS, ConjectureRunner, @@ -39,7 +40,6 @@ from hypothesis.internal.conjecture.pareto import DominanceRelation, dominance from hypothesis.internal.conjecture.shrinker import Shrinker, block_program from hypothesis.internal.entropy import deterministic_PRNG -from hypothesis.internal.conjecture.datatree import compute_max_children from tests.common.debug import minimal from tests.common.strategies import SLOW, HardToShrink