Skip to content

Commit ee6fee4

Browse files
Same as last
1 parent 57664cf commit ee6fee4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

libsemigroups_pybind11/congruence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(self: Self, *args, **kwargs) -> None:
7575
)
7676
self.init_cxx_obj(*args)
7777

78-
def get(self: Self, t: type) -> _Kambites | _KnuthBendix | _ToddCoxeter:
78+
def get(self: Self, t: type) -> Union[_Kambites, _KnuthBendix, _ToddCoxeter]:
7979
"""
8080
:sig=(self: Congruence, t: type) -> Kambites | KnuthBendix | ToddCoxeter:
8181
Returns the *t* instance used to compute the congruence (if any).

libsemigroups_pybind11/presentation/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
The full API for :any:`Presentation` helper functions is given below.
1414
"""
1515

16-
from typing import List, Any as _Any
16+
from typing import List, Any as _Any, Union
1717
from typing_extensions import Self
1818

1919
from _libsemigroups_pybind11 import (
@@ -147,12 +147,12 @@ def __init__(self: Self, *args, **kwargs):
147147

148148
@_copydoc(_PresentationWords.rules)
149149
@property
150-
def rules(self: Self) -> List[List[int] | str]:
150+
def rules(self: Self) -> List[Union[List[int], str]]:
151151
# pylint: disable=missing-function-docstring
152152
return _to_cxx(self).rules
153153

154154
@rules.setter
155-
def rules(self: Self, val: List[List[int] | str]) -> None:
155+
def rules(self: Self, val: List[Union[List[int], str]]) -> None:
156156
_to_cxx(self).rules = val
157157

158158

@@ -172,7 +172,7 @@ class InversePresentation(Presentation):
172172
_py_template_params_to_cxx_type = {
173173
(List[int],): _InversePresentationWords,
174174
(str,): _InversePresentationStrings,
175-
(Presentation,): _InversePresentationWords | _InversePresentationStrings,
175+
(Presentation,): Union[_InversePresentationWords, _InversePresentationStrings],
176176
}
177177

178178
_cxx_type_to_py_template_params = dict(

0 commit comments

Comments
 (0)