@@ -589,7 +589,7 @@ def do_filtered_draw(self, data):
589
589
return filter_not_satisfied
590
590
591
591
592
- class OneOfStrategy (SearchStrategy ):
592
+ class OneOfStrategy (SearchStrategy [ Ex ] ):
593
593
"""Implements a union of strategies. Given a number of strategies this
594
594
generates values which could have come from any of them.
595
595
@@ -781,7 +781,7 @@ def one_of(
781
781
return OneOfStrategy (args )
782
782
783
783
784
- class MappedSearchStrategy (SearchStrategy ):
784
+ class MappedSearchStrategy (SearchStrategy [ Ex ] ):
785
785
"""A strategy which is defined purely by conversion to and from another
786
786
strategy.
787
787
@@ -816,7 +816,7 @@ def pack(self, x):
816
816
into a value suitable for outputting from this strategy."""
817
817
raise NotImplementedError (f"{ self .__class__ .__name__ } .pack()" )
818
818
819
- def do_draw (self , data : ConjectureData ) -> Ex :
819
+ def do_draw (self , data : ConjectureData ) -> Any :
820
820
with warnings .catch_warnings ():
821
821
if isinstance (self .pack , type ) and issubclass (
822
822
self .pack , (abc .Mapping , abc .Set )
@@ -826,7 +826,7 @@ def do_draw(self, data: ConjectureData) -> Ex:
826
826
i = data .index
827
827
try :
828
828
data .start_example (MAPPED_SEARCH_STRATEGY_DO_DRAW_LABEL )
829
- result = self .pack (data .draw (self .mapped_strategy ))
829
+ result = self .pack (data .draw (self .mapped_strategy )) # type: ignore
830
830
data .stop_example ()
831
831
return result
832
832
except UnsatisfiedAssumption :
@@ -846,7 +846,7 @@ def branches(self) -> List[SearchStrategy[Ex]]:
846
846
filter_not_satisfied = UniqueIdentifier ("filter not satisfied" )
847
847
848
848
849
- class FilteredStrategy (SearchStrategy ):
849
+ class FilteredStrategy (SearchStrategy [ Ex ] ):
850
850
def __init__ (self , strategy , conditions ):
851
851
super ().__init__ ()
852
852
if isinstance (strategy , FilteredStrategy ):
0 commit comments