diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..aa0c84190a --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,3 @@ +RELEASE_TYPE: patch + +This patch tweaks our linter configuration for :pypi:`mypy` 0.790. diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/core.py b/hypothesis-python/src/hypothesis/strategies/_internal/core.py index 46ac3d51f4..ac053fcfaa 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/core.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/core.py @@ -1476,7 +1476,7 @@ def as_strategy(strat_or_callable, thing, final=True): # We also have a special case for TypeVars. # They are represented as instances like `~T` when they come here. # We need to work with their type instead. - if isinstance(thing, TypeVar) and type(thing) in types._global_type_lookup: # type: ignore + if isinstance(thing, TypeVar) and type(thing) in types._global_type_lookup: return as_strategy(types._global_type_lookup[type(thing)], thing) # If there's no explicitly registered strategy, maybe a subtype of thing # is registered - if so, we can resolve it to the subclass strategy.