Skip to content

Commit d5c4be6

Browse files
committed
cleanup
1 parent 67cc6b1 commit d5c4be6

File tree

1 file changed

+5
-5
lines changed
  • hypothesis-python/src/hypothesis/strategies/_internal

1 file changed

+5
-5
lines changed

hypothesis-python/src/hypothesis/strategies/_internal/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def sampled_from(
243243
return LazyStrategy(one_of, args=inner, kwargs={}, force_repr=force_repr)
244244
if not values:
245245

246-
def has_annotations():
246+
def has_annotations(elements):
247247
if sys.version_info[:2] < (3, 14):
248248
return vars(elements).get("__annotations__")
249249
else: # pragma: no cover # covered by 3.14 tests
@@ -254,7 +254,7 @@ def has_annotations():
254254
if (
255255
isinstance(elements, type)
256256
and issubclass(elements, enum.Enum)
257-
and has_annotations()
257+
and has_annotations(elements)
258258
):
259259
# See https://github.com/HypothesisWorks/hypothesis/issues/2923
260260
raise InvalidArgument(
@@ -1120,11 +1120,11 @@ def builds(
11201120
the callable.
11211121
"""
11221122
if not callable(target):
1123-
from .types import is_a_union
1123+
from hypothesis.strategies._internal.types import is_a_union
11241124

11251125
# before 3.14, unions were callable, so it got an error message in
1126-
# BuildsStrategy.do_draw instead. In 3.14+, unions are not callable, so
1127-
# we can error earlier here instead.
1126+
# BuildsStrategy.do_draw. In 3.14+, unions are not callable, so
1127+
# we error earlier here instead.
11281128
suggestion = (
11291129
f" Try using from_type({target}) instead?" if is_a_union(target) else ""
11301130
)

0 commit comments

Comments
 (0)