github HypothesisWorks/hypothesis v6.154.2
Hypothesis version 6.154.2

latest release: v6.155.0
7 hours ago

This patch improves the type annotations of "fixed_dictionaries()",
which now accepts a "Mapping" rather than requiring an invariant
"dict". Because the value type is covariant, type-checkers can now
infer the generated type even when the strategies are heterogeneous,
e.g. a "mapping" annotated as "dict[str, SearchStrategy[int] |
SearchStrategy[str]]" (issue #4665).

The "mapping" and "optional" arguments may now also have different key
and value types, which are unioned in the inferred result.

The canonical version of these notes (with links) is on readthedocs.

Don't miss a new hypothesis release

NewReleases is sending notifications on new releases.