Skip to content

Commit

Permalink
tweak formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Oct 21, 2024
1 parent 08f8bde commit f4cae3d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hypothesis-python/src/hypothesis/stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from functools import lru_cache
from io import StringIO
from time import perf_counter
from typing import Any, Callable, ClassVar, Optional, Union, overload
from typing import Any, Callable, ClassVar, Optional, TypeAlias, Union, overload
from unittest import TestCase

import attr
Expand Down Expand Up @@ -628,8 +628,8 @@ def _convert_targets(targets, target):
INVARIANT_MARKER = "hypothesis_stateful_invariant"


_RuleType = Callable[..., Union[MultipleResults[Ex], Ex]]
_RuleWrapper = Callable[[_RuleType[Ex]], _RuleType[Ex]]
_RuleType: TypeAlias = Callable[..., Union[MultipleResults[Ex], Ex]]
_RuleWrapper: TypeAlias = Callable[[_RuleType[Ex]], _RuleType[Ex]]


# We cannot exclude `target` or `targets` from any of these signatures because
Expand Down Expand Up @@ -669,7 +669,10 @@ def rule(

@overload
def rule(
*, target: Bundle[Ex], targets: _OmittedArgument = ..., **kwargs: SearchStrategy
*,
target: Bundle[Ex],
targets: _OmittedArgument = ...,
**kwargs: SearchStrategy,
) -> _RuleWrapper[Ex]: # pragma: no cover
...

Expand Down

0 comments on commit f4cae3d

Please sign in to comment.