Using overloaded composite strategies causes HypothesisDeprecationWarning
#3970
Labels
enhancement
it's not broken, but we want it to be better
question
not sure it's a bug? questions welcome
I have a composite strategy that is overloaded, e.g. it can return either of two types depending on an input parameter. The code below type checks correctly, but it raises a warning on execution:
Running
pytest
, I get:So it looks like the composite decorator on the overload part of a function causes a false positive on this deprecation warning. The actual function does use
draw
.Perhaps there is another way to define overloaded strategies that avoids this issue? My current workaround is to ignore the warning on the overload definitions:
The text was updated successfully, but these errors were encountered: