File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
hypothesis-python/src/hypothesis/strategies/_internal Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 8383from hypothesis .internal .conjecture .data import ConjectureData
8484from hypothesis .internal .conjecture .utils import (
8585 calc_label_from_callable ,
86- calc_label_from_cls ,
8786 calc_label_from_hash ,
8887 check_sample ,
8988 combine_labels ,
@@ -1061,7 +1060,7 @@ def calc_label(self) -> int:
10611060 self .class_label ,
10621061 calc_label_from_callable (self .target ),
10631062 * [strat .label for strat in self .args ],
1064- * [calc_label_from_hash (k ) for k in self .kwargs . keys () ],
1063+ * [calc_label_from_hash (k ) for k in self .kwargs ],
10651064 * [strat .label for strat in self .kwargs .values ()],
10661065 )
10671066
Original file line number Diff line number Diff line change 1111from typing import Callable , Generic , TypeVar
1212
1313from hypothesis .internal .conjecture .data import ConjectureData
14+ from hypothesis .internal .conjecture .utils import calc_label_from_callable , combine_labels
1415from hypothesis .internal .reflection import get_pretty_function_description
1516from hypothesis .strategies ._internal .strategies import (
1617 RecurT ,
@@ -35,6 +36,13 @@ def __init__(
3536 def calc_is_empty (self , recur : RecurT ) -> bool :
3637 return recur (self .base )
3738
39+ def calc_label (self ) -> int :
40+ return combine_labels (
41+ self .class_label ,
42+ self .base .label ,
43+ calc_label_from_callable (self .expand ),
44+ )
45+
3846 def __repr__ (self ) -> str :
3947 if not hasattr (self , "_cached_repr" ):
4048 self ._cached_repr = (
Original file line number Diff line number Diff line change 1515
1616from hypothesis .control import reject
1717from hypothesis .errors import InvalidArgument
18- from hypothesis .internal .conjecture .utils import calc_label_from_hash , combine_labels
1918from hypothesis .internal .conjecture .data import ConjectureData
19+ from hypothesis .internal .conjecture .utils import calc_label_from_hash , combine_labels
2020from hypothesis .internal .filtering import (
2121 get_float_predicate_bounds ,
2222 get_integer_predicate_bounds ,
You can’t perform that action at this time.
0 commit comments