Skip to content

Commit 14b6538

Browse files
committed
use union instead of pipe
1 parent d2ad376 commit 14b6538

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hypothesis-python/src/hypothesis/internal/constants_ast.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ class Constants:
3838
def __init__(
3939
self,
4040
*,
41-
# spiritually an "AbstractSet, with the addition of a .add method"
42-
integers: set[int] | SortedSet[int] = None,
43-
floats: set[float] | SortedSet[float] = None,
44-
bytes: set[bytes] | SortedSet[bytes] = None,
45-
strings: set[str] | SortedSet[str] = None,
41+
# spiritually "an AbstractSet, with the addition of a .add method"
42+
integers: Union[set[int], SortedSet[int]] = None,
43+
floats: Union[set[float], SortedSet[float]] = None,
44+
bytes: Union[set[bytes], SortedSet[bytes]] = None,
45+
strings: Union[set[str], SortedSet[str]] = None,
4646
):
4747
self.integers = set() if integers is None else integers
4848
self.floats = set() if floats is None else floats
4949
self.bytes = set() if bytes is None else bytes
5050
self.strings = set() if strings is None else strings
5151

5252
def set_for_type(
53-
self, constant_type: type[ConstantT] | ChoiceTypeT
54-
) -> set[ConstantT] | SortedSet[ConstantT]:
53+
self, constant_type: Union[type[ConstantT], ChoiceTypeT]
54+
) -> Union[set[ConstantT], SortedSet[ConstantT]]:
5555
if constant_type is int or constant_type == "integer":
5656
return self.integers
5757
elif constant_type is float or constant_type == "float":

0 commit comments

Comments
 (0)