diff --git a/hypothesis-python/src/hypothesis/internal/reflection.py b/hypothesis-python/src/hypothesis/internal/reflection.py index cf8a025886..f1f7775fb6 100644 --- a/hypothesis-python/src/hypothesis/internal/reflection.py +++ b/hypothesis-python/src/hypothesis/internal/reflection.py @@ -24,7 +24,7 @@ from keyword import iskeyword from tokenize import COMMENT, detect_encoding, generate_tokens, untokenize from types import ModuleType -from typing import TYPE_CHECKING, Any, Callable +from typing import TYPE_CHECKING, Callable from unittest.mock import _patch as PatchType from hypothesis.internal.compat import is_typed_named_tuple, update_code_location diff --git a/hypothesis-python/tests/cover/test_reflection.py b/hypothesis-python/tests/cover/test_reflection.py index dbe579a0d0..9b10826a02 100644 --- a/hypothesis-python/tests/cover/test_reflection.py +++ b/hypothesis-python/tests/cover/test_reflection.py @@ -667,6 +667,7 @@ def _prep_source(*pairs): ("", ""), ("def test(): pass", "def test(): pass"), ("def invalid syntax", "def invalid syntax"), + ("def also invalid(", "def also invalid("), ( """ @example(1)