Skip to content

Commit 19d47ce

Browse files
committed
format
1 parent 26fee6a commit 19d47ce

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def try_shrinking_nodes(self, nodes, n):
11441144
# case of this function of preserving from the right instead of
11451145
# preserving from the left. see test_can_shrink_variable_string_draws.
11461146

1147-
(index, attempt_choice_type, attempt_constraints, _attempt_forced) = (
1147+
index, attempt_choice_type, attempt_constraints, _attempt_forced = (
11481148
attempt.misaligned_at
11491149
)
11501150
node = self.nodes[index]

hypothesis-python/tests/conjecture/test_choice.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
@example(("integer", integer_constr(-(2**200), 2**200)))
7070
@given(choice_types_constraints())
7171
def test_compute_max_children_is_positive(choice_type_and_constraints):
72-
(choice_type, constraints) = choice_type_and_constraints
72+
choice_type, constraints = choice_type_and_constraints
7373
assert compute_max_children(choice_type, constraints) >= 0
7474

7575

@@ -206,7 +206,7 @@ def test_draw_string_single_interval_with_equal_bounds(s, n):
206206
@given(choice_types_constraints())
207207
@settings(suppress_health_check=[HealthCheck.filter_too_much])
208208
def test_compute_max_children_and_all_children_agree(choice_type_and_constraints):
209-
(choice_type, constraints) = choice_type_and_constraints
209+
choice_type, constraints = choice_type_and_constraints
210210
max_children = compute_max_children(choice_type, constraints)
211211

212212
# avoid slowdowns / OOM when reifying extremely large all_children generators.
@@ -390,7 +390,7 @@ def test_data_with_same_forced_value_is_valid(node):
390390
@given(choice_types_constraints())
391391
@settings(suppress_health_check=[HealthCheck.filter_too_much])
392392
def test_all_children_are_permitted_values(choice_type_and_constraints):
393-
(choice_type, constraints) = choice_type_and_constraints
393+
choice_type, constraints = choice_type_and_constraints
394394
max_children = compute_max_children(choice_type, constraints)
395395

396396
cap = min(100_000, MAX_CHILDREN_EFFECTIVELY_INFINITE)
@@ -769,7 +769,7 @@ def test_node_template_simplest_is_actually_trivial(node):
769769
@example(("boolean", {"p": 0}))
770770
@example(("boolean", {"p": 1}))
771771
def test_choice_indices_are_positive(choice_type_and_constraints):
772-
(choice_type, constraints) = choice_type_and_constraints
772+
choice_type, constraints = choice_type_and_constraints
773773
v = draw_value(choice_type, constraints)
774774
assert choice_to_index(v, constraints) >= 0
775775

@@ -786,7 +786,7 @@ def test_shrink_towards_has_index_0(constraints):
786786
@settings(max_examples=20)
787787
def test_choice_to_index_injective(choice_type_and_constraints):
788788
# choice sequence ordering should be injective both ways.
789-
(choice_type, constraints) = choice_type_and_constraints
789+
choice_type, constraints = choice_type_and_constraints
790790
# ...except for floats, which are hard to order bijectively.
791791
assume(choice_type != "float")
792792
# cap to 10k so this test finishes in a reasonable amount of time
@@ -810,7 +810,7 @@ def test_choice_to_index_injective(choice_type_and_constraints):
810810
)
811811
)
812812
def test_choice_from_value_injective(choice_type_and_constraints):
813-
(choice_type, constraints) = choice_type_and_constraints
813+
choice_type, constraints = choice_type_and_constraints
814814
assume(choice_type != "float")
815815
cap = min(compute_max_children(choice_type, constraints), 10_000)
816816

@@ -823,7 +823,7 @@ def test_choice_from_value_injective(choice_type_and_constraints):
823823

824824
@given(choice_types_constraints())
825825
def test_choice_index_and_value_are_inverses(choice_type_and_constraints):
826-
(choice_type, constraints) = choice_type_and_constraints
826+
choice_type, constraints = choice_type_and_constraints
827827
v = draw_value(choice_type, constraints)
828828
index = choice_to_index(v, constraints)
829829
note({"v": v, "index": index})

0 commit comments

Comments
 (0)